Heating flow . contrib heater controller

Hello all.
Can some help me with this problem.
I dont get this flow to turn of and of my electrical heater (fibaro wall plug).
I cant find the problem with this. looks like everything is working except turning on/off.

Any have some good advice .

[{"id":"4ff04422.2c010c","type":"ui_switch","z":"603e4b3.c8318b4","name":"Heizplan Jona","label":"Heatingplan An/Aus","tooltip":"","group":"b22beb63.9b8088","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"isUserCustomLocked","style":"","onvalue":"false","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"true","offvalueType":"bool","officon":"","offcolor":"","x":115.5,"y":369,"wires":[["ea1832e9.ff1c7"]]},{"id":"b22beb63.9b8088","type":"ui_group","z":"","name":"test1","tab":"91e0803.655718","disp":true,"width":"6","collapse":false},{"id":"91e0803.655718","type":"ui_tab","z":"","name":"Tab 1","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

You have only posted the ui_switch node. Select the relevant nodes you want to export then export them.

[{"id":"603e4b3.c8318b4","type":"tab","label":"Heating Livingroom","disabled":false,"info":""},{"id":"56e4d718.41c818","type":"comment","z":"603e4b3.c8318b4","name":"Heating Livingroom","info":"","x":122,"y":46,"wires":[]},{"id":"3bd1a754.3962d8","type":"fibaroSensor","z":"603e4b3.c8318b4","name":"Temp (Stue)","deviceID":"257","server":"9b6ee9de.5e5998","events":false,"outputs":1,"x":99.5,"y":84,"wires":[["5749373b.d8c7e8"]]},{"id":"5749373b.d8c7e8","type":"function","z":"603e4b3.c8318b4","name":"add current temp","func":"msg.topic = \"currentTemp\"\nreturn msg;\n","outputs":1,"noerr":0,"x":368,"y":83,"wires":[["ea1832e9.ff1c7"]]},{"id":"6b682a02.90cea4","type":"inject","z":"603e4b3.c8318b4","name":"setCalendar","topic":"setCalendar","payload":"{\"Monday\":{\"00:00\":29,\"06:20\":22,\"08:00\":19,\"16:40\":22,\"23:59\":19},\"Tuesday\":{\"00:00\":19,\"06:20\":22,\"08:00\":19,\"16:40\":22,\"23:59\":19},\"Wednesday\":{\"00:00\":19,\"06:20\":22,\"08:00\":19,\"16:40\":10,\"23:59\":10},\"Thursday\":{\"00:00\":10,\"06:20\":10,\"08:00\":10,\"16:40\":10,\"23:59\":10},\"Friday\":{\"00:00\":19,\"06:20\":23,\"08:00\":19,\"16:40\":22,\"23:59\":19},\"Saturday\":{\"00:00\":19,\"08:00\":23,\"20:00\":23,\"23:59\":19},\"Sunday\":{\"00:00\":19,\"08:00\":20,\"20:00\":22,\"23:59\":19}}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":124.5,"y":168,"wires":[["ea1832e9.ff1c7"]]},{"id":"347d127c.5d28be","type":"inject","z":"603e4b3.c8318b4","name":"","topic":"currentTemp","payload":"22.5","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":134.5,"y":128,"wires":[["ea1832e9.ff1c7"]]},{"id":"c6a41cd9.9bddc","type":"debug","z":"603e4b3.c8318b4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":610,"y":100,"wires":[]},{"id":"d78fa02f.aa1bc","type":"inject","z":"603e4b3.c8318b4","name":"","topic":"userTargetValue","payload":"29","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":144.5,"y":208,"wires":[["ea1832e9.ff1c7"]]},{"id":"7f65b4ef.a0ee2c","type":"inject","z":"603e4b3.c8318b4","name":"isUserCustomLocked","topic":"isUserCustomLocked","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":154.5,"y":248,"wires":[["ea1832e9.ff1c7"]]},{"id":"8f42dff8.fc3ea","type":"inject","z":"603e4b3.c8318b4","name":"userConfig","topic":"userConfig","payload":"{\"isUserCustomLocked\":true,\"userTargetValue\":25.5}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":114.5,"y":288,"wires":[["ea1832e9.ff1c7"]]},{"id":"98861ad0.f6e058","type":"inject","z":"603e4b3.c8318b4","name":"isUserCustom","topic":"userConfig","payload":"{\"isUserCustomLocked\":true,\"isUserCustom\": false, \"userTargetValue\": 23.5}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":124.5,"y":328,"wires":[["ea1832e9.ff1c7"]]},{"id":"1521a634.09099a","type":"function","z":"603e4b3.c8318b4","name":"adopt","func":"msg.payload =  {\n        \"name\": \"setThermostatSetpoint\",\n        \"arg1\": 1,\n        \"arg2\": msg.payload.targetValue\n    }\n\nreturn msg;","outputs":2,"noerr":0,"x":310,"y":300,"wires":[["76d4d26.c85aa2c"],[]]},{"id":"76d4d26.c85aa2c","type":"debug","z":"603e4b3.c8318b4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":470,"y":300,"wires":[]},{"id":"ea1832e9.ff1c7","type":"ui_heater_controller","z":"603e4b3.c8318b4","name":"Heater Livingroom","group":"b22beb63.9b8088","unit":"C","order":1,"width":"0","height":"0","topic":"","title":"","logLengthType":"days","logLength":"1","sliderMinValue":10,"sliderMaxValue":35,"sliderStep":0.5,"thresholdRising":0.5,"thresholdFalling":0.5,"calendar":"{\n    \"Monday\": {\n        \"06:00\": 21,\n        \"08:00\": 19,\n        \"18:30\": 21,\n        \"21:00\": 19,\n        \"00:00\": 19\n    },\n    \"Tuesday\": {\n        \"06:00\": 21,\n        \"08:00\": 19,\n        \"18:30\": 21,\n        \"21:00\": 19,\n        \"00:00\": 19\n    },\n    \"Wednesday\": {\n        \"06:00\": 21,\n        \"08:00\": 19,\n        \"18:30\": 21,\n        \"21:00\": 19,\n        \"00:00\": 19\n    },\n    \"Thursday\": {\n        \"06:00\": 21,\n        \"08:00\": 19,\n        \"18:30\": 21,\n        \"21:00\": 19,\n        \"00:00\": 19\n    },\n    \"Friday\": {\n        \"06:00\": 21,\n        \"08:00\": 19,\n        \"18:30\": 21,\n        \"21:00\": 19,\n        \"00:00\": 24\n    },\n    \"Saturday\": {\n        \"08:00\": 20,\n        \"10:00\": 20,\n        \"18:45\": 21,\n        \"22:00\": 19,\n        \"00:00\": 26\n    },\n    \"Sunday\": {\n        \"08:00\": 21,\n        \"10:00\": 19,\n        \"18:45\": 21,\n        \"22:00\": 19,\n        \"00:00\": 19\n    }\n}","x":370,"y":160,"wires":[["c6a41cd9.9bddc","453d5e6a.4187a"]]},{"id":"4ff04422.2c010c","type":"ui_switch","z":"603e4b3.c8318b4","name":"Heizplan Jona","label":"Heatingplan An/Aus","tooltip":"","group":"b22beb63.9b8088","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"isUserCustomLocked","style":"","onvalue":"false","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"true","offvalueType":"bool","officon":"","offcolor":"","x":115.5,"y":369,"wires":[["ea1832e9.ff1c7"]]},{"id":"2eb554d7.c769ec","type":"debug","z":"603e4b3.c8318b4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":220,"wires":[]},{"id":"453d5e6a.4187a","type":"fibaroActor","z":"603e4b3.c8318b4","name":"Heating Wallplug 1 (Stue)","deviceID":"245","server":"9b6ee9de.5e5998","events":true,"outputs":2,"x":550,"y":220,"wires":[["2eb554d7.c769ec"],[]]},{"id":"9b6ee9de.5e5998","type":"fibaro-server","z":"","name":"omnhc2","ipaddress":"192.168.1.11"},{"id":"b22beb63.9b8088","type":"ui_group","z":"","name":"test1","tab":"91e0803.655718","disp":true,"width":"6","collapse":false},{"id":"91e0803.655718","type":"ui_tab","z":"","name":"Tab 1","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

What do you see in the debug node showing what is going to the fibaro node?
What does the fibaro node expect to be sent to switch it on/off?

True or false is working.

debugnode

28.3.2020, 15:43:40node: 2eb554d7.c769ec245 : msg.payload : boolean

false

So do you ever get true out of the heater controller node?

Looking at the info for the heater node it doesn't say that it sends true/false it says it sends an object with all the current information in it.

yes only got false, even when trying to change temperaure .

debuging on more nodes.
28.3.2020, 17:50:45node: 2eb554d7.c769ec245 : msg.payload : boolean

false

28.3.2020, 17:50:45node: c6a41cd9.9bddcmsg.payload : Object

{ currentTemp: 23.2, targetValue: 26, isUserCustom: false, currentSchedule: object, nextSchedule: object … }

28.3.2020, 17:50:45node: 76d4d26.c85aa2cmsg.payload : Object

{ name: "setThermostatSetpoint", arg1: 1, arg2: 26 }

and put adopt back in. Dont know what that do.

[{"id":"603e4b3.c8318b4","type":"tab","label":"Heating Livingroom","disabled":false,"info":""},{"id":"56e4d718.41c818","type":"comment","z":"603e4b3.c8318b4","name":"Heating Livingroom","info":"","x":122,"y":46,"wires":[]},{"id":"3bd1a754.3962d8","type":"fibaroSensor","z":"603e4b3.c8318b4","name":"Temp (Stue)","deviceID":"257","server":"9b6ee9de.5e5998","events":false,"outputs":1,"x":130,"y":80,"wires":[["5749373b.d8c7e8"]]},{"id":"5749373b.d8c7e8","type":"function","z":"603e4b3.c8318b4","name":"add current temp","func":"msg.topic = \"currentTemp\"\nreturn msg;\n","outputs":1,"noerr":0,"x":368,"y":83,"wires":[["ea1832e9.ff1c7"]]},{"id":"6b682a02.90cea4","type":"inject","z":"603e4b3.c8318b4","name":"setCalendar","topic":"setCalendar","payload":"{\"Monday\":{\"00:00\":29,\"06:20\":22,\"08:00\":19,\"16:40\":22,\"23:59\":19},\"Tuesday\":{\"00:00\":19,\"06:20\":22,\"08:00\":19,\"16:40\":22,\"23:59\":19},\"Wednesday\":{\"00:00\":19,\"06:20\":22,\"08:00\":19,\"16:40\":10,\"23:59\":10},\"Thursday\":{\"00:00\":10,\"06:20\":10,\"08:00\":10,\"16:40\":10,\"23:59\":10},\"Friday\":{\"00:00\":19,\"06:20\":23,\"08:00\":19,\"16:40\":22,\"23:59\":19},\"Saturday\":{\"00:00\":19,\"08:00\":23,\"20:00\":23,\"23:59\":19},\"Sunday\":{\"00:00\":19,\"08:00\":20,\"20:00\":22,\"23:59\":19}}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":124.5,"y":168,"wires":[["ea1832e9.ff1c7"]]},{"id":"347d127c.5d28be","type":"inject","z":"603e4b3.c8318b4","name":"","topic":"currentTemp","payload":"22.5","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":134.5,"y":128,"wires":[["ea1832e9.ff1c7"]]},{"id":"c6a41cd9.9bddc","type":"debug","z":"603e4b3.c8318b4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":610,"y":100,"wires":[]},{"id":"d78fa02f.aa1bc","type":"inject","z":"603e4b3.c8318b4","name":"","topic":"userTargetValue","payload":"29","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":144.5,"y":208,"wires":[["ea1832e9.ff1c7"]]},{"id":"7f65b4ef.a0ee2c","type":"inject","z":"603e4b3.c8318b4","name":"isUserCustomLocked","topic":"isUserCustomLocked","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":154.5,"y":248,"wires":[["ea1832e9.ff1c7"]]},{"id":"8f42dff8.fc3ea","type":"inject","z":"603e4b3.c8318b4","name":"userConfig","topic":"userConfig","payload":"{\"isUserCustomLocked\":true,\"userTargetValue\":25.5}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":114.5,"y":288,"wires":[["ea1832e9.ff1c7"]]},{"id":"98861ad0.f6e058","type":"inject","z":"603e4b3.c8318b4","name":"isUserCustom","topic":"userConfig","payload":"{\"isUserCustomLocked\":true,\"isUserCustom\": false, \"userTargetValue\": 23.5}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":124.5,"y":328,"wires":[["ea1832e9.ff1c7"]]},{"id":"1521a634.09099a","type":"function","z":"603e4b3.c8318b4","name":"adopt","func":"msg.payload =  {\n        \"name\": \"setThermostatSetpoint\",\n        \"arg1\": 1,\n        \"arg2\": msg.payload.targetValue\n    }\n\nreturn msg;","outputs":2,"noerr":0,"x":390,"y":260,"wires":[["76d4d26.c85aa2c","453d5e6a.4187a"],[]]},{"id":"76d4d26.c85aa2c","type":"debug","z":"603e4b3.c8318b4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":470,"y":320,"wires":[]},{"id":"ea1832e9.ff1c7","type":"ui_heater_controller","z":"603e4b3.c8318b4","name":"Heater Livingroom","group":"b22beb63.9b8088","unit":"C","order":1,"width":"0","height":"0","topic":"","title":"","logLengthType":"days","logLength":"1","sliderMinValue":10,"sliderMaxValue":35,"sliderStep":0.5,"thresholdRising":0.5,"thresholdFalling":0.5,"calendar":"{\n    \"Monday\": {\n        \"06:00\": 21,\n        \"08:00\": 19,\n        \"18:30\": 21,\n        \"21:00\": 19,\n        \"00:00\": 19\n    },\n    \"Tuesday\": {\n        \"06:00\": 21,\n        \"08:00\": 19,\n        \"18:30\": 21,\n        \"21:00\": 19,\n        \"00:00\": 19\n    },\n    \"Wednesday\": {\n        \"06:00\": 21,\n        \"08:00\": 19,\n        \"18:30\": 21,\n        \"21:00\": 19,\n        \"00:00\": 19\n    },\n    \"Thursday\": {\n        \"06:00\": 21,\n        \"08:00\": 19,\n        \"18:30\": 21,\n        \"21:00\": 19,\n        \"00:00\": 19\n    },\n    \"Friday\": {\n        \"06:00\": 21,\n        \"08:00\": 19,\n        \"18:30\": 21,\n        \"21:00\": 19,\n        \"00:00\": 24\n    },\n    \"Saturday\": {\n        \"08:00\": 20,\n        \"10:00\": 26,\n        \"18:45\": 26,\n        \"22:00\": 19,\n        \"00:00\": 26\n    },\n    \"Sunday\": {\n        \"08:00\": 21,\n        \"10:00\": 19,\n        \"18:45\": 21,\n        \"22:00\": 19,\n        \"00:00\": 19\n    }\n}","x":450,"y":160,"wires":[["c6a41cd9.9bddc","1521a634.09099a"]]},{"id":"4ff04422.2c010c","type":"ui_switch","z":"603e4b3.c8318b4","name":"Heizplan Jona","label":"Heatingplan An/Aus","tooltip":"","group":"b22beb63.9b8088","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"isUserCustomLocked","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":100,"y":380,"wires":[["ea1832e9.ff1c7"]]},{"id":"2eb554d7.c769ec","type":"debug","z":"603e4b3.c8318b4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":690,"y":320,"wires":[]},{"id":"453d5e6a.4187a","type":"fibaroActor","z":"603e4b3.c8318b4","name":"Heating Wallplug 1 (Stue)","deviceID":"245","server":"9b6ee9de.5e5998","events":true,"outputs":2,"x":570,"y":200,"wires":[["2eb554d7.c769ec"],[]]},{"id":"9b6ee9de.5e5998","type":"fibaro-server","z":"","name":"omnhc2","ipaddress":"192.168.1.11"},{"id":"b22beb63.9b8088","type":"ui_group","z":"","name":"test1","tab":"91e0803.655718","disp":true,"width":"6","collapse":false},{"id":"91e0803.655718","type":"ui_tab","z":"","name":"Tab 1","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

Give the debug nodes names so you can see which message comes from which node. You said the heater node was sending false, but the second debug output above looks more like the output that the info panel for the heater node says it should output.

28.3.2020, 19:00:53node: fibaro wallplugg245 : msg.payload : boolean

false

8.3.2020, 19:00:54node: adoptmsg.payload : Object

{ name: "setThermostatSetpoint", arg1: 1, arg2: 26 }

i am new at using node red. so still a lot iof things to learn.
wonder if there is any settings i have to use in heater node.
Heater node sends time and temperature to adopt node. is the problem here. should it be something sending true or false after the heater node.

If i connect switch node with fibaro node i can turn on and off wallplugg.

Show a screenshot of the flow so I know which is which
[Edit] and remember it is the message coming out of the heater control node that we want to see.

29.3.2020, 09:34:21node: heatermsg.payload : Object

{ currentTemp: 23.2, targetValue: 19, isUserCustom: false, currentSchedule: object, nextSchedule: object … }

When you post code or output, please use this icon first

Some progress at last, you have managed to show us the output of the heater controller node and confirmed that it is in the format suggested by the node's description. Unfortunately you have not fully expanded the display in the debug pane in order to see exactly what is there.
Looking at your adopt Function node however, I am further confused. I thought you said that the wallplug node needs true or false to switch it, but in the function node you appear to be picking up the current target temperature and building an object to pass the the wallplug node, I would have expected you to pick up msg.payload.currentHeaterStatus and convert it from off/on to false/true.

Thanks alot for helping.

Changed i function node . But i dont understand how to convert to true/false in node. trying to look in forum and google.
is it "arg1" 1: ned need to change or do i need a new string that convert it.

Here i tried to expand it.
3/29/2020, 12:10:24 PMnode: heatermsg.payload : Object

object

currentTemp: 23.5

targetValue: 25

isUserCustom: false

currentSchedule: object

temp: 25

day: "Sunday"

time: "10:00"

nextSchedule: object

temp: 21

day: "Sunday"

time: "18:45"

currentHeaterStatus: "on"

3/29/2020, 12:10:24 PMnode: adoptmsg.payload : Object

object

name: "setThermostatSetpoint"

arg1: 1

arg2: "on"

What exactly do you want to do in the function node? What are these arg1 and arg2 supposed to be? I thought you just needed to get true or false in the payload, but perhaps that is not true. I don't know anything about the fibaro node, but you said you just needed true or false.

want it to turn on /off the wall plug after temp settings in the heating node.
In that way i can control the electrical radiators that is connected to the wallplug and temperature in the livingrom.

so when temp is going under set temp the funktion node send true and turning on wall plug. and when temp is over set temp it send false and turn off wallplug.

I didn't ask what you want to do in the real world, the question is what do you want to do in the function node. Do you know how to drive the plug? If so how? Post a simple flow showing turning on and off with inject nodes.