What used to be easy in Vera...

Posted on
Tue May 02, 2017 12:03 pm
new2me07 offline
Posts: 84
Joined: Apr 07, 2017

What used to be easy in Vera...

I am trying to recreate all the conditional logic that used to run my house before I jumped ship. I just got my cameras (variables) into indigo from blue iris. Specifically, I have one on the porch and one looking at the driveway. I used to use these to trigger some hacked together camera call up on Windows Media center and send a prowl notification.

Obviously, just relying on one isn't practical as way too many false positives. So between setting the right detection methods in Blue Iris and using PLEG in Vera I had a pretty much 100% reliable "someone's here alert".

So my question would be, what is the EASIEST way to trigger an alert, when two variables have changed in a given amount of time, even if they have been changed back? I know I can create a variable and insert a timestamp but that seems like a crazy amount of effort to what used to take seconds to create.

In PLEG its would look something like: (PorchMotion; NOW > 5) and (DrivewayMotion; NOW>5) and (!FrontDoorOpen; NOW >10)

As for the trigger tab itself, do I need to define something or can I just have an embedded script under conditions? If nothing is triggering when does the script get evaluated?

Thanks for any help

Posted on
Tue May 02, 2017 12:17 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: What used to be easy in Vera...

Code: Select all
Trigger: porch motion.
Action: set variable.  Also reset variable after N minutes, overriding previous delay.

Trigger: That other motion.
Action: set variable.  Also reset variable after N minutes, overriding previous delay.

Trigger: Porch Motion Variable becomes true
condition: Other Motion Variable is true
Action: whatever you want.

And also the other way around:
Trigger: Other Motion Variable becomes true
condition: Porch Motion Variable is true
Action: whatever you want.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Tue May 02, 2017 3:34 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: What used to be easy in Vera...

I think a lot of folks do this with timers:

Code: Select all
Trigger: porch motion.
Action: restart timer

Trigger: That other motion.
Action: restart timer

Trigger: Timer becomes active
Action: whatever you want.

Trigger: Timer expires
Action: whatever you want.

I've been playing around with a plugin that attempts to generalize the issue of inferring ongoing activity based on momentary inputs. I'm not sure it's general-interest enough to publicly release, and in any case I'm still messing about with it. But you're free to try it if you like.

Basically it would combine the first two triggers above into a new device that, when appropriately configured, indicates whether you consider the porch to be 'active'. Then it's easy to create triggers based on that:

Code: Select all
Device: Porch activity
Inputs: Motion 1, Motion 2, Motion 3, etc.

Trigger: Porch Active
Action: whatever you want

Trigger: Porch Inactive
Action: whatever you want

It also lets you set a threshold so the device doesn't go 'active' until N inputs with X period of time.

There's no documentation yet, but it's not hard to figure out.

Download here: https://github.com/kmarkley/Indigo-Acti ... ses/latest

Posted on
Tue May 02, 2017 4:11 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: What used to be easy in Vera...

I'm unclear what triggers your PLEG action - it specifies a bunch of conditions, but how it it actually triggered such that those conditions get evaluated?

I think maybe if you elaborate on what exactly you're trying to accomplish we can probably help you figure out the right solution. Maybe write out (in pseudo logic) several scenarios.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed May 03, 2017 7:22 pm
new2me07 offline
Posts: 84
Joined: Apr 07, 2017

Re: What used to be easy in Vera...

I found my solution. It just took a few modifications to my Blue Iris settings. I was resetting the variable for the camera with a timer, when I should've had BI resetting it. Then raised by break times for the motion detection and allowed re-triggering without the specific zone breaking logic, FWIW. I think the other applications to my question can be solved by a schedule evaluating a variable every few seconds, to evaluate my conditional logic, instead of creating numerous triggers.

On a side note, paused and speak along with hue alerts, GENIUS. I thought I created something unique a while ago when I finally got Vera to SSH to my mac and run applescripts, so I'd airplay a playlist to the bathroom with the flick of a switch. So many more possibilities now for notifications and whole home audio. I'm really feeling the need for a Demo variable and just show off some creativity even if its not all that practical when company's present.

