# Issue with Heater node, not heating

**URL:** <https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409>\
**Category:** General\
**Created:** [16 June 2020 13:50 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409 "2020-06-16T13:50:47Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keirtje](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@Keirtje](https://discourse.nodered.org/u/Keirtje)\
**Post date:** [16 June 2020 13:50 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/1 "2020-06-16T13:50:48Z")

</div>

Hi, as not all to experience with Node Red, I am having an issue with the node-red-contrib-heater-controller. All works fine, but how does it turn on my heater?

The node will work just fine on my dashboard, temperatures are displayed and the heaterStatus is updated as it should. N

I want it to turn a switch, I am using a Shelly 1 for this. I only need to switch a DC voltage of 12V. Injecting an on / off to the Shelly will flick the switch.

But what do I need to do to have the heater node to control the switch, I think I am missing something?

(how to insert my flow into this post??)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/5/75ecf3ec19ed551a91189a935e523c2a8f00f0df.png)

---

<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:** [16 June 2020 14:00 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/2 "2020-06-16T14:00:02Z")

</div>

According to the node's [readme](https://flows.nodered.org/node/node-red-contrib-heater-controller):

## Output

A message is emited when the status is recalculated (when the user is changing the target temperature or a new input message is received)

So you will need to look at that output, determine what to do and thenturn the switch on/off. How you do that will depend on what the shelly needs and having a node to communicate with the Shelly (I don't own a Shelly so I can't tell you exactly how to do it)

---

<div class="post-metadata">

