Control node-red-contrib-ramp-thermostat via dashboard

Hi folks,

I'm experimenting with the node-red-contrib-ramp-thermostat node, which is a very useful contribution. Now it should be integrated into my dashboard, which means the WAF factor should be extremely high!

I assume it should be working like this (but other suggestions are welcome!):

  1. The flow will schedule automatically some 24-hour profile (using setProfile) at a certain time. For example:

    • On monday at 00:00 it will schedule profile 'bathroom_workdays'.
    • On saturday at 00:00 it will schedule profile 'bathroom_holiday'.

    This way the bathroom will be heated at fixed time intervals, as specified in the profile (temperature graph).

  2. However some day my lovely wife comes home earlier, and wants to override the default profile and set the temperature now manually to 25°C (using setTarget). This means she should be able to enter the desired temperature and activate it in the dashboard.

  3. Afterwards she wants to switch on the current profile again, to make sure that the next day the bathroom is heated again automatically at the predefined times.

  4. But the next day she remembers suddenly that she has a day holiday, so she wants to override the current active profile ('bathroom_workdays') by another profile 'bathroom_holiday'. But multiple profiles might be available, from which she wants to select a profile.

The only example I could find is Peter's blog. But I have no idea how to make a userfriendly dashboard that provides this kind of functionality.

So if anybody have examples, screenshots, perhaps ideas from other systems, or whatever ...

Thanks !

1 Like

