Jump to content
  • 0

Lights ON and OFF only in the morning


jk_34

Question

Hey!

I just recently bought FIBARO Home Center 2 and some smart z-wave products. Still have a lot to learn! I've created 2 easy scenes:

1) when motion sensor detects motion then my kitchen's lamp goes ON;

2) when it does not detect motion for 30 sec then the lamp goes OFF.

 

It works fine, but my question is how can I make this happening ONLY between 5.00-6.00?

Edited by jk_34
Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

May I counter with another question... 

Why don't you do it with the LUX value from the motion sensor?

 

Some years ago, I had the same question to myself and after I fixed it, I have noticed that a fixed time is not very smart.

Because I need light in the dark isn't it?

 

...
local scene = 15 -- ID of the Scene
local motion = 224 -- ID motion sensor
local switch = 249 -- ID Relay Switches
local lux = 226 -- ID Lux sensor
...

if (tonumber(fibaro:getValue(motion, "value")) > 0 ) and ( tonumber(fibaro:getValue(lux, "value")) < 5 ) and (tonumber(fibaro:getValue(switch, "value"))) < 1 then...

 

regards

Simon

 

Link to post
Share on other sites
  • 0

You can make another scene that starts that scene at 5 and terminates it at 6. (This scene needs the option to autostart when HC2 starts)

Link to post
Share on other sites
  • 0

Hey,

Thank you for your answers!

 

Simon - I tried that, but it does not work for me. I use the same lamp for two things: In the morning I want it to be motion trigged, but in the evening my wife wants to keep it on all the time between 15.00-22.00, so LUX value is a great idea, but not in my case.

 

Stiven - that will work! What do you mean by "This scene needs the option to autostart when HC2 starts" ?

Link to post
Share on other sites
  • 0

Did you do it in Lua or block scene?

Please try to use All-in-One Scene

Very easy  to implement exactly what you need....

Edited by cag014
Link to post
Share on other sites
  • 0
8 hours ago, jk_34 said:

Hey,

Thank you for your answers!

 

Simon - I tried that, but it does not work for me. I use the same lamp for two things: In the morning I want it to be motion trigged, but in the evening my wife wants to keep it on all the time between 15.00-22.00, so LUX value is a great idea, but not in my case.

 

Stiven - that will work! What do you mean by "This scene needs the option to autostart when HC2 starts" ?

When you create a new scene, at the bottom where there are the options such: 

Scene is hidden

Scene auto-starts when HC2 starts

Do no stop when alarm is on.

The second one should be ticked so even if the hc2 restarts, the scene runs automatically. 

Link to post
Share on other sites
  • 0

Hey,

Stiven - Thank you!

 

cag014 - I only create scenes using "magic scenes" or "graphic blocks". This time is was blocks. I do not know how to create scenes using LUA yet. Your All-in-One Scene looks interesting. Any recommendations regarding good place where I can start learning about creating LUA scenes?

Link to post
Share on other sites
  • 0

You can start here

https://manuals.fibaro.com/knowledge-base-browse/getting-started-with-lua/

 

By the way meanwhile  to implement what you need just add line below to jM{} table in  All-in-One Scene

Assuming your sensor ID=700 and light ID=800 (change IDs according to your setup)

{0,"700",{state="value=true", timeSlot="05:00~06:00", trueAct={"800","turnOn",""}, falseAct={"800","turnOff","30"} }},

 

As I said, few seconds and you done. no LUA knowledge required...

Edited by cag014
  • Like 1
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...