Driveway alert--coming or going (sequential triggers)

I have a driveway alert wired to an everspring door/window sensor. Right now when someone arrives or departs, the sensor triggers a scene to blink certain lights 3 times. However, there is no current way to tell if a person is arriving or leaving via this set up.

On the hardware side, I could get an additional dakota driveway sensor and an additional everspring door window sensor. This would allow the two sensors to trigger in one order if someone is arriving and the opposite order if someone is leaving. Is there a way to script a scene or two separate scenes that look for the order of sensors triggered? For example far sensor triggered first, near sensor triggered second–someone is arriving.

Any thoughts on this one?

You can right the code in Luup looking at the LastTripped variable of the security sensors.

Or you can look at the: Program Logic Plugin
[url=http://RTS-Services.com/Vera/Plugin/PL]http://RTS-Services.com/Vera/Plugin/PL[/url]
It has support for combining triggers and other expressions with

[ol][li]boolean operators AND, OR, and NOT[/li]
[li]Count #of Active Trigger expression[/li]
[li]Ordered sequence of triggers
This is what you are looking for.[/li][/ol]

Currently this logic is attached to a countdown timer.
I plan to release a second plugin using the same engine as a Trigger Generator
for scenes.

Great! As soon as I get the additional sensors, I will post results. This could be just the ticket. Thank you.

David

I could use some advice… I have two optex ax-130 lasers being installed today. Using two because I am going to do the same thing by telling if coming or going. Here is my thought; I will put them about 4 feet apart down so a car will trip both at the same time and base the logic on which was tripped first to determine if coming or going. I figure the 4 feet will be wide enough only a car can trip both at the same time.
Does that sound correct to everyone, is there a better route I should take?

Btw I opted for these lasers due to the false trip problem during storms on the magnetic Dakota sensors.

I’m connecting this to an elk m1 gold. I plan to use the plugin mentioned in the previous post unless the elk can handle it better.

2

Hopefully no one will zoom up your driveway. The Sequence engine uses a Vera timestamp that has 1 second resolution. (i.e. @ 30 mph thats 44 ft/sec)

With your 4 ft spacing, anything faster than 3 mph will likely be registered as the same timestamp.

To trigger reliably they would need to go less than 1.5 MPH

Interesting calculation, I didnt realize the 1 second resolution either… It’s a 100ft driveway. I would guess an avg speed of 10mph. What distance apart would you suggest?
I also read up on sensor, it has a 2 second trip time. which may play a factor in the presense of human walking, or not depending on how far apart I really need these.

By the way, I referenced this thread on your Program Logic thread. Great plugin, I cannot wait to master it. This project will help.

Also if you have a driveway that big you are not in a cramped neighborhood …
You may have to worry about creatures of the night tripping these … not vampires … deer, dogs, raccoons …

For 10 mph I would recommend at least 30 ft spacing.

It should not matter if there is a 2 second cycle time on the sensors.
You only need to look at the trip times not the untripped times.

This gives me an idea about calculating the time between trips to alert us of the speed of the vehicle.

I wish I knew how to write plugins. It would be pretty cool to create a plugin and simply specify 2 sensors.
Note which would be tripped first if “going”
Specify the distance between the 2 sensors.

Then have the plugin display 3 states ( arriving / departing / forever alone aka no visitors) and a speed variable

If anyone wants to whip this up, I’ll buy them a few beers :wink:

Sent from my SPH-D710 using Tapatalk 2

I just released the Program Logic Event Generator plugin.

If you have two sensors (CloseToHouse and CloseToStreet)
Then with this plugin you could create two Triggers:
HouseTrip when CloseToHouse is tripped
StreetTrip when CloseToStreet is tripped

Then you could create to output triggers from this plugin:
Arriving = StreetTrip; HouseTrip < 30
Departing = HouseTrip; StreetTrip < 30

But as I said … this assumes there is at least 1 second difference between the trigger times.
30 Seconds might be a long time for the car … but might be appropriate for a person walking up the drive.

So I created these 2 triggers in the PLEG plugin, and Used “Approaching” As a Condition, and the same syntax you refrenced in your post, then saved. I assumed I would see them as triggers in the Automation setup, but I did not. I have all 3 plugins installed. What am I missing?

[ol][li]Edit your scene[/li]
[li]Create a trigger for your scene.[/li]
[li]Select the PLEG device.[/li]
[li]Select A Condition is Satisfied[/li]
[li]Specify the Condition Name
Sorry :frowning: you have to type the name of your condition here! This part of Vera Code does not have the ability to have a dynamically created option list.[/li][/ol]

You are good to go!

[quote=“RichardTSchaefer, post:11, topic:173395”]Sorry :frowning: you have to type the name of your condition here! This part of Vera Code does not have the ability to have a dynamically created option list.

You are good to go![/quote]

Ok, I was expecting it to be created, thanks for clarifying.