Haier AC with MQTT and nodered ?
Moderator: leecollings
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FIreWizard
I changed that and it stil is not working correct
Next try wil be tomorrow
Eddie
I changed that and it stil is not working correct
Next try wil be tomorrow
Eddie
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
I made a split in the Haier flow to be able to debug.
this is the haier-to-domotiz flow
while haier info seems to get into domoticz, I don't get any debug output....
Can you see what is wrong ?
Eddie
I made a split in the Haier flow to be able to debug.
this is the haier-to-domotiz flow
Code: Select all
[{"id":"d7569131.bcfd18","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"774e7dd.815f604","type":"mqtt in","z":"d7569131.bcfd18","name":"","topic":"myhome/topic/#","qos":"0","datatype":"auto","broker":"974a4d.55b57db","x":140,"y":320,"wires":[["8e8216e6.72e318","bbaf0cc5.2bbb08"]]},{"id":"8e8216e6.72e318","type":"debug","z":"d7569131.bcfd18","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":410,"y":320,"wires":[]},{"id":"bbaf0cc5.2bbb08","type":"function","z":"d7569131.bcfd18","name":"To Domoticz","func":"switch (msg.topic) {\n\n case \"myhome/topic/Fresh\":\n msg.payload = {\"command\":\"switchlight\",\"idx\":246,\"switchcmd\":msg.payload.charAt(0).toUpperCase() + msg.payload.slice(1)};\n break;\n \n case \"myhome/topic/Lock_Remote\":\n if (msg.payload == \"true\") {\n msg.payload = {\"command\":\"switchlight\",\"idx\":247,\"switchcmd\":\"On\"};\n } else if (msg.payload == \"false\") {\n msg.payload = {\"command\":\"switchlight\",\"idx\":247,\"switchcmd\":\"Off\"};\n }\n break;\n \n case \"myhome/topic/Power\":\n msg.payload = {\"command\":\"switchlight\",\"idx\":248,\"switchcmd\":msg.payload.charAt(0).toUpperCase() + msg.payload.slice(1)};\n break;\n \n case \"myhome/topic/Health\":\n msg.payload = {\"command\":\"switchlight\",\"idx\":249,\"switchcmd\":msg.payload.charAt(0).toUpperCase() + msg.payload.slice(1)};\n break;\n \n case \"myhome/topic/Compressor\":\n msg.payload = {\"command\":\"switchlight\",\"idx\":250,\"switchcmd\":msg.payload.charAt(0).toUpperCase() + msg.payload.slice(1)};\n break;\n \n case \"myhome/topic/Swing\": \n \n switch (msg.payload) {\n\n case \"off\":\n msg.payload = {\"command\":\"udevice\",\"idx\":251,\"nvalue\":1,\"svalue\":\"0\"};\n break;\n \n case \"ud\":\n msg.payload = {\"command\":\"udevice\",\"idx\":251,\"nvalue\":1,\"svalue\":\"10\"};\n break;\n\n case \"lr\":\n msg.payload = {\"command\":\"udevice\",\"idx\":251,\"nvalue\":1,\"svalue\":\"20\"};\n break;\n\n case \"all\":\n msg.payload = {\"command\":\"udevice\",\"idx\":251,\"nvalue\":1,\"svalue\":\"30\"};\n break;\n\n }\n break;\n \n case \"myhome/topic/Fan_Speed\": \n \n switch (msg.payload) {\n\n case \"max\":\n msg.payload = {\"command\":\"udevice\",\"idx\":252,\"nvalue\":1,\"svalue\":\"10\"};\n break;\n \n case \"mid\":\n msg.payload = {\"command\":\"udevice\",\"idx\":252,\"nvalue\":1,\"svalue\":\"20\"};\n break;\n\n case \"min\":\n msg.payload = {\"command\":\"udevice\",\"idx\":252,\"nvalue\":1,\"svalue\":\"30\"};\n break;\n\n case \"auto\":\n msg.payload = {\"command\":\"udevice\",\"idx\":252,\"nvalue\":1,\"svalue\":\"40\"};\n break;\n\n }\n break;\n \n case \"myhome/topic/Mode\": \n \n switch (msg.payload) {\n\n case \"Off\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"0\"};\n break;\n \n case \"Dry\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"10\"};\n break;\n\n case \"Fan_only\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"20\"};\n break;\n\n case \"Heat\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"30\"};\n break;\n\n case \"Cool\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"40\"};\n break;\n\n case \"Auto\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"50\"};\n break;\n\n }\n break;\n \n case \"myhome/topic/Set_Temp\":\n msg.payload = {\"command\":\"udevice\",\"idx\":253,\"nvalue\":0,\"svalue\":msg.payload};\n break; \n \n case \"myhome/topic/Current_Temp\":\n msg.payload = {\"command\":\"udevice\",\"idx\":254,\"nvalue\":0,\"svalue\":msg.payload};\n break;\n \n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":410,"y":400,"wires":[["adaf63d5.ef90a"]]},{"id":"adaf63d5.ef90a","type":"mqtt out","z":"d7569131.bcfd18","name":"","topic":"domoticz/in","qos":"0","retain":"false","broker":"974a4d.55b57db","x":650,"y":400,"wires":[]},{"id":"974a4d.55b57db","type":"mqtt-broker","z":"","name":"localhost","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Can you see what is wrong ?
Eddie
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- FireWizard
- Posts: 1886
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Haier AC with MQTT and nodered ?
Hello Eddie,
@eddieb
Do not forget to press "Deploy".
Check first, in a systematic way, all the commands that you can give with your Haier remote or on the unit itself and check that it is correctly indicated in Domoticz. I looked again to your first post with the screenshot of MQTT explorer and saw that there also exist a topic /myhome/topic/connection.
It is a boolean true or false. Do you want to have it implemented?
In that case, I suggest an "Alert" sensor, with a green triangle and text "Connected" and a red triangle with text "Disconnected", or what you want.
Let me know the results.
Regards
@eddieb
Okay, that is not a problem, as it are independent flows.I made a split in the Haier flow to be able to debug.
this is the haier-to-domotiz flow
On the flow you posted, you have the debug node de-activated. Can you click on the right square of the (green) debug node and activate it.while haier info seems to get into domoticz, I don't get any debug output....
Can you see what is wrong ?
Do not forget to press "Deploy".
Check first, in a systematic way, all the commands that you can give with your Haier remote or on the unit itself and check that it is correctly indicated in Domoticz. I looked again to your first post with the screenshot of MQTT explorer and saw that there also exist a topic /myhome/topic/connection.
It is a boolean true or false. Do you want to have it implemented?
In that case, I suggest an "Alert" sensor, with a green triangle and text "Connected" and a red triangle with text "Disconnected", or what you want.
Let me know the results.
Regards
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
like I said, I am a total node-red newbie ...
some things
- my AC seems not to respond to mode "fan_only" ... I need to chack that with mqtt explorer in combination with the web config and the remote control.
- setting mode to auto and cool seems to work and displayed correct in domoticz.
- setting mode to heat and dry is not displayed in domoticz
I'll continue testing later today
like I said, I am a total node-red newbie ...
some things
- my AC seems not to respond to mode "fan_only" ... I need to chack that with mqtt explorer in combination with the web config and the remote control.
- setting mode to auto and cool seems to work and displayed correct in domoticz.
- setting mode to heat and dry is not displayed in domoticz
I'll continue testing later today
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- FireWizard
- Posts: 1886
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Haier AC with MQTT and nodered ?
Hello Eddie,
@eddieb
The flows, containing the topics and payloads, has been created according to your post of July 22nd.
It might be that your model only support a subset of the topics.
Do you have a link to that document?
You don't need MQTT Explorer, you can simple add a debug node after the MQTT input node and activate it.
Just for test purposes, I add a test flow.
It is an "Inject" node connected to a MQTT Out node. You can simple activate it by pressing the grey square at the left of this node.
It will inject the topic and the payload.
It is the stream I use to test these kind of streams.
Let me know,
Regards
@eddieb
The flows, containing the topics and payloads, has been created according to your post of July 22nd.
It might be that your model only support a subset of the topics.
Do you have a link to that document?
Don't worry, all of us have been newbies once and by doing (and making mistakes), you will learn.like I said, I am a total node-red newbie ...
You can test that by simple publish the right payload, as in your documents.my AC seems not to respond to mode "fan_only" ... I need to check that with mqtt explorer in combination with the web config and the remote control.
Is it supported?setting mode to heat and dry is not displayed in domoticz
You don't need MQTT Explorer, you can simple add a debug node after the MQTT input node and activate it.
Just for test purposes, I add a test flow.
It is an "Inject" node connected to a MQTT Out node. You can simple activate it by pressing the grey square at the left of this node.
It will inject the topic and the payload.
It is the stream I use to test these kind of streams.
Code: Select all
[{"id":"c7f3d06b.731f5","type":"inject","z":"582ecf89.8354","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"myhome/topic/Lock_Remote","payload":"true","payloadType":"str","x":270,"y":40,"wires":[["b2f47d4a.351eb"]]},{"id":"b2f47d4a.351eb","type":"mqtt out","z":"582ecf89.8354","name":"","topic":"","qos":"0","retain":"false","broker":"f9f13036.e28b58","x":490,"y":40,"wires":[]},{"id":"f9f13036.e28b58","type":"mqtt-broker","z":"","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":""}]
Regards
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
Ah, did not know of the inject possibilities.
I did a quick test and that works, I will dive into it later today.
As I am using a custom USB-ESP stick with custom software in the Haier there is no more documentation (yet) ...
I am using this https://translate.google.com/translate? ... ives%2F433 and ordered a couple off usb-esp directly from the russian guy who wrote the software ... (took 5 weeks to arrive
)
Ah, did not know of the inject possibilities.
I did a quick test and that works, I will dive into it later today.
As I am using a custom USB-ESP stick with custom software in the Haier there is no more documentation (yet) ...
I am using this https://translate.google.com/translate? ... ives%2F433 and ordered a couple off usb-esp directly from the russian guy who wrote the software ... (took 5 weeks to arrive

RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- FireWizard
- Posts: 1886
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Haier AC with MQTT and nodered ?
Hello @eddieb
I suggest, that you first start with the commands from the Haier AC to Domoticz.
I have been searching also on the Internet and found the Russian site as well.
I found also: https://github.com/instalator/ioBroker.haier
I think that this is the version you use.
From the information you provided I created the flow, based on the following:
I wonder if the topics, like Fresh, Lock_Remote, etc are with capitals.
Can you use the flow, I send you 22 Jul 2020, 12:29 and see what you receive.
Perhaps we have to make some changes.
Looking forward to the results,
Regards
I suggest, that you first start with the commands from the Haier AC to Domoticz.
I have been searching also on the Internet and found the Russian site as well.
I found also: https://github.com/instalator/ioBroker.haier
I think that this is the version you use.
From the information you provided I created the flow, based on the following:
However, after studying the source code I found some differences. (it is pity, that some comments in the main.js are still Russian)Topics received from Haier AC
Topics with current states the air conditioner uses the following:
1) myhome/topic/Fresh : msg.payload : string[3] "off" fresh air mode on|off
2) myhome/topic/Lock_Remote : msg.payload : string[5] "false" lock the remote control true|false
3) myhome/topic/Power : msg.payload : string[2] "on" power state on|off
4) myhome/topic/Health : msg.payload : string[3] "off" "Health" mode (UV lamp) on|off
5) myhome/topic/Compressor : msg.payload : string[3] "off" compressor on|off
6) myhome/topic/Swing : msg.payload : string[2] "ud" air flow direction mode off|ud|lr|all
7) myhome/topic/Fan_Speed : msg.payload : string[4] "auto" fan speed max|mid|min|auto
8) myhome/topic/Set_Temp : msg.payload : string[2] "19" set temperature
9) myhome/topic/Current_Temp : msg.payload : string[2] "21" current room temperature
10) myhome/topic/Mode : msg.payload : string[3] "dry" air conditioner operation mode auto|cool|heat|fan_only|dry|off
11) myhome/topic/RAW : msg.payload : string[74] "FFFF22000000000001026D0100150033007F00000000000400030001000100000000000366"
I wonder if the topics, like Fresh, Lock_Remote, etc are with capitals.
Can you use the flow, I send you 22 Jul 2020, 12:29 and see what you receive.
Perhaps we have to make some changes.
Looking forward to the results,
Regards
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
that is indeed the base of the code running, BUT, it is not the latest source on github ...
For now the author did not publish the latest code. (I asked him)
- My Haier Tundra Green does NOT support the "Fan*" commands ... (tested with the original remote control)
- the code seems to be made so more Haier models are supported ...
- Don't have time left today, I will continue testing tomorrow.
that is indeed the base of the code running, BUT, it is not the latest source on github ...
For now the author did not publish the latest code. (I asked him)
- My Haier Tundra Green does NOT support the "Fan*" commands ... (tested with the original remote control)
- the code seems to be made so more Haier models are supported ...
- Don't have time left today, I will continue testing tomorrow.
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- FireWizard
- Posts: 1886
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Haier AC with MQTT and nodered ?
@eddieb
You wrote:
and that the version you use has not been published, yet.
Awaiting your further test results
Regards
You wrote:
So, you mean that your device has a later version of the software. I did not find a newer version on Github (this was 1.0.3),that is indeed the base of the code running, BUT, it is not the latest source on github ...
For now the author did not publish the latest code. (I asked him)
and that the version you use has not been published, yet.
So we can remove this command.My Haier Tundra Green does NOT support the "Fan*" commands ... (tested with the original remote control)
Awaiting your further test results
Regards
Last edited by FireWizard on Sunday 26 July 2020 12:06, edited 1 time in total.
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
A binairy was send to me by e-mail and I flashed it thru the webinterface of the module
This URL I found has newer info and especially the blog entries underneath are pretty recent.
The "instalator" guy is the one I contacted, he sent me the modules and the latest firmware.
https://translate.google.com/translate? ... &sandbox=1
YES, after I confirmed that I received the modules I asked where to find the latest firmware.FireWizard wrote: ↑Saturday 25 July 2020 18:11 So, you mean that your device has a later version of the software. I did not find a newer version on Github (this was 1.0,3),
and that the version you use has not been published, yet.
A binairy was send to me by e-mail and I flashed it thru the webinterface of the module
Yes, I allready removed it from my node-red and domoticz code.My Haier Tundra Green does NOT support the "Fan*" commands ... (tested with the original remote control)
So we can remove this command.
This URL I found has newer info and especially the blog entries underneath are pretty recent.
The "instalator" guy is the one I contacted, he sent me the modules and the latest firmware.
https://translate.google.com/translate? ... &sandbox=1
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
I think I got it working now ..
node-red code to convert MQTT-ESP to domoticz/in and sending domoticz/out to MQTT-ESP
I think I got it working now ..
node-red code to convert MQTT-ESP to domoticz/in and sending domoticz/out to MQTT-ESP
Code: Select all
[{"id":"368ce178.20b30e","type":"tab","label":"Haier","disabled":false,"info":""},{"id":"f8735c63.2bce68","type":"mqtt in","z":"368ce178.20b30e","name":"","topic":"myhome/topic/#","qos":"0","datatype":"auto","broker":"974a4d.55b57db","x":160,"y":260,"wires":[["a8b04328.1386a8"]]},{"id":"6cbef17.484a91","type":"debug","z":"368ce178.20b30e","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":570,"y":200,"wires":[]},{"id":"50b3a84a.5006c8","type":"mqtt out","z":"368ce178.20b30e","name":"","topic":"domoticz/in","qos":"0","retain":"false","broker":"974a4d.55b57db","x":570,"y":260,"wires":[]},{"id":"4996743f.5b86c4","type":"mqtt in","z":"368ce178.20b30e","name":"","topic":"domoticz/out","qos":"2","datatype":"json","broker":"974a4d.55b57db","x":150,"y":420,"wires":[["a33fe4a5.8e401"]]},{"id":"a33fe4a5.8e401","type":"switch","z":"368ce178.20b30e","name":"Filter Haier Commands","property":"payload.idx","propertyType":"msg","rules":[{"t":"eq","v":"247","vt":"num"},{"t":"eq","v":"248","vt":"num"},{"t":"eq","v":"249","vt":"num"},{"t":"eq","v":"251","vt":"num"},{"t":"eq","v":"252","vt":"num"},{"t":"eq","v":"255","vt":"num"},{"t":"eq","v":"253","vt":"num"}],"checkall":"true","repair":false,"outputs":7,"x":390,"y":420,"wires":[["2defd0dd.92e31"],["2634997.53e41e6"],["6306c0e2.ef5d68"],["2d4fea47.dddd56"],["bbd2e04a.11a628"],["aebe0539.a29f8"],["2ac9aaf1.d3387e"]]},{"id":"7b3b385e.d39d5","type":"comment","z":"368ce178.20b30e","name":"Output explanation","info":"1. Lock Remote\n2. Power\n3. Health\n4. Swing\n5. Fan Speed\n6. Mode\n7. Thermostat Setpoint","x":370,"y":520,"wires":[]},{"id":"2defd0dd.92e31","type":"function","z":"368ce178.20b30e","name":"Lock Remote","func":"msg.topic = \"myhome/topic/set/Lock_Remote\";\nmsg.payload = msg.payload.nvalue.toString();\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":660,"y":320,"wires":[["1d8d5884.6d6edf"]]},{"id":"2634997.53e41e6","type":"function","z":"368ce178.20b30e","name":"Power","func":"msg.topic = \"myhome/topic/set/Power\";\nmsg.payload = msg.payload.nvalue.toString();\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":630,"y":360,"wires":[["1d8d5884.6d6edf"]]},{"id":"6306c0e2.ef5d68","type":"function","z":"368ce178.20b30e","name":"Health","func":"msg.topic = \"myhome/topic/set/Health\";\nmsg.payload = msg.payload.nvalue.toString();\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":630,"y":400,"wires":[["1d8d5884.6d6edf"]]},{"id":"2d4fea47.dddd56","type":"function","z":"368ce178.20b30e","name":"Swing","func":"msg.topic = \"myhome/topic/set/Swing\";\nif ((msg.payload.nvalue === 0) && msg.payload.svalue1 == \"0\") {\n msg.payload = \"off\";\n} else if (msg.payload.nvalue === 2) {\n switch (msg.payload.svalue1) {\n case \"10\":\n msg.payload = \"ud\";\n break;\n \n case \"20\":\n msg.payload = \"lr\";\n break;\n\n case \"30\":\n msg.payload = \"all\";\n break;\n\n }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":630,"y":440,"wires":[["1d8d5884.6d6edf"]]},{"id":"bbd2e04a.11a628","type":"function","z":"368ce178.20b30e","name":"Fan Speed","func":"msg.topic = \"myhome/topic/set/Fan_Speed\";\nif (msg.payload.nvalue === 2) {\n switch (msg.payload.svalue1) {\n case \"10\":\n msg.payload = \"max\";\n break;\n \n case \"20\":\n msg.payload = \"mid\";\n break;\n\n case \"30\":\n msg.payload = \"min\";\n break;\n\n case \"40\":\n msg.payload = \"auto\";\n break;\n\n }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":650,"y":480,"wires":[["1d8d5884.6d6edf"]]},{"id":"aebe0539.a29f8","type":"function","z":"368ce178.20b30e","name":"Mode","func":"msg.topic = \"myhome/topic/set/Mode\";\nif ((msg.payload.nvalue === 0) && msg.payload.svalue1 == \"0\") {\n msg.payload = \"off\";\n} else if (msg.payload.nvalue === 2) {\n switch (msg.payload.svalue1) {\n case \"10\":\n msg.payload = \"dry\";\n break;\n\n case \"20\":\n msg.payload = \"heat\";\n break;\n \n case \"30\":\n msg.payload = \"cool\";\n break;\n\n case \"40\":\n msg.payload = \"auto\";\n break;\n\n }\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":630,"y":520,"wires":[["1d8d5884.6d6edf"]]},{"id":"2ac9aaf1.d3387e","type":"function","z":"368ce178.20b30e","name":"Set Temperature","func":"msg.topic = \"myhome/topic/set/Set_Temp\";\nmsg.payload = msg.payload.svalue1;\nif (Number(msg.payload) < 16) (msg.payload) = \"16.00\";\nif (Number(msg.payload) > 30) (msg.payload) = \"30.00\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":660,"y":560,"wires":[["1d8d5884.6d6edf"]]},{"id":"1d8d5884.6d6edf","type":"mqtt out","z":"368ce178.20b30e","name":"MQTT to Haier","topic":"","qos":"0","retain":"false","broker":"974a4d.55b57db","x":960,"y":420,"wires":[]},{"id":"a8b04328.1386a8","type":"function","z":"368ce178.20b30e","name":"To Domoticz","func":"switch (msg.topic) {\n\n case \"myhome/topic/Fresh\":\n msg.payload = {\"command\":\"switchlight\",\"idx\":246,\"switchcmd\":msg.payload.charAt(0).toUpperCase() + msg.payload.slice(1)};\n break;\n \n case \"myhome/topic/Lock_Remote\":\n if (msg.payload == \"true\") {\n msg.payload = {\"command\":\"switchlight\",\"idx\":247,\"switchcmd\":\"On\"};\n } else if (msg.payload == \"false\") {\n msg.payload = {\"command\":\"switchlight\",\"idx\":247,\"switchcmd\":\"Off\"};\n }\n break;\n \n case \"myhome/topic/Power\":\n msg.payload = {\"command\":\"switchlight\",\"idx\":248,\"switchcmd\":msg.payload.charAt(0).toUpperCase() + msg.payload.slice(1)};\n break;\n \n case \"myhome/topic/Health\":\n msg.payload = {\"command\":\"switchlight\",\"idx\":249,\"switchcmd\":msg.payload.charAt(0).toUpperCase() + msg.payload.slice(1)};\n break;\n \n case \"myhome/topic/Compressor\":\n msg.payload = {\"command\":\"switchlight\",\"idx\":250,\"switchcmd\":msg.payload.charAt(0).toUpperCase() + msg.payload.slice(1)};\n break;\n \n case \"myhome/topic/Swing\": \n \n switch (msg.payload) {\n\n case \"off\":\n msg.payload = {\"command\":\"udevice\",\"idx\":251,\"nvalue\":1,\"svalue\":\"0\"};\n break;\n \n case \"ud\":\n msg.payload = {\"command\":\"udevice\",\"idx\":251,\"nvalue\":1,\"svalue\":\"10\"};\n break;\n\n case \"lr\":\n msg.payload = {\"command\":\"udevice\",\"idx\":251,\"nvalue\":1,\"svalue\":\"20\"};\n break;\n\n case \"all\":\n msg.payload = {\"command\":\"udevice\",\"idx\":251,\"nvalue\":1,\"svalue\":\"30\"};\n break;\n\n }\n break;\n \n case \"myhome/topic/Fan_Speed\": \n \n switch (msg.payload) {\n\n case \"max\":\n msg.payload = {\"command\":\"udevice\",\"idx\":252,\"nvalue\":1,\"svalue\":\"10\"};\n break;\n \n case \"mid\":\n msg.payload = {\"command\":\"udevice\",\"idx\":252,\"nvalue\":1,\"svalue\":\"20\"};\n break;\n\n case \"min\":\n msg.payload = {\"command\":\"udevice\",\"idx\":252,\"nvalue\":1,\"svalue\":\"30\"};\n break;\n\n case \"auto\":\n msg.payload = {\"command\":\"udevice\",\"idx\":252,\"nvalue\":1,\"svalue\":\"40\"};\n break;\n\n }\n break;\n \n case \"myhome/topic/Mode\": \n \n switch (msg.payload) {\n\n case \"Off\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"0\"};\n break;\n \n case \"Dry\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"10\"};\n break;\n\n case \"Heat\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"20\"};\n break;\n\n case \"Cool\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"30\"};\n break;\n\n case \"Auto\":\n msg.payload = {\"command\":\"udevice\",\"idx\":255,\"nvalue\":1,\"svalue\":\"40\"};\n break;\n\n }\n break;\n \n case \"myhome/topic/Set_Temp\":\n msg.payload = {\"command\":\"udevice\",\"idx\":253,\"nvalue\":0,\"svalue\":msg.payload};\n break; \n \n case \"myhome/topic/Current_Temp\":\n msg.payload = {\"command\":\"udevice\",\"idx\":254,\"nvalue\":0,\"svalue\":msg.payload};\n break;\n \n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":370,"y":260,"wires":[["50b3a84a.5006c8","6cbef17.484a91"]]},{"id":"9cf79255.e33768","type":"comment","z":"368ce178.20b30e","name":"246 Fresh 247 Lock_Remote 248 Power 249 Health 250 Compressor 251 Swing 252 Fan_Speed 253 Set_Temp 254 Current_Temp 255 Mode","info":"246 Fresh\n247 Lock_Remote\n248 Power\n249 Health\n250 Compressor\n251 Swing\n252 Fan_Speed\n253 Set_Temp\n254 Current_Temp\n255 Mode","x":550,"y":100,"wires":[]},{"id":"974a4d.55b57db","type":"mqtt-broker","z":"","name":"localhost","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- FireWizard
- Posts: 1886
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Haier AC with MQTT and nodered ?
Hello Eddie
@eddieb
Nice, I loaded the flow, but I could not find any change in the flow, except of a Comment at the top.
Even the fan commands are included.
Did you change anything?
Regards
@eddieb
Nice, I loaded the flow, but I could not find any change in the flow, except of a Comment at the top.
Even the fan commands are included.
Did you change anything?
Regards
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
I removed some FAN parts from "To Domoticz" and changed the numbers accordingly
in the filter "mode" I changed the leading caps to lowercase and the numbering ...
as the "mode=fan" fan is not controlled from domoticz, I did not remove the "fan" filter yet
I also changed the controls in domoticz accordingly
I removed some FAN parts from "To Domoticz" and changed the numbers accordingly
in the filter "mode" I changed the leading caps to lowercase and the numbering ...
as the "mode=fan" fan is not controlled from domoticz, I did not remove the "fan" filter yet
I also changed the controls in domoticz accordingly
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
Just 1 issue left ...
domoticz receives and sents "set_temp"
on mqtt level all seems OK
The webinterface of the device sometimes gets lost and displays a value of 4 or 5 degrees (as set_temp).
The display on the AC unit is fine ...
I did sent an email to the "instalator" and hope that this can be fixed, if not, I have to live with that
Big thanks for your help so far !
Just 1 issue left ...
domoticz receives and sents "set_temp"
on mqtt level all seems OK
The webinterface of the device sometimes gets lost and displays a value of 4 or 5 degrees (as set_temp).
The display on the AC unit is fine ...
I did sent an email to the "instalator" and hope that this can be fixed, if not, I have to live with that

Big thanks for your help so far !
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- FireWizard
- Posts: 1886
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Haier AC with MQTT and nodered ?
Hello @eddieb,
So , as I understand the Haier AC is communicating to Domoticz and vice versa.
Is there anything in the flow that is unclear and needs a further explanation.
I'm happy to do that.
One question.
There is something as connection, see the first picture. (connection = true).
Do you want some kind of monitoring?
If you change the temperature setting in Domoticz the setting is sent to the Haier AC and should be visible there.
In the flow I have limited the possible values between 16 and 30 degrees, as I was not sure what the effect was, if someone sends a value outside the range, However after studying the source code of the device, I saw it is done there as well, but it will not harm.
Is the indication in Domoticz stable (not switching to 4 or 5 degrees)?
Regards
So , as I understand the Haier AC is communicating to Domoticz and vice versa.
Is there anything in the flow that is unclear and needs a further explanation.
I'm happy to do that.
One question.
There is something as connection, see the first picture. (connection = true).
Do you want some kind of monitoring?
If you set the temperature on the Haier remote, Domoticz should display the same value.domoticz receives and sents "set_temp"
on mqtt level all seems OK
The webinterface of the device sometimes gets lost and displays a value of 4 or 5 degrees (as set_temp).
The display on the AC unit is fine ...
If you change the temperature setting in Domoticz the setting is sent to the Haier AC and should be visible there.
In the flow I have limited the possible values between 16 and 30 degrees, as I was not sure what the effect was, if someone sends a value outside the range, However after studying the source code of the device, I saw it is done there as well, but it will not harm.
Is the indication in Domoticz stable (not switching to 4 or 5 degrees)?
Regards
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
yes, all controls work as expected.
the AC remote controls and the AC display are in sync with domoticz.
it is just the webinterface of the USB-ESP that jumps to 4 or 5 C on the Set_Temp.
On the AC and in Domoticz they look correct.
maybe some combination of MQTT messages in a certain order does not work correct.
maybe I should debug the raw commands ...
yes, all controls work as expected.
the AC remote controls and the AC display are in sync with domoticz.
it is just the webinterface of the USB-ESP that jumps to 4 or 5 C on the Set_Temp.
On the AC and in Domoticz they look correct.
maybe some combination of MQTT messages in a certain order does not work correct.
maybe I should debug the raw commands ...
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- FireWizard
- Posts: 1886
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Haier AC with MQTT and nodered ?
Hi,
@eddieb
What about the connection monitoring?
Regards
@eddieb
If I had to decide, I would wait for an answer from "instalator". I don't think it has something to do with (a combination of) MQTT messages and debugging the RAW code is complex.maybe some combination of MQTT messages in a certain order does not work correct.
maybe I should debug the raw commands
What about the connection monitoring?
Regards
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
If the USB-ESP is unreachable my network monitor will alert me ...
I guess I will, I will install 2 other USB-ESP with node-red in a friends house in a couple of days ...FireWizard wrote: ↑Sunday 26 July 2020 18:48 If I had to decide, I would wait for an answer from "instalator". I don't think it has something to do with (a combination of) MQTT messages and debugging the RAW code is complex.
Depends what you mean by "connection monitoring" ...FireWizard wrote: What about the connection monitoring?
If the USB-ESP is unreachable my network monitor will alert me ...
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
- FireWizard
- Posts: 1886
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Haier AC with MQTT and nodered ?
@eddieb
I saw in the first picture of MQTT Explorer, you posted a topic myhome/topic/connection = true.
Should that be included?
Regards
I saw in the first picture of MQTT Explorer, you posted a topic myhome/topic/connection = true.
Should that be included?
Regards
-
- Posts: 335
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Haier AC with MQTT and nodered ?
@FireWizard
I just started MQTT explorer and that topic is not there yet, perhaps it is only availiable under certain conditions OR it was part of the initial firmware ..
For now, I don't think it is neccesary.
Ah,FireWizard wrote: ↑Sunday 26 July 2020 19:05 I saw in the first picture of MQTT Explorer, you posted a topic myhome/topic/connection = true.
Should that be included?
I just started MQTT explorer and that topic is not there yet, perhaps it is only availiable under certain conditions OR it was part of the initial firmware ..
For now, I don't think it is neccesary.
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Feeding ADSB https://adsb.im/home
Who is online
Users browsing this forum: No registered users and 1 guest