Hello @sailmich,
I clearly understand now, what your intentions are.
First, you have removed the yaml node and replaced it by a JSON node. That is a normal way to do so.
It is even possible to remove the JSON node, if you edit the MQTT input node and replace in the Output "autodetect (string or buffer) with "a parsed JSON object". That is what I did and it saves a node.

- Screenshot_thermostat1.png (71.14 KiB) Viewed 2416 times
The result after the incoming MQTT node you see in the first message.
You said earlier that you would like to see, the temperature, the targetTemperature and the state in Domoticz.
Regarding the state, what virtual device have you planned to use and what is the IDX of it?
I modified the "Function" node to send two messages, instead of one. You see them at the last two messages in the Debug screen.
At the end we publish the data to a MQTT Output node under the topic domoticz/in and Domoticz cab read that data and will update its virtual sensors as soon as new input is received.
If you remove the two Debug nodes, it is only MQTT In ==> Function node ==> MQTT Out
See the complete flow below. Copy it. paste in in the "Import" window and Import it.
Code: Select all
[{"id":"c4018042.b8c4a","type":"debug","z":"68896a5a.1b56e4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":990,"y":140,"wires":[]},{"id":"7460aa1d.674a04","type":"mqtt in","z":"68896a5a.1b56e4","name":"From WLAN thermostat","topic":"thermostat_wz/stat/things/thermostat/properties","qos":"2","datatype":"json","broker":"f9f13036.e28b58","x":800,"y":200,"wires":[["c4018042.b8c4a","3cbe710b.9dc30e"]]},{"id":"3cbe710b.9dc30e","type":"function","z":"68896a5a.1b56e4","name":"","func":"msg1 = {};\nmsg2 = {};\nmsg1.payload = {\"command\":\"udevice\",\"idx\":325,\"nvalue\":0,\"svalue\":msg.payload.temperature.toString()};\nmsg2.payload = {\"command\":\"udevice\",\"idx\":422,\"nvalue\":0,\"svalue\":msg.payload.targetTemperature.toString()};\nreturn [[msg1,msg2]];","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1020,"y":200,"wires":[["64940c6b.232acc","baa0bd5f.a0bf18"]]},{"id":"64940c6b.232acc","type":"debug","z":"68896a5a.1b56e4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1190,"y":140,"wires":[]},{"id":"baa0bd5f.a0bf18","type":"mqtt out","z":"68896a5a.1b56e4","name":"","topic":"domoticz/in","qos":"","retain":"","broker":"f9f13036.e28b58","x":1210,"y":200,"wires":[]},{"id":"f9f13036.e28b58","type":"mqtt-broker","name":"localhost","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Do not forget to replace the MQTT server, currently 'localhost', with yours.
The next step will be to send the data from the thermostat (IDX 422) to your WLAN
Awaiting your response.
Regards