I have a motion detector on the patio that turns on lights when motion detected and turns off after 10 minutes. Problem I am having is let say I go back after 8 minutes. Motion detector picks up the motion yet the lights turn off after only 2 minutes due to the original comand. Is there anyway to have it overwrite the previous command so the lights remain on for the full 10 minutes everytime the motion dector picks up motion?
Announcement
Collapse
No announcement yet.
Motion detector overwrite
Collapse
X
-
jdlsTags: None
-
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD class=tablecellscript noWrap align=right width=160>Code:[URL="http://localhost:9000/actn7725&action_index=1&edit=1"][B][COLOR=#0000ff]Run script:[/COLOR][/B][/URL] </TD><TD class=tablecellscript align=left>&hs.DeleteEvent "Closet (delayed action)"</TD></TR></TBODY></TABLE><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD class=tablecelldevice noWrap align=right width=160> [URL="http://localhost:9000/actn7725&action_index=2&edit=1"][B][COLOR=#0000ff]Device Command:[/COLOR][/B][/URL] </TD><TD class=tablecelldevice align=left>Library Closet On</TD></TR></TBODY></TABLE><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD class=tablecelldevice noWrap align=right width=160> [URL="http://localhost:9000/actn7725&action_index=3&edit=1"][B][COLOR=#0000ff]Device Command:[/COLOR][/B][/URL] </TD><TD class=tablecelldevice align=left>Library Closet Off Delay: 00:00:30</TD></TR></TBODY></TABLE>
Or you can get really complex using mcs Movement or Doo Motion PLugins.
--DanTasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.
Comment
-
You don't need a script...
There is an action that can delete a previously created delayed action or event and thus you don't need a script. You can create an event that has the following actions
1. Delete delayed action for the device (if it exists)
2. Turn on light
3. Turn off light in 10 minutes
At 8 minutes when motion is detected again, the event will fire; delete the existing delayed action and create new one to turn off the light 10 minutes later.
See the example belowJames
Running HS 3 on Win10 .
Comment
-
James,
does that work now? I used that in the past, it never did work for me...as it couldn't find items with (delayed event) tagged on...my guess...but it couldn't delete delayed events, so I started using the script method...
--DanTasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.
Comment
-
jdls
Gentlemen----Thank you for the quick response. I am going to try both however where exactly would I put the script line? I have no experience with scripts.
Comment
-
Originally posted by drozwood90 View PostJames,
does that work now? I used that in the past, it never did work for me...as it couldn't find items with (delayed event) tagged on...my guess...but it couldn't delete delayed events, so I started using the script method...
--DanJames
Running HS 3 on Win10 .
Comment
-
Originally posted by jdls View PostGentlemen----Thank you for the quick response. I am going to try both however where exactly would I put the script line? I have no experience with scripts.
"OR Script Statement:
ie: &hs.speak "hello"James
Running HS 3 on Win10 .
Comment
Comment