Setting up a three-way output (not on/off) scheduler?



I am a complete newbie on Node Red and I have some problems. I am trying to implement a three-mode thermostat control (home, night, away) to choose target temperature based on these three conditions. However, I got stuck in the beginning: I can't find a way to have anything to set-up that is not just on/off but supports three-way outputs.

My plan is to have a night mode from 2230 to 600 on weekdays and from 2230 to 800 on weekends, then day mode from 600 to 800 and 1600 to 2230 on weekdays and 800 to 2230 on weekends and away mode during the rest (that is 800 to 1600 on weekdays) or if i manually select away mode to be active. the plan is that I could define the target temperatures for each state and the system would select the corresponding mode and set target temperature accordingly (only one state is active at any point of the day).

What should I do? I had a look at light scheduler which seems to be good for a schedule, however it only has two outputs (on/off) and can't think of a method to have three cases based on a schedule in a single topic. Or how should I merge three different schedulers?



Have a look here at node-red-contrib-thermostat
I've just published a new version (v0.6.0)

You can set unlimited profiles for weekend, holiday, party or whatever.

1 Like


If scheduling is the issue (as opposed to thermostat control as suggested by cflurin) - keep things simple and use 3 separate schedule nodes.

Here is an example for the lamp by our front door:


I also keep track of day/night which I can use for dynamically turning on some lights if there is movement in the house at night-time for example.

I'm mainly using Pete Scargill's scheduling node here so that I can also use sunset/sunrise.