arthurkrupa / gree-hvac-mqtt-bridge

MQTT Bridge for controlling Gree smart air conditioners, e.g. with Home Assistant or OpenHAB
GNU General Public License v3.0
131 stars 63 forks source link

Can't send action with Home Assistant entity #31

Open danieletdg opened 5 years ago

danieletdg commented 5 years ago

Hi guys, I have a Daitsu A / C, and I don't know why, but I think it uses the same hardware wifi as the Gree. I installed the Hassio addon and I think everything is ok. In the log section I have this:

[MQTT] Connected to broker on mqtt://xxx.xxx.xxx.xxx:1883 [UDP] Connected to device at xxx.xxx.xxx.xxx [UDP] New device registered: xxxxxxxx [UDP] Device xxxxxxxx is bound!

I created the entity with Home assistant but I can't give it any action. In the section Developers Tools -> Services if I call the service climate.turn_on I have this error in the home-assistant.log:

raceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py", line 122, in handle_call_service connection.context(msg)) File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1138, in async_call self._execute_service(handler, service_call)) File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1160, in _execute_service await handler.func(service_call) File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 188, in handle_service self._platforms.values(), func, call, service_name File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 314, in entity_service_call future.result() # pop exception if have File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/service.py", line 328, in _handle_service_platform_call await getattr(entity, func)(**data) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.7/site-packages/homeassistant/components/climate/__init__.py", line 485, in turn_on raise NotImplementedError() NotImplementedError

I use the Hassio plugin mosquitto for the mqtt broker, this is my entity in configuration.yaml: `climate:

any idea's?

Thanks, Daniele

dragonflyuk commented 5 years ago

I think you need to change the "MQTT_TOPIC_PREFIX" parts to what you set in the addon config section.

danieletdg commented 5 years ago

Hi dragonflyuk i did it! But the home-assistant.log are clean and nothing happens if i interact with the home assistant entity. I try to sub a command with mosquitto terminal command like this:

mosquitto_pub -h 127.0.0.1 -t home/greehvac/power/set -m "on"

but it gives me this error: Error: Connection refused

N.B. i have a raspberry pi 3 model b+ with Hassio.io flashed, running correctly mosquitto and the last version of gree-hvac-mqtt-bridge.