Thermostat and save config after reboot system

Hello. Installed Node-Red to work with esp8266 in iot.

I want to adjust the heating control according to the set temperature obtained from 18B20, as well as according to the set days and times.
Tell me, how can I solve this without writing code?

I also want to know if it is possible to make sure that the chain settings do not go astray after rebooting the computer or node-red? That those sliders, the buttons that I pressed, would return after the reboot, but everything would not go astray!

Thank you in advance, and I apologize for my English.

The best way of learning Node-RED is to have a "play".
There are nodes that can send a message at set times (such as
there are nodes that are designed to mimic a thermostat (such as

I would start by looking at those, the cookbook and flows that you can download from


I solve these problems by using retained topics in MQTT to keep the current system state. So when the system is restarted the previous values automatically set switches etc to the required states.

1 Like

Guys, thank you for the answers, I read the Cookbook, thanks for the link.
I would like to know how to implement such a scheme.
Turning on the load according to the temperature sensor, the schedule certain days and times, and also that it would be possible to control the switch to turn the load on or off, regardless of the schedule.

I do not quite understand how this can be implemented, do not tell me?

What scheme? There are several different suggestions. What have you tried? Where are you stuck?

Yes you could have an over ride switch. But how to do it will depend on what you have done.

1 Like

What parts do you not understand and what steps have to taken to research what it means?
You can find about MQTT at

1 Like

What do you want the switch to do?

1 Like

You could include an switch by having a separate flow. That sets a context value to “on” or “off”

In you existing flow you then include a switch
that checks on the context value.
If the context value is “on” the message gets passed. If it’s “off” the message stops.

There’s a page in the docs about working with context values and flows in the cookbook.

For the temperature setting it’s the same way just storing the temp rather than on and off

1 Like

I want to be able to control the thermostat with a switch, that is, I turned on the thermostat with a button in the web interface and it works, it automatically maintains the set temperature, it turns on and off itself when the threshold is reached.
And also I want to be able to start the thermostat on a schedule.
If I make a second chain, yes, I can send commands true or false with a button and these commands will come to the pin, but the first chain is not disabled and it will send commands in parallel, and enable or disable accordingly.
So I’m thinking how to implement the scheme ....

This one of the ideal uses of MQTT. Feed all of your control mechanisms (switches, schedulers etc) into an MQTT topic. Then drive the pin from MQTT. By funnelling everything through MQTT any of the schemes can control it. Also pick up the topic from MQTT and feed it back into the input of the switch so that if, for example, the schedule changes it then the switch on the dashboard will update to the correct state. By making the topic Retained then it will even remember the state over a system reset or deploy. Finally you can even control it from a different device on the network by sending it to the central MQTT server.


No by integrating a switch that checks the value of the second flow you can stop messages flowing within the first flow.

As this flow in the cookbook demonstrates

1 Like

I think I misunderstood the requirement