# Node-red-contrib-heater-controller problem

**URL:** <https://discourse.nodered.org/t/node-red-contrib-heater-controller-problem/55053>\
**Category:** General\
**Created:** [11 December 2021 17:52 UTC](https://discourse.nodered.org/t/node-red-contrib-heater-controller-problem/55053 "2021-12-11T17:52:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![magicman](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@magicman](https://discourse.nodered.org/u/magicman)\
**Post date:** [11 December 2021 17:52 UTC](https://discourse.nodered.org/t/node-red-contrib-heater-controller-problem/55053/1 "2021-12-11T17:52:31Z")

</div>

Hi not sure if anyone can help?

Used to use this controller before its update by inputting a targetValue into the controller thus allowing me to use Alexa to change heating thermostat, since the update it wants me to use this json but it fails with an error message of invalid topic?

{"topic" : "userConfig", "payload" : { "isLocked": true,"userTargetValue": 25.5, "isUserCustom": false } }`

but this is the json and topic taken from the instructions

not an expert by any means so any help would be appreciated  
at present i am using the inject node to fire in this json

---

<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:** [11 December 2021 18:54 UTC](https://discourse.nodered.org/t/node-red-contrib-heater-controller-problem/55053/2 "2021-12-11T18:54:13Z")

</div>

I would expect the node to want a JavaScript object, not a JSON string. Feed the message into a debug node and show us what you get in the debug pane. You can paste a screenshot here.

---

<div class="post-metadata">

**Author:** ![magicman](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@magicman](https://discourse.nodered.org/u/magicman)\
**Post date:** [11 December 2021 19:09 UTC](https://discourse.nodered.org/t/node-red-contrib-heater-controller-problem/55053/3 "2021-12-11T19:09:37Z")

</div>

thanks colin i will but am at work now

---

<div class="post-metadata">

**Author:** ![magicman](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@magicman](https://discourse.nodered.org/u/magicman)\
**Post date:** [12 December 2021 13:53 UTC](https://discourse.nodered.org/t/node-red-contrib-heater-controller-problem/55053/4 "2021-12-12T13:53:13Z")

</div>

here are the screenshots you asked for @Colin  
 ![json](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/1/217d36a50f448fb3e37e2f5ed6f5c486a4b9c828.png)

 ![topic](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/6/368263a9f94f944e7ccb86e9e691e558e83c41ef.png)

thanks for your help

---

<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:** [12 December 2021 14:19 UTC](https://discourse.nodered.org/t/node-red-contrib-heater-controller-problem/55053/5 "2021-12-12T14:19:46Z")

</div>

I don't know the node you are using, but I would have expected it to want `msg.topic` and `msg.payload`. You are setting up `msg.payload.topic` and `msg.payload.payload`.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 December 2021 14:32 UTC](https://discourse.nodered.org/t/node-red-contrib-heater-controller-problem/55053/6 "2021-12-12T14:32:20Z")

</div>

Set the inject to have 2 entries.

Set msg.payload to JSON mode and set the value to `{ "isLocked": true,"userTargetValue": 25.5, "isUserCustom": false }`

Set msg.topic to string mode and it's value to `userConfig`

---

<div class="post-metadata">

**Author:** ![magicman](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@magicman](https://discourse.nodered.org/u/magicman)\
**Post date:** [12 December 2021 14:42 UTC](https://discourse.nodered.org/t/node-red-contrib-heater-controller-problem/55053/7 "2021-12-12T14:42:09Z")

</div>

great thanks @Steve-Mcl that fired correctly but is not changing userTargetValue to 25.5 but i can work on that. thanks for the help . this forum never fails to be helpful to us newbies 🙂

---

<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:** [10 February 2022 14:42 UTC](https://discourse.nodered.org/t/node-red-contrib-heater-controller-problem/55053/8 "2022-02-10T14:42:53Z")

</div>

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