Thanks for the awesome product!!

Posted on
Thu May 04, 2017 7:37 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: What used to be easy in Vera...

Thanks! Glad you're finding it as awesome as we think it is.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat May 20, 2017 2:09 pm
johnfdl offline
Posts: 177
Joined: May 18, 2017
Location: Atlanta, GA USA

Re: What used to be easy in Vera...

I also recently switched from Vera to Indigo. I don't use my camera motion detection as I get too many false positives. But what does work very reliably is the Dakota Beam driveway alert. It aint cheap at $270, but it has worked flawless for me for a couple years. It worked equally as well on Vera as it does on Indgo.

I have what might be a similar set up as you as follows: I connected a simple zwave window/door sensor to the Dakokta receiver so not only does the dakota sound the chime when the beam is broken (i.e., someone is coming up the driveway), but it triggers the zwave window sensor. I then have an action group which fires when the sensor triggers. The action group does this:
pauses my Tivo
changes input on my stereo to PC (the PC input has a small form factor PC connected to the stereo via HDMI)
tells VLC app on the PC to play the RTSP stream from my IP camera
20 seconds later, it stops the stream, changes input back to Tivo and unpauses Tivo.

VLC is great in that you can play a stream (such as an RTSP stream from an IP cam) by issuing an HTTP from any computer on the network. So Indigo does this via applescript as follows (where the 192.168.2.120 is the PC connected to the stereo and running VLC on port 8181 and 192.168.2.111 is the IP Camera:
tell application "Terminal"
do script "wget \"http://192.168.2.120:8181/requests/status.xml?command=in_play&input=rtsp://admin:password@192.168.2.111/live_mpeg4.sdp\""
end tell

Of course, the command syntax to play the RTSP stream will vary slightly based on your camera.....mine is a Trivision cam

And the stop command is also a simple applescript as follows:
tell application "Terminal"
do script "wget \"http://192.168.2.120:8181/requests/status.xml?command=pl_stop\""
end tell

It's pretty cool. In my case, it only works if I am already watching the TV, but you could easily issue a TV on-command. You can learn more about connecting the Dakota to the zwave module here (though trust me, it is super easy): http://forum.micasaverde.com/index.php/ ... #msg284187

Posted on
Mon May 22, 2017 5:40 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: What used to be easy in Vera...

I use the Dakota as well, but use the relay in the receiver. it was originally hooked to an Insteon EZIO, but but recently moved it to the GPIO on an rPi running Karls PiBeacon plugin. This triggers Bert's Plugins-Security camera plugin to save the the prior 30 second set of 1 second snapshots, wait 30 seconds and do it again (catching people coming or going) IF the house is unoccupied. We did have a different trigger for when the house is occupied to flash a Plasma ball decoration on and off in the living room which is too far from the Dakota to hear the chime, but that got annoying...

Posted on
Mon May 22, 2017 10:03 am
johnfdl offline
Posts: 177
Joined: May 18, 2017
Location: Atlanta, GA USA

Re: What used to be easy in Vera...

Good idea. I love the Dakota......I rarely get false alarms. I selected the Beam approach which I think is best.....it catches if a person or car comes up the driveway, but it's set high enough up to avoid having the neighborhood cats set it off. It has three beams which I think also prevents against false alarms triggered by a falling leaf, birds, etc. THe hardest part was aligning the units on either end of the driveway so the beams were properly calibrated. I suggest using a laser pointer to help.

I always meant to set up a 'when I am not home' scene so if the beam is broken, it sends a still image from the camera to my phone with a link to the live feed. This might be the reminder I needed.

Posted on
Mon May 22, 2017 10:26 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: What used to be easy in Vera...

johnfdl wrote:
Good idea. I love the Dakota......I rarely get false alarms. I selected the Beam approach which I think is best....


I'm using the magnetic sensor because in the rural area where I live we've got a large and active deer population that like to use my driveway as a highway, but the same receiver works with any of the sensors so it's irrelevant to Indigo. And my "not at home" trigger sends me a pushover alert, which means that all I have to do is pull up the control page showing the last activity mosaio in touch to see who or what is happening.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests