Auto off if triggered on

Moderator: leecollings

Post Reply
jrich523
Posts: 63
Joined: Monday 18 January 2016 21:43
Target OS: Windows
Domoticz version: 3.5196
Location: Seattle, WA
Contact:

Auto off if triggered on

Post by jrich523 »

I have a motion zone setup in blue iris that will run a script. that script should turn on my front light but turn it off after 15 min. however I only want it to turn off automatically if its turned on by the trigger but not if i manually turn it on.

because the API only lets me turn a device on/off and i cant access events from the API, im thinking the only way around this is to put the event to a virtaul device or device group but then i'd want to hide it, and i dont see that available.

any thoughts on how i can do this?
[ Domoticz 3.5196 | Win10 | AeoTec Z-Stick Gen5 ]
theolsen
Posts: 46
Joined: Wednesday 31 July 2013 11:15
Target OS: -
Domoticz version:
Contact:

Re: Auto off if triggered on

Post by theolsen »

If you wish to hide a device from the UI just rename it and precede the name with a $

So Table Lamp is visible but $Table lamp is not.
jrich523
Posts: 63
Joined: Monday 18 January 2016 21:43
Target OS: Windows
Domoticz version: 3.5196
Location: Seattle, WA
Contact:

Re: Auto off if triggered on

Post by jrich523 »

awesome, thats helpful... should be easy to do this way now!
[ Domoticz 3.5196 | Win10 | AeoTec Z-Stick Gen5 ]
jrich523
Posts: 63
Joined: Monday 18 January 2016 21:43
Target OS: Windows
Domoticz version: 3.5196
Location: Seattle, WA
Contact:

Re: Auto off if triggered on

Post by jrich523 »

How does this look?

Image


I should really start writing lua, probably easier...
[ Domoticz 3.5196 | Win10 | AeoTec Z-Stick Gen5 ]
jrich523
Posts: 63
Joined: Monday 18 January 2016 21:43
Target OS: Windows
Domoticz version: 3.5196
Location: Seattle, WA
Contact:

Re: Auto off if triggered on

Post by jrich523 »

hmm was just thinking about it, i should probably move the off part outside of the If, that way if its not within time, it jsut turns it off, waiting for next trigger
[ Domoticz 3.5196 | Win10 | AeoTec Z-Stick Gen5 ]
andy891212
Posts: 2
Joined: Thursday 25 January 2018 21:59
Target OS: Windows
Domoticz version:
Contact:

Re: Auto off if triggered on

Post by andy891212 »

jrich523 wrote: Monday 10 October 2016 18:53 I have a motion zone setup in blue iris that will run a script. that script should turn on my front light but turn it off after 15 min. however I only want it to turn off automatically if its turned on by the trigger but not if i manually turn it on.

because the API only lets me turn a device on/off and i cant access events from the API, im thinking the only way around this is to put the event to a virtaul device or device group but then i'd want to hide it, and i dont see that available.

any thoughts on how i can do this?
Hi, would you be prepared to share how you did this
I have Blue Iris installed on a server and want to switch on my Philips Hue lights on my drive when the camera detects movement, from the post here it looks like its only active after sunset?

if you could help me get this setup i'd appreciate any assistance given
User avatar
C4rtm4N
Posts: 53
Joined: Saturday 07 February 2015 21:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: UK
Contact:

Re: Auto off if triggered on

Post by C4rtm4N »

andy891212 wrote: Thursday 25 January 2018 22:11
Hi, would you be prepared to share how you did this
I have Blue Iris installed on a server and want to switch on my Philips Hue lights on my drive when the camera detects movement, from the post here it looks like its only active after sunset?
I have a similar setup that you can replicate

I've set up a dummy switch in Domiticz and assigned it a motion sensor type.
Blue Iris is set up to send an alert on a particular camera using the "Request from a web service" action using the following code

Code: Select all

<Dom IP>:<Dom Port>/json.htm?type=command&param=switchlight&idx=<your switch idx>&switchcmd=On
"Request when trigger is reset" is checked and it sends the corresponding Off command, essentially making the camera another PIR.

I use different profiles in Blue Iris depending upon whether it's daytime, after dark or my alarm is set. The first 2 are inbuilt functionality but the 3rd is controlled by another script that Domoticz runs when it sees that my alarm is set.
andy891212
Posts: 2
Joined: Thursday 25 January 2018 21:59
Target OS: Windows
Domoticz version:
Contact:

Re: Auto off if triggered on

Post by andy891212 »

C4rtm4N wrote: Friday 26 January 2018 14:00
andy891212 wrote: Thursday 25 January 2018 22:11
Hi, would you be prepared to share how you did this
I have Blue Iris installed on a server and want to switch on my Philips Hue lights on my drive when the camera detects movement, from the post here it looks like its only active after sunset?
I have a similar setup that you can replicate

I've set up a dummy switch in Domiticz and assigned it a motion sensor type.
Blue Iris is set up to send an alert on a particular camera using the "Request from a web service" action using the following code

Code: Select all

<Dom IP>:<Dom Port>/json.htm?type=command&param=switchlight&idx=<your switch idx>&switchcmd=On
"Request when trigger is reset" is checked and it sends the corresponding Off command, essentially making the camera another PIR.

I use different profiles in Blue Iris depending upon whether it's daytime, after dark or my alarm is set. The first 2 are inbuilt functionality but the 3rd is controlled by another script that Domoticz runs when it sees that my alarm is set.
Thanks C4rtm4N
it works perfectly switching on the light.
Can you advise How you switch off. I tried changing the code from On to Off but the light just starts dimming/flickering for about 10 mins before finally switching off
User avatar
C4rtm4N
Posts: 53
Joined: Saturday 07 February 2015 21:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: UK
Contact:

Re: Auto off if triggered on

Post by C4rtm4N »

andy891212 wrote: Sunday 28 January 2018 20:55 Can you advise How you switch off.
I'm using exactly the same code, just with switchcmd=Off at the end
The bottom "Timer" option is also set to wait at least 0.1 minutes between requests

On the Motion/Trigger tab I have set a 20 sec "end trigger unless re-triggered" time as it's an indoor camera that I'm using as an additional PIR.

I'm using an old version of Blue Iris (3.58), hopefully this doesn't make a difference
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest