Jump to content
  • 0

Increase light on movement in specific time


Question

Hello, 

 

i am controlling my garden lights with 2 scenes, one for sunset and one for sunrise. And it’s working perfectly I usually have lights dimmed at  30%.

 

I would like to know if it’s possible to add a scene where, if there is a motion it will increase the lights by 30% or to put it to max level for 3 minutes and then back to the previous condition. 

 

Another scene could also work, if there is a motion lights up to 100%, and when if there is no

motion for 3 minutes lights to 30%.

 

in both cases I would like this scene to work only between 22:00 and 07:00.

 

is it possible to make such a scene ? 

 

Thanks in advance ! 

 

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
8 hours ago, M.F.Harmouch said:

is it possible to make such a scene

Yes, you can. Googled by forum some ready for use solution like mini frameworks from @Sankotronic very smart lights or from our old LUA hacker @jgab ;) 

also you can compose this by blocks without any scripts 

Link to post
Share on other sites
  • 0
On 7/26/2019 at 8:22 AM, 10der said:

Yes, you can. Googled by forum some ready for use solution like mini frameworks from @Sankotronic very smart lights or from our old LUA hacker @jgab ;) 

also you can compose this by blocks without any scripts 

And for completeness ;), the ER rules for that scenario would look like (extra check so it works if sunset/sunrise falls in-between 22:00 and 07:00)

 gardenLights={33,55,77,88} -- Garden light IDs. Assumed dimmable. Could be loaded from HomeTable
 gardenMotions={65,32} -- Garden motion sensors. Could be loaded from HomeTable

 Rule.eval("@sunset-00:10 => gardenLigths:value=30") -- Garden lights on (dim to 30%) at sunset-10min
 Rule.eval("gardenMotions:breached & 22:00..07:00 & gardenLigths:isOn => gardenLigths:value=100") -- If breached light 100% (if lights are on)
 Rule.eval("for(00:03,gardenMotions:safe) & 22:00..07:00 & gardenLigths:isOn => gardenLigths:value=30") -- If safe for 3min light 30% (if lights are on)
 Rule.eval("@sunrise+00:10 => gardenLigths:off") -- Garden lights off at sunrise+10min

 

Edited by jgab
  • Thanks 1
Link to post
Share on other sites
  • 0

Thank you for the help :) will be testing it !

2 minutes ago, M.F.Harmouch said:

Thank you for the help :) will be testing it !

 

2 hours ago, jgab said:

And for completeness ;), the ER rules for that scenario would look like (extra check so it works if sunset/sunrise falls in-between 22:00 and 07:00)

 gardenLights={33,55,77,88} -- Garden light IDs. Assumed dimmable. Could be loaded from HomeTable
 gardenMotions={65,32} -- Garden motion sensors. Could be loaded from HomeTable

 Rule.eval("sunset-00:10 => gardenLigths:value=30") -- Garden lights on (dim to 30%) at sunset-10min
 Rule.eval("gardenMotions:breached & 22:00..07:00 & gardenLigths:isOn => gardenLigths:value=100") -- If breached light 100% (if lights are on)
 Rule.eval("for(00:03,gardenMotions:safe) & 22:00..07:00 & gardenLigths:isOn => gardenLigths:value=30") -- If safe for 3min light 30% (if lights are on)
 Rule.eval("sunrise+00:10 => gardenLigths:off") -- Garden lights off at sunrise+10min

 

Thanks a lot, This sounds exactly what i am looking for :)

5 hours ago, 10der said:

Yes, you can. Googled by forum some ready for use solution like mini frameworks from @Sankotronic very smart lights or from our old LUA hacker @jgab ;) 

also you can compose this by blocks without any scripts 

 

Thank You appriciated !

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...