Is it possible to control this protocol from HA?
Now i’m using Node-red with this nodes https://github.com/efa2000/node-red-contrib-buspro and translate all to mqtt
Based on https://github.com/caligo-mentis/smart-bus in which i changed “status” to “state” because “status” is a function in node-red.
Commands list http://www.hdlautomation.ca/file-download/hdl-bus-pro-operation-codeseng-jan-08-2013-pdf/
Here is one to send command (code 49)
[{"id":"9ba03e7c.385c8","type":"buspro-out","z":"a5118954.594eb8","controller":"965141c7.56bd9","name":"HDL Gate","x":500,"y":700,"wires":[]},{"id":"c3701aa4.3a1648","type":"function","z":"a5118954.594eb8","name":"49 to 1.1 ch & level","func":"msg.code = 49;\n\nmsg.target = msg.topic.slice(4, 7);\nvar pos = msg.topic.indexOf(\"/\", 4);\nvar pos2 = msg.topic.indexOf(\"/\",9);\n// var level = msg.payload;\nvar level = Math.min(Math.max(parseInt(msg.payload), 0), 100);\n\nmsg.payload = {channel: msg.topic.slice(pos + 3, pos2)};\n\nmsg.payload.level = level\n\nreturn msg;\n\n","outputs":1,"noerr":0,"x":310,"y":700,"wires":[["9ba03e7c.385c8","7034d8ba.d921c8"]]},{"id":"3013d403.51cb2c","type":"mqtt in","z":"a5118954.594eb8","name":"","topic":"hdl/1.1/+/set","qos":"0","broker":"d110fe62.0ec2","x":90,"y":700,"wires":[["c3701aa4.3a1648"]]},{"id":"7034d8ba.d921c8","type":"debug","z":"a5118954.594eb8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":490,"y":760,"wires":[]},{"id":"965141c7.56bd9","type":"buspro-controller","z":0,"host":"192.168.1.20","port":"6000","subnetid":"1","deviceid":"100"},{"id":"d110fe62.0ec2","type":"mqtt-broker","z":"","name":"hassio.local","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]
And here is the one to read states
[{"id":"4850faeb.01fd74","type":"function","z":"a5118954.594eb8","name":"50 from 1.1","func":"if (msg.sender == \"1.1\" && msg.code == 50 && msg.payload.success == true) \n {\n msg.topic = \"hdl/\" + msg.sender + \"/ch\" + msg.payload.channel;\n msg.payload = msg.payload.level;\n\n return msg;\n}\n\n","outputs":1,"noerr":0,"x":250,"y":540,"wires":[["a93b9a05.e61848","356ba433.80f3cc"]]},{"id":"aa53dcd7.a6867","type":"buspro-in","z":"a5118954.594eb8","controller":"965141c7.56bd9","name":"HDL Gate","x":80,"y":560,"wires":[["4850faeb.01fd74","c503b8d1.3391d8","65bfd47f.860adc"]]},{"id":"c503b8d1.3391d8","type":"function","z":"a5118954.594eb8","name":"52 from 1.1 ","func":"var outputMsgs = [];\nif (msg.sender == \"1.1\" && msg.code == 52) {\n for (i = 0; i < msg.payload.channels.length; i++) {\n// msg.topic = \"hdl/\" + msg.sender + \"/ch\" + msg.payload.channels[i].number;\n// msg.payload = msg.payload.channels[i].level;\n outputMsgs.push({\n topic:\"hdl/\" + msg.sender + \"/ch\" + msg.payload.channels[i].number,\n payload:msg.payload.channels[i].level\n });\n// outputMsgs.push({payload:msg.payload.channels[i].level});\n }\n return [ outputMsgs ];\n}","outputs":1,"noerr":0,"x":250,"y":580,"wires":[["a93b9a05.e61848","bd1abac3.10a298"]]},{"id":"a93b9a05.e61848","type":"mqtt out","z":"a5118954.594eb8","name":"hdl/X.X/chY","topic":"","qos":"0","retain":"true","broker":"d110fe62.0ec2","x":470,"y":560,"wires":[]},{"id":"bd1abac3.10a298","type":"debug","z":"a5118954.594eb8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":470,"y":620,"wires":[]},{"id":"965141c7.56bd9","type":"buspro-controller","z":0,"host":"192.168.1.20","port":"6000","subnetid":"1","deviceid":"100"},{"id":"d110fe62.0ec2","type":"mqtt-broker","z":"","name":"hassio.local","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]
Dont blame me for functions i’m not a coder
By the way here is manufacturer site HDL and another manufacturer, don’t know if second one is still exist.