Closed nnmm79 closed 5 years ago
If you publish message to ewpe-smart/devices/list
you will receive list with available devices and their ids.
After that you could publish to ewpe-smart/{deviceId}/set
with JSON string as payload (keys are similar to what you receive in status messages), for example
{"Pow": 1, "SetTem": 24}
to power unit on and set temperature to 24. List of all available attributes with their explanation you could find here https://github.com/tomikaa87/gree-remote (scroll to "Reading status of a device" section)
Even if i publish with MQTT.fx to ewpe-smart/devices/list I do not get any response and from logs I do not see anything happening. I suppose that ewpe-smart-mqtt should regurally check ewpe-smart/devices/list channel?
Is maybe a problem in my Network adress to scan devices setting? I assumed that 192.168.1.255 means that AC can line on any IP in 192.168.1.? range? Should I set here IP address from AC? If this is wrong, how comes that I receive status updates?
Do you receive status updates from your unit?
Yes, I do receive status updates
Could you please provide example of MQTT message you receive
Sorry for late delay, I had to come from work to get to output.
I am pasting this output from windows MQTT.fx app connected to my Mosquitto running on rasberry pi. I am subscribed to ewpe-smart/f4911e7289ab/status
{"Pow":0,"Mod":4,"TemUn":0,"SetTem":24,"TemRec":0,"WdSpd":1,"Air":0,"Blo":0,"Health":0,"SwhSlp":0,"Lig":0,"SwingLfRig":0,"SwUpDn":6,"Quiet":0,"Tur":0,"SvSt":0}
Looks good to me. Could you please try to publish to ewpe-smart/f4911e7289ab/set
with payload {"Pow":1}
. It should turn your unit on
It works. This is what was missing, I did not send any payload with my publish messages. It is true, that I still do not se any response from ewpe-smart/devices/list and ewpe-smart/{deviceId}/get, but in all honesty I do not need those. I get currect status and I can set variables so that is good enough for me. Thank you very much for your support.
Hi, Stas.
My steps for response from ewpe-smart/devices/list and ewpe-smart/{deviceId}/get is:
Where I'm wrong?
When I trying use build in mqtt, recieved next error:
[raspberrypi:~/ewpe-smart-mqtt] root #./node_modules/mqtt/mqtt.js publish ewpe-smart/devices/list
/home/sh/ewpe-smart-mqtt/nodemodules/mqtt/bin/pub.js:121
args.message = (args.message || args..shift()).toString()
^
TypeError: Cannot read property 'toString' of undefined
at Command.start [as func] (/home/sh/ewpe-smart-mqtt/node_modules/mqtt/bin/pub.js:121:51)
at Command.call (/home/sh/ewpe-smart-mqtt/node_modules/commist/index.js:105:8)
at Object.parse (/home/sh/ewpe-smart-mqtt/node_modules/commist/index.js:54:19)
at cli (/home/sh/ewpe-smart-mqtt/node_modules/mqtt/mqtt.js:33:15)
at Object.
I am running Mosquitto MQTT and ewpe-smart-mqtt on rasberry pi, each part in it's own Docker container. To debug I am using MQTT.fx on windows.
If I subscribe to "ewpe-smart/{IP}/status" I can see regular status messages, but I am unable to make the "publish" functionality work. Since I do not understand how it should work I do not know how to test it. I publish "ewpe-smart/{IP}/get" on MQTT, I can see in MQTT logs that message was published succesfully, but I do not understand what I need to do to make ewpe-smart-mqtt read it and forward it to AC unit.