Node-red thermostat control

Just found a nice bit of code to draw a ‘nest’ thermostat control which may be of use for those using the openergymonitor MQTT WiFi relay for controlling heating, and to integrate it into emoncms.

The original code was written by Dal Hundal, and it has been ported to node-red by Automatikas.
The node-red version runs really well, and can easily be controlled by holding your finger on the dial for 2 seconds, and then swiping to set the temperature. I’ve attached a couple of screenshots below to demo.

When I get some time, I plan to separate out the css & javascript from the flow and then link to the files via a static folder, so all that is needed in the flow to draw the control would be a template node with links to the scripts plus <div id="thermostat"></div> (3 lines of code)

Paul

2 Likes

Wow! That came out really nice.

Since it is so good I am guessing that once giggle finds it they’ll send a cease and desist… (I’m just a wet blanket today!)

…if the control was combined with Pete Scargill’s node-red timer control, it’s pretty much a ‘nest’, especially if you average out the temps to achieve a ‘learning’ capability…

Paul

1 Like

I’ve not tried the big timer. I’ll now need to download & give it a try. With his node-red flow I wonder if he does PID control or something else…

A couple of weeks ago I retired my nest. It always frustrated me by leaving the heat (or the A/C) on for too long. Their span between HVAC on and HVAC off was too wide. (I think they call that the maintenance band).

Do you use Node-RED and Pete’s big timer for your HVAC control?

No, not yet. Currently, emoncms monitors room temp & weather, and I have a MQTT WiFi relay to fire the boiler, but I need to be confident that controls are in place that the whole family can use, and safeguards are there to ensure consistent performance.
…this takes me a step nearer…

I’ve asked Pete already if he’s using a PID, but he just replied that ‘he’d got it sorted’ without going into detail.

Paul

1 Like

Now done, so all that is needed, is to git clone the repo into your node-red static folder (example in the README), and include the following code in a template node;

`

`

An example flow is also included in the repo.

Paul

2 Likes

Thanks for this Paul, you’ve really got me started down the node-red dashboard route and loving it so far.
In fact, can’t seem to go near computer without stopping to make a tweak or fix to a flow, it’s addictive!

Using your flow and got values from emon mqtt wifi relay thermostat going into nest display (so ambient temperature and status (just converting 0 to off and 1 to heating).
Got node-red bigtimer installed, fully intend to play and perfect complete node-red thermostat control. Probably this weekend as home alone.

1 Like