Updates on decoding the output (probably the most useful info so far)
To make it more useful i have started to integrate into MQTT using nodeRED.
You’ll probably need to re-configure your MQTT in\out nodes inthei flow to match your settings on your network. (the code posts as a single line as that’s how it exported from nodeRED)
[{"id":"58b5e101.08975","type":"tab","label":"AirTouch","disabled":false,"info":""},{"id":"1bb819ab.902fa6","type":"tcp in","z":"58b5e101.08975","name":"","server":"client","host":"CONTROLLER_IP_ADDRESS","port":"8899","datamode":"stream","datatype":"buffer","newline":"","topic":"","base64":false,"x":220,"y":120,"wires":[["c5afa6a8.a9cb38","d094db5e.852fa8"]]},{"id":"d7a24eba.95206","type":"debug","z":"58b5e101.08975","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":180,"wires":[]},{"id":"d094db5e.852fa8","type":"function","z":"58b5e101.08975","name":"AC Status","func":"var newMsg = \"\"\nvar mqttMessage = \"\"\nvar sysStatus = \"\"\n\nif (msg.payload[354] > 10){\n mqttMessage = {payload:\"ON\", topic:\"tele/AirCon/Power\"};\n} else {\n mqttMessage = {payload:\"OFF\", topic:\"tele/AirCon/Power\"};\n}\nnode.send(mqttMessage,false);\nnode.done();\n\nswitch(msg.payload[358]) {\n case 0:\n mqttMessage = {payload:\"auto\", topic:\"tele/AirCon/Mode\"};\n break;\n case 1:\n mqttMessage = {payload:\"heat\", topic:\"tele/AirCon/Mode\"};\n break;\n case 2:\n mqttMessage = {payload:\"dry\", topic:\"tele/AirCon/Mode\"};\n break;\n case 3:\n mqttMessage = {payload:\"fan_only\", topic:\"tele/AirCon/Mode\"};\n break;\n case 4:\n mqttMessage = {payload:\"cool\", topic:\"tele/AirCon/Mode\"};\n break\n}\nnode.send(mqttMessage,false)\nnode.done();\n\nmqttMessage = {payload:msg.payload[362], topic:\"tele/AirCon/SetPoint\"}\nnode.send(mqttMessage,false);\nnode.done();\nmqttMessage = {payload:msg.payload[364], topic:\"tele/AirCon/CurrentTemp\"}\nnode.send(mqttMessage,false);\nnode.done();\n\nswitch(msg.payload[360]) {\n case 48:\n mqttMessage = {payload:\"Auto\", topic:\"tele/AirCon/FanSpeed\"};\n break;\n case 49:\n mqttMessage = {payload:\"Low\", topic:\"tele/AirCon/FanSpeed\"};\n break;\n case 50:\n mqttMessage = {payload:\"Medium\", topic:\"tele/AirCon/FanSpeed\"};\n break;\n case 51:\n mqttMessage = {payload:\"High\", topic:\"tele/AirCon/FanSpeed\"};\n break;\n}\nnode.send(mqttMessage,false);\nnode.done();\nreturn;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":440,"y":180,"wires":[["f740d5ae.191468","d7a24eba.95206"]]},{"id":"c5afa6a8.a9cb38","type":"mqtt out","z":"58b5e101.08975","name":"AC Raw Data","topic":"tele/AirCon/rawmessage","qos":"","retain":"","broker":"5778013a.241c4","x":460,"y":60,"wires":[]},{"id":"f740d5ae.191468","type":"mqtt out","z":"58b5e101.08975","name":"ACMQTTDecoded","topic":"","qos":"","retain":"","broker":"5778013a.241c4","x":690,"y":120,"wires":[]},{"id":"5778013a.241c4","type":"mqtt-broker","name":"HAssMQTT","broker":"MQTT_SERVER_IP_ADDRESS","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
The above flow should do a few things, it’ll connect to the port 8899 on the controller and decode a few items. In the code of the function you can see how to reference the array ID’s as decimal type index numbers from my previous posting (msg.payload(XXX) where XXX is the decimal number of the item you wish to read).
The switch statements and if’s in the function just help to translate and present the info nicely should it need it. To read out the names of the zones or other multi-byte fields you will need to use some loops to combine these entries into a string which you can then output to and MQTT topic which can be picked up by an HA MQTT sensor.
From there you can use the MQTT Climate feature natively in HA (https://www.home-assistant.io/integrations/climate.mqtt/) to present the info in a card, it’ll do basic central system stuff but for a zoned ducted system like i have then separate entities may be needed to control the indiviual air outputs (Work in progress)
