Time scheduled light sequence

#1

Hello, im still pretty new to Node-RED and hoped maybe someone with a bit more experience could help me with a problem im trying to solve.

I have made a light sequence combined with a audio clip. Timestamp is set to go in a continuing loop and once the sequence is finished it restarts, this all works out fine.

My problem is that I want to combine the light and sound sequence with for example the Big Timer or Timeswitch nodes, but I cant figure out how. My goal is to have the sequence start at 09:00 and stop at 18:00 every day. Anyone got an idea about how to set this up?

0 Likes

#2

Take a look at this flow in the cookbook
https://cookbook.nodered.org/basic/route-on-context

set a value if it’s within the time you want to play (eg true / false) and then use a switch that only passes the message on if your context value is true

0 Likes

#3

@Ben, you could also take a look at node-red-contrib-time-range-switch. I think it does what you want.

0 Likes

#4

Thanks for the feedback and quick replies. Tried both solutions and now it works like i wanted it to!

0 Likes