I am trying to get my airconditioner working with domoticz. This has already been a long search, and i've made some progress, but i'm nowhere near finished. I need help getting it to work in node-red as a first step.
So here is what i have so far:
this plugin in nodered: https://flows.nodered.org/node/node-red ... martthings
i made the smartapp and have it working in the smartthings cloud app etc.
as a first step i want to fetch temperature and humidity from the airconditioner. so i set up two nodes to do that. they give some output:
Code: Select all
{"deviceId":"--long-ugly-string--","deviceType":"humidity","name":"Room air conditioner","value":37,"unit":"%"}
i try to get that into domoticz with a simple mqtt node via a function node with this function:
Code: Select all
msg.payload = {"command":"udevice","idx":260,"nvalue":0,"svalue":msg.payload.toString()};
return msg;
Code: Select all
{"command":"udevice","idx":259,"nvalue":0,"svalue":"{\"deviceId\":\"--long-ugly--string--\",\"deviceType\":\"temperature\",\"name\":\"Room air conditioner\",\"value\":22,\"unit\":\"C\"}"}
so i start trying split nodes, json nodes, trying to get msg.payload.value etc. i just don't know how to get that value extracted out of that string.
i'm no programmer or developer...
i actually don't really know what that string is. so i don't know how to extract one value out of it... any pointers?
the end goal is to also make flows to get it to work the other direction, to actually send commands to the airconditioner to heat or cool the room, or stop when i'm not there. but this first hurdle needs to be taken first.