For the profiles you could have a dropdown list of profiles to select from and make it so that it reverts to the default profile at the end of the day (or whatever). For manual temp have an Override switch and a temperature select (I use a drop down with 0.5 degree intervals for this, but you could use an up/down selector.

Hey Colin,

You mean two separate buttons, one with '+' and one with '-'. Or something else?

That might indeed be a good idea!

Simple but accaeptable for wife version 0.0 I think...

Thanks already!

The dashboard Numeric Input has up/down buttons.


Suppose I show the current temperature for every room, and a switch to edit the temperature manually:


But then I don't have place anymore to show a dropdown (with profiles or temperature values). Could you please share a screenshot of how your screen layout looks like?

Why not add in Alexa so wife can just tell Alexa what mode to run in? I'll bet wife 0.0 could get into that. :joy:

1 Like

ecobee has a nice feature when changing the temperature manually.
In the options, you can set “keep for two hours”, “keep for four hours”, “keep changes until next scheduled profile”, “keep changes until I change it”, “decide at time of change”.

1 Like

Hi Seth,

About your ecobee idea:


That might indeed be a good option, because this way you don't have to remember that you have to enable afterwards the original profile again.

So I assume this means that - as soon as I switch to manual mode - I need to show a popup dialog, where I can set the new temperature manually AND select how long this temperature should be active.

Let the good ideas come...

1 Like

Indeed sir.
That seems to be the simplest way. ecobee also has the option to average all of the room temperatures, or act on the temperature in the room that has occupancy. Ecobee calls this their “Follow Me” option.

The sensors have motion sensing and temperature.

Also, the mode won’t be truly manual. Unless you want the “Until I change it” option, then it acts as a standard thermostat. All other options are automatic.

Ecobee also provides a cancel button when the scheduled profile has been deviated from. Hitting the cancel button resumes normal schedule.

So if current setpoint does not equal scheduled setpoint, show cancel button. Then have the click event set current setpoint to scheduled setpoint.

1 Like

Here is an example how to read a profile and show the chart in the dashboard.



[{"id":"33aa1cd.c73cce4","type":"ui_chart","z":"6da90f72.dff58","name":"","group":"251e880a.3e91e8","order":0,"width":"10","height":"5","label":"{{msg.label}}","chartType":"line","legend":"false","xformat":"HH","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":650,"y":120,"wires":[[],[]]},{"id":"702e7146.70cdc","type":"ramp-thermostat","z":"6da90f72.dff58","name":"profiles","profile":"456075b4.05240c","hysteresisplus":"1","hysteresisminus":"1","x":340,"y":120,"wires":[[],[],["7afc28cc.743e08"]]},{"id":"7afc28cc.743e08","type":"function","z":"6da90f72.dff58","name":"map","func":"var p = msg.payload;\nvar c = {};\ = [];\nvar data = [];\n\np.points.forEach(function(point) {\n    var key = Object.keys(point);\n    data.push({\"x\": \"2018-11-21T\"+key+\":00\", \"y\":point[key]});\n});\n\nc.series = [\"Profile\"];\ = [data];\nc.labels = [\"\"];\n\nmsg.label =;\nmsg.payload = [c];\n\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":120,"wires":[["33aa1cd.c73cce4"]]},{"id":"208cc6eb.54a05a","type":"inject","z":"6da90f72.dff58","name":"","topic":"getProfile","payload":"office","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":120,"wires":[["702e7146.70cdc"]]},{"id":"251e880a.3e91e8","type":"ui_group","z":"","name":"Profile","tab":"42b914b0.66a0ac","disp":true,"width":"10","collapse":false},{"id":"456075b4.05240c","type":"profile","z":"","name":"office","time1":"00:00","temp1":"18","time2":"04:00","temp2":"18","time3":"08:00","temp3":"20.5","time4":"12:00","temp4":"20.5","time5":"12:00","temp5":"19","time6":"12:30","temp6":"19","time7":"13:30","temp7":"20.5","time8":"19:00","temp8":"20.5","time9":"19:00","temp9":"18","time10":"23:59","temp10":"18"},{"id":"42b914b0.66a0ac","type":"ui_tab","z":"","name":"Main","icon":"dashboard","order":1}]
1 Like

Hey Flurin,
that is indeed one of the things that I need on my dashboard !!! Thanks!

Hey @cflurin,

that seems to be working fine in my system. Two minor remarks:

  • By default the current active status is displayed in the flow editor:


    But as soon as I get a profile, the status is updated:

    Wouldn't it be better to keep the original status, so you see immediately (in the flow) which profile is currently active. Think that is more useful as displaying which profile has been get, since a lot of (inactive) profiles might be available (and might be get for displaying).

  • This might be a nice flow to add in the getProfile section of your readme page.

I'd use an additional ramp-thermostat instance for this purpose instead of input getProfile to an existing node. This way you don't need to filter the output 3.

I'll upload some examples to the Wiki, but the access to the Wiki is open to everyone :slight_smile:

1 Like

Just quickly browsing through this thread.

FYI: I have setup the following:

  1. Within google calendar I have defined a specific calendar "central heating".
  2. In that calendar I create a repetitive event from 6:30 till 7:00 with a description like "21°C"
  3. In nodered I am using the google calendar node that is listening to my "central heating" calendar.
  4. Whenever node-red receives such a calendar event, it will set the heating to the specified temperature and it will also assure that the heating is switched off again when the end period is reached.

That is in a nutshell my setup (at least the scheduled part).

The nice thing is that you can use the powerful google calendar user interface to manage your heating settings and in my case I am already using the google calendar to manage all the family activities.


I like this node allot.... THe hysterisis function keeps me from wearing out relays prematurely.

I also use this node for pH control.... During the day, I have a setpoint of 6.5, and during the night I bump it to 6.8... Heavily planted aquariums and I just don't need the CO2 pumping into the system at night, outside of the photo period (active photosynthesis). The only caveat of course is with Temp control, where you are heating, the node rightfully assumes reverse acting.. but of course pH control, through CO2 injection, will be direct acting... so you have invert your output for pH control. I do wish this Node had more documentation for interacting with it through the dashboard... I'm going to explore what many you have done with...

For other 'time related' functions I use the ui-scheduler because of it's interactivity.... and the ability to archive and restore events that is shown in the documentation works well. I use the UI-Scheduler object to trigger daily dosing pumps as one example. This one time event.... allows me to work with the dosing pumps at other times without messing with a the ui-scheduler won't insist on enforcing any commands outside of that 1 single-shot event that I schedule...

I use another Scheduler Node (Light Scheduler) for doing highly repetitive tasks (e.g. turning on a wave pump for 5 minutes every hour)... But that node too is only editable through the Editor... and not the dashboard.

Back to the ramp-thermostat node: I much prefer it to the PID node. It's a very nice complement to NodeRed.

The ramp thermostat node is an excellent node if you can tolerate the cycling inherent in on/off control with hysteresis. If you need more accurate control a well tuned PID controller will always be better.

1 Like

The ramp t/stat node can be setup via the dashboard, but you have to design the UI yourself to match your requirements. If the node were closely integrated with the dashboard then you would not be able to use it with uibuilder or other UI.

Totally agree. My process are very slow reacting... and the control outputs are simple on/off control... so there's nothing to be gained by applying proportional action... So the simple ramp-thermo w/ it's hysterisis is as tight and precise as I need for these applications..

I'll have to do some research on the node and see what I can pass in and out of it to interact with the dashboard. I always forget about the needs of UIBuilder as the general dashboard has been sufficient for me.