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

**URL:** <https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006>\
**Category:** Dashboard\
**Created:** [18 November 2018 15:45 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006 "2018-11-18T15:45:56Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [18 November 2018 15:45 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/1 "2018-11-18T15:45:56Z")

</div>

Hi folks,

I'm experimenting with the [node-red-contrib-ramp-thermostat](https://github.com/cflurin/node-red-contrib-ramp-thermostat) node, which is a very useful contribution. Now it should be integrated into my dashboard, which means the [WAF](https://en.wikipedia.org/wiki/Wife_acceptance_factor) 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](https://github.com/cflurin/node-red-contrib-ramp-thermostat#setprofile)) at a certain time. For example:

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](https://github.com/cflurin/node-red-contrib-ramp-thermostat#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](https://tech.scargill.net/a-thermostat-weekend/). 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 !  
Bart

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 November 2018 16:10 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/2 "2018-11-18T16:10:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [18 November 2018 16:35 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/3 "2018-11-18T16:35:35Z")

</div>

Hey Colin,

> [@Colin](#):
>
> up/down selector

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

> [@Colin](#):
>
> drop down with 0.5 degree intervals

That might indeed be a good idea!

> [@Colin](#):
>
> Override switch

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

Thanks already!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 November 2018 16:46 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/4 "2018-11-18T16:46:20Z")

</div>

> [@BartButenaers](#):
>
> You mean two separate buttons, one with '+' and one with '-'. Or something else?

The dashboard Numeric Input has up/down buttons.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [18 November 2018 17:55 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/5 "2018-11-18T17:55:27Z")

</div>

Colin,

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

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/ada2b68547dfde6f867870fd02148cd6d179873b.jpeg)

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?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 November 2018 17:57 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/6 "2018-11-18T17:57:09Z")

</div>

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. 😂

---

<div class="post-metadata">

**Author:** ![seth350](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seth350/32/4617_2.png) [@seth350](https://discourse.nodered.org/u/seth350)\
**Post date:** [18 November 2018 18:30 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/7 "2018-11-18T18:30:05Z")

</div>

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”.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [18 November 2018 19:11 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/8 "2018-11-18T19:11:43Z")

</div>

Hi Seth,

About your [ecobee](https://support.ecobee.com/hc/en-us/articles/115000267647-How-to-change-the-Hold-Action-on-your-ecobee-thermostat-) idea:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/711274ce3e7677fddc382613a849e353de4b48de.jpeg)

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...

---

<div class="post-metadata">

**Author:** ![seth350](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seth350/32/4617_2.png) [@seth350](https://discourse.nodered.org/u/seth350)\
**Post date:** [18 November 2018 19:12 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/9 "2018-11-18T19:12:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [21 November 2018 16:51 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/10 "2018-11-21T16:51:26Z")

</div>

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

![getProfile](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/1c96587cce95c290309db71cb968282a821b1753.png)

![profile-chart](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f421d75243aac3e54a68ccbe3e0bf01ec9254f4c.png)

```auto
[{"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 = {};\nc.data = [];\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\"];\nc.data = [data];\nc.labels = [\"\"];\n\nmsg.label = p.name;\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}]

```

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [21 November 2018 17:41 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/11 "2018-11-21T17:41:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [21 November 2018 22:46 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/12 "2018-11-21T22:46:10Z")

</div>

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:

- This might be a nice flow to add in the [getProfile](https://github.com/cflurin/node-red-contrib-ramp-thermostat#getprofile) section of your readme page.

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [22 November 2018 11:07 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/13 "2018-11-22T11:07:23Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/janvda/32/234_2.png) [@janvda](https://discourse.nodered.org/u/janvda)\
**Post date:** [22 November 2018 16:03 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/14 "2018-11-22T16:03:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SonoraTechnical](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sonoratechnical/32/20033_2.png) [@SonoraTechnical](https://discourse.nodered.org/u/SonoraTechnical)\
**Post date:** [21 May 2021 16:36 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/15 "2021-05-21T16:36:47Z")

</div>

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 scheduler..as 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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 May 2021 20:09 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/16 "2021-05-21T20:09:48Z")

</div>

> [@SonoraTechnical](#):
>
> Back to the ramp-thermostat node: I much prefer it to the PID node.

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 May 2021 20:13 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/17 "2021-05-21T20:13:01Z")

</div>

> [@SonoraTechnical](#):
>
> But that node too is only editable through the Editor

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.

---

<div class="post-metadata">

**Author:** ![SonoraTechnical](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sonoratechnical/32/20033_2.png) [@SonoraTechnical](https://discourse.nodered.org/u/SonoraTechnical)\
**Post date:** [21 May 2021 23:13 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/18 "2021-05-21T23:13:12Z")

</div>

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..

---

<div class="post-metadata">

**Author:** ![SonoraTechnical](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sonoratechnical/32/20033_2.png) [@SonoraTechnical](https://discourse.nodered.org/u/SonoraTechnical)\
**Post date:** [21 May 2021 23:15 UTC](https://discourse.nodered.org/t/control-node-red-contrib-ramp-thermostat-via-dashboard/5006/19 "2021-05-21T23:15:22Z")

</div>

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.