**Author:** ![mtoko](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mtoko/32/138_2.png) [@mtoko](https://discourse.nodered.org/u/mtoko)\
**Post date:** [16 June 2020 14:01 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/3 "2020-06-16T14:01:45Z")

</div>

Shelly 1 has MQTT support so you could use an MQTT node to communicate

Shelly1 MQTT docs are here  
[https://shelly-api-docs.shelly.cloud/#mqtt-support](https://shelly-api-docs.shelly.cloud/#mqtt-support)

---

<div class="post-metadata">

**Author:** ![Keirtje](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@Keirtje](https://discourse.nodered.org/u/Keirtje)\
**Post date:** [16 June 2020 14:05 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/4 "2020-06-16T14:05:39Z")

</div>

I do use MQTT to control the Shelly, it also give me the temperature.

Via the ON / OFF injection to the Shelly it will turn on/off  
I have tried all I could think of. but not sure how the heater node will make this work.

 ![node](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/52e7c0402e535810ed4ca13a883dd09b64e544b3.jpeg)

---

<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:** [16 June 2020 14:11 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/5 "2020-06-16T14:11:34Z")

</div>

Start by putting a debug node on the output of the heater node and see what comes out (I see you have done that alread). Then, read the node red docs page Working with Messages which should help you convert that data to whatever you need to send to MQTT.  
If you can't work it out then show us what you see in the debug node and tell us what it needs to be converted to.

---

<div class="post-metadata">

**Author:** ![Keirtje](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@Keirtje](https://discourse.nodered.org/u/Keirtje)\
**Post date:** [16 June 2020 14:15 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/6 "2020-06-16T14:15:33Z")

</div>

The only that seems to be changing is the "currentheaterstatus" this is either on or off.

16-6-2020 15:22:04[node: bdc94203.ef713](http://192.168.0.133:1880/#)shellies/shelly1-500291F0142B/relay/0/command : msg.payload : Object

object

currentTemp: 19.2

targetValue: 22

isUserCustom: true

currentSchedule: object

nextSchedule: object

userTargetValue: 22

currentHeaterStatus: "on"

time: "16-6-2020 15:22:05"

I guess I would need to use this, to control the Shelly 1

```auto
[{"id":"30e1839a.cade6c","type":"exec","z":"8c99ec05.74e658","command":"sleep 20","addpay":false,"append":"","useSpawn":"false","timer":"10","oldrc":false,"name":"","x":420,"y":423,"wires":[["dccd5011.4926e"],["64252707.f9e7"],["a9768a27.692d6"]]},{"id":"127167a5.30506","type":"inject","z":"8c99ec05.74e658","name":"Go","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":124,"y":389,"wires":[["30e1839a.cade6c","7d39cdd0.42cc64"]]},{"id":"dccd5011.4926e","type":"debug","z":"8c99ec05.74e658","name":"OP/1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":590,"y":383,"wires":[]},{"id":"64252707.f9e7","type":"debug","z":"8c99ec05.74e658","name":"OP/2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":588,"y":425,"wires":[]},{"id":"a9768a27.692d6","type":"debug","z":"8c99ec05.74e658","name":"OP/3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":588,"y":465,"wires":[]},{"id":"7d39cdd0.42cc64","type":"debug","z":"8c99ec05.74e658","name":"START","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":601,"y":334,"wires":[]}]

```

---

<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:** [16 June 2020 14:20 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/7 "2020-06-16T14:20:54Z")

</div>

> [@Keirtje](#):
>
> I guess I would need to use this, to control the Shelly 1

Eh? Why? What has delaying 20 seconds got to do with anything?  
Can't you just need to use a Change node to Move msg.payload.currentHeaterStatus To msg.payload and feed that to the MQTT node. That assumes you need to send "on" or "off" to MQTT. You haven't told us what it needs.

If you do want to delay for 20 seconds for some reason you can use a Delay node.

---

<div class="post-metadata">

**Author:** ![Keirtje](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@Keirtje](https://discourse.nodered.org/u/Keirtje)\
**Post date:** [16 June 2020 14:33 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/8 "2020-06-16T14:33:03Z")

</div>

Sorry, copied the wrong flow into my reply.  
I was wondering, what are you taliking about, I see no 20 sec delay.

```auto
[{"id":"47c40612.e45b58","type":"tab","label":"Thermo","disabled":false,"info":""},{"id":"799417af.39fcd8","type":"inject","z":"47c40612.e45b58","name":"","topic":"currentTemp","payload":"19.2","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":220,"wires":[["fd7cbb12.049ec8","dbd55f6f.845a2"]]},{"id":"fd7cbb12.049ec8","type":"ui_heater_controller","z":"47c40612.e45b58","name":"Heating","group":"aa24bae5.94e3c8","unit":"C","order":0,"width":"6","height":"4","topic":"shellies/shelly1-500291F0142B/relay/0/command","title":"","logLengthType":"days","logLength":"0","sliderMinValue":16,"sliderMaxValue":25,"sliderStep":0.5,"thresholdRising":0.5,"thresholdFalling":0.5,"calendar":"{\n \"Monday\": {\n \"00:00\": 19,\n \"06:20\": 22,\n \"08:00\": 19,\n \"16:40\": 22,\n \"23:59\": 19\n },\n \"Tuesday\": {\n \"00:00\": 19,\n \"06:20\": 22,\n \"08:00\": 19,\n \"16:40\": 19,\n \"23:59\": 19\n },\n \"Wednesday\": {\n \"00:00\": 19,\n \"06:20\": 22,\n \"08:00\": 19,\n \"16:40\": 22,\n \"23:59\": 19\n },\n \"Thursday\": {\n \"00:00\": 19,\n \"06:20\": 22,\n \"08:00\": 19,\n \"16:40\": 22,\n \"23:59\": 19\n },\n \"Friday\": {\n \"00:00\": 19,\n \"06:20\": 23,\n \"08:00\": 19,\n \"16:40\": 22,\n \"23:59\": 19\n },\n \"Saturday\": {\n \"00:00\": 19,\n \"08:00\": 20,\n \"20:00\": 22,\n \"23:59\": 19\n },\n \"Sunday\": {\n \"00:00\": 19,\n \"08:00\": 20,\n \"20:00\": 22,\n \"23:59\": 19\n }\n}","x":400,"y":300,"wires":[["bdc94203.ef713","a1554fa5.cdb21"]],"inputLabels":["shellies/shelly1-500291F0142B/ext_temperature"]},{"id":"dbd55f6f.845a2","type":"debug","z":"47c40612.e45b58","name":"","active":false,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","x":620,"y":220,"wires":[]},{"id":"c4825bba.a86178","type":"mqtt in","z":"47c40612.e45b58","name":"Input sensor","topic":"shellies/shelly1-500291F0142B/ext_temperature/0","qos":"2","datatype":"utf8","broker":"8d9f9a83.656348","x":190,"y":160,"wires":[["ee3549d9.691538"]]},{"id":"bdc94203.ef713","type":"debug","z":"47c40612.e45b58","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":710,"y":300,"wires":[]},{"id":"ee3549d9.691538","type":"change","z":"47c40612.e45b58","name":"Temp conv.","rules":[{"t":"set","p":"topic","pt":"msg","to":"'currentTemp'","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":160,"wires":[["dbd55f6f.845a2"]]},{"id":"6ccd2b52.cf3ed4","type":"inject","z":"47c40612.e45b58","name":"","topic":"shellies/shelly1-500291F0142B/relay/0/command","payload":"on","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":410,"y":360,"wires":[["2da60404.b1042c"]]},{"id":"26bc7e8b.f43d52","type":"inject","z":"47c40612.e45b58","name":"","topic":"shellies/shelly1-500291F0142B/relay/0/command","payload":"off","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":410,"y":420,"wires":[["2da60404.b1042c"]]},{"id":"2da60404.b1042c","type":"mqtt out","z":"47c40612.e45b58","name":"Switch","topic":"shellies/shelly1-500291F0142B/relay/0/command","qos":"","retain":"","broker":"8d9f9a83.656348","x":810,"y":480,"wires":[]},{"id":"a1554fa5.cdb21","type":"change","z":"47c40612.e45b58","name":"","rules":[{"t":"set","p":"msg.payload.currentHeaterStatus","pt":"msg","to":"payload","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":360,"wires":[["2da60404.b1042c"]]},{"id":"aa24bae5.94e3c8","type":"ui_group","z":"","name":"Thuis","tab":"ce3e8b8f.5efca8","disp":true,"width":"7","collapse":false},{"id":"8d9f9a83.656348","type":"mqtt-broker","z":"","name":"musquitto","broker":"192.168.0.133","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"ce3e8b8f.5efca8","type":"ui_tab","z":"","name":"Home","icon":"mi-visibility","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![Keirtje](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@Keirtje](https://discourse.nodered.org/u/Keirtje)\
**Post date:** [16 June 2020 14:56 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/9 "2020-06-16T14:56:52Z")

</div>

If I change the Move msg.payload.currentHeaterStatus To msg.payload, I will get an error, conveerting circulair structure to JSON

 ![error](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fd073db4a2563efc3c92323c0aa342c8199538c2.jpeg)

---

<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:** [16 June 2020 15:05 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/10 "2020-06-16T15:05:46Z")

</div>

That's not how to spell Move

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/6/66fd4a9a14c9b1eeeb06a0877b3a8403c55f1b3a.png)

---

<div class="post-metadata">

**Author:** ![Keirtje](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@Keirtje](https://discourse.nodered.org/u/Keirtje)\
**Post date:** [16 June 2020 15:18 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/11 "2020-06-16T15:18:39Z")

</div>

Thanks Colin, 😁

that did the trick. working now. I had tried this, only had not used the Move.

You saved my day

> Blockquote

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 August 2020 15:18 UTC](https://discourse.nodered.org/t/issue-with-heater-node-not-heating/28409/12 "2020-08-15T15:18:43Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
