arthurkrupa / gree-hvac-mqtt-bridge Goto Github PK
View Code? Open in Web Editor NEWMQTT Bridge for controlling Gree smart air conditioners, e.g. with Home Assistant or OpenHAB
License: GNU General Public License v3.0
MQTT Bridge for controlling Gree smart air conditioners, e.g. with Home Assistant or OpenHAB
License: GNU General Public License v3.0
Hi,
Thanks for the big work ;)
The state of AC is not refreshing.
I have on AC log:
0|HVAC_0 | [MQTT] Message "fixedTop" received for homeassistant/greehvac/swingvert/set
0|HVAC_0 | [UDP] Status updated on 1e53f1d2
0|HVAC_0 | [MQTT] Message "cool" received for homeassistant/greehvac/mode/set
0|HVAC_0 | [UDP] Status updated on 1e53f1d2
0|HVAC_0 | [MQTT] Message "auto" received for homeassistant/greehvac/mode/set
0|HVAC_0 | [UDP] Status updated on 1e53f1d2
0|HVAC_0 | [MQTT] Message "cool" received for homeassistant/greehvac/mode/set
0|HVAC_0 | [UDP] Status updated on 1e53f1d2
0|HVAC_0 | [MQTT] Message "22.0" received for homeassistant/greehvac/temperature/set
0|HVAC_0 | [UDP] Status updated on 1e53f1d2
0|HVAC_0 | [MQTT] Message "cool" received for homeassistant/greehvac/mode/set
0|HVAC_0 | [UDP] Status updated on 1e53f1d2
0|HVAC_0 | [MQTT] Message "fixedMid" received for homeassistant/greehvac/swingvert/set
0|HVAC_0 | [UDP] Status updated on 1e53f1d2
And on the MQTT log there is nothing.
It works when I change stats, but I'm not receiving any status updates at all.
What could be wrong?
I've also one minor problem with repo readme - it was confusing for me, that hass.io addon manual is on the same level as Running locally, so it looks like you have to do both things to get it work (but it is not the case, I guess?) :)
Hi there,
Is there any chance torun this with home assistant directly ?
I mean without having hass.io and docker option.
Giuseppe
Is it necessary to publish 374400 mqtt-message daily? 13 publish every 3 seconds.
Proposal:
[index.zip]
(https://github.com/arthurkrupa/gree-hvac-mqtt-bridge/files/3109528/index.zip)
var last_temperature = '';
if(last_temperature != deviceModel.props[commands.temperature.code].toString()){
client.publish(mqttTopicPrefix + '/temperature/get', deviceModel.props[commands.temperature.code].toString());
last_temperature = deviceModel.props[commands.temperature.code].toString();
}
I needed to restore my whole HA from backup due to some issues and after that addon stopped working and when I try to start it message from title is shown in logs. Tried rebuilding, reinstalling, removing and adding repo again, nothing helps. What is going on?
s6-overlay-suexec: fatal: can only run as pid 1
Hello
How I can map all the buttos like quiet, sleep, xfan, mode?
I added in the yaml, but it seems they are not supported.
I think that the missing button are the cause of the wifi issue for which I opened a separated request
Claudio
My friends, how do I deal with this problem?
On the advice of a programmer friend, the log output was increased.
[TAILING] Tailing last 15 lines for [/HVAC_/] process (change the value with --lines option),
/root/.pm2/logs/HVAC-0-out.log last 15 lines:,
0|HVAC_0 | [MQTT] Connecting to mqtt://192.168.2.6...,
0|HVAC_0 | [UDP] Connected to device at 192.168.2.235,
0|HVAC_0 | [MQTT] Connected to broker,
0|HVAC_0 | { t: 'pack',,
0|HVAC_0 | i: 1,,
0|HVAC_0 | uid: 0,,
0|HVAC_0 | cid: '',,
0|HVAC_0 | tcid: '',,
0|HVAC_0 | pack:,
0|HVAC_0 | 'LP24Ek0OaYogxs3iQLjL4GkmBNTzMwOtezbnQQvadq+F4Js8mGMCoIEjyN0Y3BfgpqjwKof9L5vI0JQ76AS2tMf4gaQXzcgJ2+74CkMVbRFsaH7s7hYVQ+YB/WaUbx4E0boasj6Z1Xpqyl4z/nH5nphFSaIjJJpCRNwGmJT+oECJymYSz66Z1I82cCtFYs6xqWyYvOKrHQL5tpN9F6TfeX10UcDO1f3eTw/NIuJ/oeE=' },
0|HVAC_0 | [UDP] New device registered: 42720b3a,
0|HVAC_0 | [UDP] Unknown message of type bindok: [object Object], [object Object]
Hi,
First of all I want to thank you guys for creating this integration. I have everything up and running and I can read values using my mqtt broker but I have a problem with the sending of the commands.
For some reasons (Unfortunally I'm not good in coding ...) the sending of the commands is working fine and the appliance is receiving the command and also excecuting it.
the problem is that the mqtt bridge is crashing with this output :
[UDP] New device registered: c6d18638
[UDP] Device c6d18638 is bound!
[MQTT] Message "1" received for home/greehvac/power/set
/sinclair/app/deviceFactory.js:178
this.device.props[opt] = pack.val[i]
^
TypeError: Cannot read properties of undefined (reading '0')
at /sinclair/app/deviceFactory.js:178:42
at Array.forEach ()
at Device._handleResponse (/sinclair/app/deviceFactory.js:177:16)
at Socket. (/sinclair/app/deviceFactory.js:45:47)
at Socket.emit (node:events:513:28)
at UDP.onMessage [as onmessage] (node:dgram:930:8)
So in the above example I'm just sending value 1 to turn the system on. The system is receiving this command and is also turning on but somewhere something is going wrong resulting in a crash and not accepting any commands anymore.
I allready tried to debug this myself but so far no luck. Any ideas ?
Hello,
First of all, you just saved me a whole lot of time, I was trying to reverse engineer the communication as well to integrate my A/C with Google Home.
The question is, I already "paired" the A/C with the app and I would like the app to continue to function in parallel with this integration. Is it really necessary to reset the WiFi and pair it again?
Thanks,
Mihai
Hello, after some researching i found the sources of android app (it was writen on apache cordova )
Could you please add support the new AC
Here is full sources on JavaScript: https://app.box.com/s/8eyj70vholfrl8lc4ib2mjf04sf86ejh
Please contact me when you need some additional info.
Thanks.
First, thank you for this mqtt module - It works flawlessly.
I’m a newbie to mqtt stuff, could please give a hint how to establish communication with several ACs at once and control them afterwards by publish commands. I’m controlling them from raspberry pi and do I have to start like several terminals with node.js preferences and unique IPs, prefixes (home/hvacgree1, home/hvacgree2, ...) and control them using this prefixes? Maybe a .sh script should work to automate this process of initialization? Thanks in advance
Since Mosquitto got updated to V3 every thing went south. I couldn't boot Hassio, and I had to start the configuration all over again.
I have managed to get my Tasmota devices to work, but I couldn't configure Gree Hvac bridge. I'm not using login info on Mosquitto. Is there a way to configure this addon on V3 Mosquitto update, or is it broken?
Edit: I got it working... Not sure how, but I can confirm it works.
Hello
I got the two a/c split disconnected from WiFi random if I use this tool.
Do you think is it possible?
Also: I know that on is no support.
Do you have any workaround?
My need is control via Google Home
Regards
Claudio
Love this app. Works like a treat.
Anyone else having issues with the heatpump going back into AP mode therefor disconnects to my wifi and I can no longer talk to it with gree2mqtt.
Have setup Wifi on Heatpump using the GREE+ android app. Do I have to use the netcat command in the setup?
Thank you.
Hi Arthur and thank you for this great repo.
I'm going to implement integration Gree HVAC with Homey and reuse HVAC logic from this repo. But this repo has not only interaction logic but mqtt bridge as well.
It will be good to have bridge and HVAC interaction logic (from app
directory) in separate modules.
I know that I still can use your module and use only deviceFactory
in my module but it will have additional not used functional.
What do you think about separating logic?
Starting up container emits
DeprecationWarning: Socket.prototype._handle is deprecated
in log file.
Are UDP datagram calls private? In the future public calls may not function as intended.
https://nodejs.org/api/deprecations.html#deprecations_dep0112_dgram_private_apis
The command '/bin/ash -o pipefail -c apk add --no-cache jq nodejs nodejs-npm && npm set unsafe-perm true' returned a non-zero code: 2
Hi,
Thanks for this handy utility :) I managed to used it successfully with one of my AC, but then I enabled the WiFi on the second one, and the script can not start up any more. I get this traceback:
$ node index.js --mqtt-broker-url="mqtt://localhost" --mqtt-topic-prefix="home/greehvac" --hvac-host="192.168.88.255"
[MQTT] Connected to broker on mqtt://localhost
[UDP] Connected to device at 192.168.88.255
[UDP] New device registered: Nappali
[UDP] New device registered: Emelet
[UDP] Device Emelet is bound!
crypto.js:183
var ret = this._handle.final();
^
Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
at Decipheriv.final (crypto.js:183:26)
at Object.decrypt (/home/major/Downloads/gree-hvac-mqtt-bridge/app/encryptionService.js:21:56)
at Device._handleResponse (/home/major/Downloads/gree-hvac-mqtt-bridge/app/deviceFactory.js:150:40)
at Socket.Device.socket.on (/home/major/Downloads/gree-hvac-mqtt-bridge/app/deviceFactory.js:47:51)
at emitTwo (events.js:126:13)
at Socket.emit (events.js:214:7)
at UDP.onMessage [as onmessage] (dgram.js:659:8)
Does the script support more than one devices at the same time?
I am trying to make this script to work on hassio on pi3.
But seams like gree air conditioner and this plugin can not work together :/
I get entites climate but when i change any settings gree does not recrive this comand.
This is script that i have instaled on hassio
CONFIG:
{ "hvac_host": "192.168.1.111", "mqtt": { "broker_url": "192.168.1.131:1883", "topic_prefix": "home/greehvac", "username": "homeassistant", "password": "hello" } }
`climate:
platform: mqtt
name: Gree HVAC
current_temperature_topic: "home/greehvac/temperature/get"
temperature_command_topic: "home/greehvac/temperature/set"
temperature_state_topic: "home/greehvac/temperature/get"
mode_state_topic: "home/greehvac/mode/get"
mode_command_topic: "home/greehvac/mode/set"
fan_mode_state_topic: "home/greehvac/fanspeed/get"
fan_mode_command_topic: "home/greehvac/fanspeed/set"
swing_mode_state_topic: "home/greehvac/swingvert/get"
swing_mode_command_topic: "home/greehvac/swingvert/set"
power_state_topic: "home/greehvac/power/get"
power_command_topic: "home/greehvac/power/set"
payload_off: 0
payload_on: 1
modes:
configuration.yaml has:
# Change MQTT_TOPIC_PREFIX to what you've set in addon options
and addon configuration template is:
"mqtt": {
"broker_url": "mqtt://localhost",
},
"devices": [
{
"hvac_host": "192.168.0.255",
"mqtt_topic_prefix": "/home/hvac01"
},
{
"hvac_host": "192.168.0.254",
"mqtt_topic_prefix": "/home/hvac02"
}
]
so if there are multiple devices, topic prefix is different for each device, so what should the global configuration prefix be?
Setting any of my devices to Auto mode and adjusting the temperature the temperature reverts after a few seconds.
I get an error when starting this stuff.
npm version: 8.18.0
node version: 16.13.0
pi@raspberrypi:~/gree-hvac-mqtt-bridge $ node index.js --hvac-host="192.168.10.71" --mqtt-broker-url="mqtt://192.168.10.2:1883" --mqtt-topic-prefix="domoticz/in" --mqtt-username="" --mqtt-password=""
[MQTT] Connecting to mqtt://192.168.10.2:1883...
[MQTT] Connected to broker
[UDP] Connected to device at 192.168.10.71
[UDP] New device registered:
[UDP] Unknown message of type bindok: {
t: 'pack',
i: 1,
uid: 0,
cid: '',
tcid: 'app',
pack: 'FtZAY6UHKBwtaI55He0IneqJYxO3Vlz4+hb0PtbAybYXlqXCgDxwDeT3Y77VfVElYs+kEFxiRgA9LpeTA16TdA=='
}, { r: 200, t: 'bindok', mac: '', key: 'oxk22YP1uj0S97fd' }
...and then silence.
I think that "bindok" is referring to binding is ok, isn't it?
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service connection.context(msg)) File "/usr/src/homeassistant/homeassistant/core.py", line 1150, in async_call self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1172, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 194, in handle_service required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 316, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 337, 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/src/homeassistant/homeassistant/components/climate/__init__.py", line 491, in turn_off raise NotImplementedError() NotImplementedError
my config:
name: Gree AC
current_temperature_topic: "home/gree/temperature/get"
temperature_command_topic: "home/gree/temperature/set"
temperature_state_topic: "home/gree/temperature/get"
mode_state_topic: "home/gree/mode/get"
mode_command_topic: "home/gree/mode/set"
fan_mode_state_topic: "home/gree/fanspeed/get"
fan_mode_command_topic: "home/gree/fanspeed/set"
swing_mode_state_topic: "home/gree/swingvert/get"
swing_mode_command_topic: "home/gree/swingvert/set"
power_state_topic: "home/gree/power/get"
power_command_topic: "home/gree/power/set"
# Keep the following as is
payload_off: 0
payload_on: 1
modes:
- "off"
- "auto"
- "cool"
- "heat"
- "dry"
- "fan_only"
swing_modes:
- "default"
- "full"
- "fixedTop"
- "fixedMidTop"
- "fixedMid"
- "fixedMidBottom"
- "fixedBottom"
- "swingBottom"
- "swingMidBottom"
- "swingMid"
- "swingMidTop"
- "swingTop"
fan_modes:
- "auto"
- "low"
- "mediumLow"
- "medium"
- "mediumHigh"
- "high"
latest hassio 0.94.3
addon config
{
"mqtt": {
"broker_url": "mqtt://10.240.1.240",
"username": "xxx",
"password": "xxx"
},
"devices": [
{
"hvac_host": "10.240.1.216",
"mqtt_topic_prefix": "home/gree"
}
]
}
I've setup my 4 units, but I'm getting the following errors repeatedly at the moment. I get the feeling I'm missing a config or similiar.
[UDP] Device 1e4837fc is bound!
0|HVAC_0 | TypeError: Cannot read property 'toString' of undefined
0|HVAC_0 | at Object.onStatus (/usr/src/app/index.js:57:96)
0|HVAC_0 | at Device._handleResponse (/usr/src/app/app/deviceFactory.js:171:20)
0|HVAC_0 | at Socket.Device.socket.on (/usr/src/app/app/deviceFactory.js:45:47)
0|HVAC_0 | at Socket.emit (events.js:182:13)
0|HVAC_0 | at UDP.onMessage [as onmessage] (dgram.js:628:8)
0|HVAC_0 | [MQTT] Connecting to mqtt://192.168.1.3 as "local-user"...
0|HVAC_0 |
Here is my config
{ "mqtt": { "broker_url": "mqtt://192.168.1.3", "username": "local-user", "password": "xxxxxxxxxxx" }, "devices": [ { "hvac_host": "192.168.1.157", "mqtt_topic_prefix": "home/greehvacbedroomup" }, { "hvac_host": "192.168.1.97", "mqtt_topic_prefix": "home/greehvac-bedroom-down" }, { "hvac_host": "192.168.1.112", "mqtt_topic_prefix": "home/greehvac-kitchen" }, { "hvac_host": "192.168.1.83", "mqtt_topic_prefix": "home/greehvac" } ] }
I've been trying to automate the AC to pre-heat our living room in the morning, however, it always come on at 20deg Auto mode hear is my code.
- alias: Pre-heat Living Room initial_state: 'on' trigger: platform: time at: '05:45:00' action: - service: climate.set_temperature data: entity_id: climate.living_room_ac temperature: 18 operation_mode: Heat
Not sure if the issue is mqtt-bride, hassio, or possibly the thermostat control I have on my dashboard.
Is it possible to add the Health, Sleep and Light options to hassio, Iguess they aren't added because they aren't part of the standard climate control. Does that mean it's best to add them as switches?
Hi,
First of all: sorry if this is the wrong place to create this topic.
I'm using hass.io (Raspberry Pi 3) for my Home Automation. I recently bought 2 AC's which support the Gree protocol.
Im trying to get your Module to work. I did the following things:
{
"hvac_host": "192.168.2.24",
"mqtt": {
"broker_url": "mqtt://localhost",
"topic_prefix": "home/greehvac"
}
}
Note: 192.168.2.24 is the IP of one of my AC's
Also i'm assuming here that it will use the "embedded" Hassio MQTT broker
Last i added this config:
climate:
- platform: mqtt
# Change to whatever you want
name: Zolderkamer HVAC
# Change MQTT_TOPIC_PREFIX to what you've set in addon options
current_temperature_topic: "home/greehvac/temperature/get"
temperature_command_topic: "home/greehvac/temperature/set"
temperature_state_topic: "home/greehvac/temperature/get"
mode_state_topic: "home/greehvac/mode/get"
mode_command_topic: "home/greehvac/mode/set"
fan_mode_state_topic: "home/greehvac/fanspeed/get"
fan_mode_command_topic: "home/greehvac/fanspeed/set"
swing_mode_state_topic: "home/greehvac/swingvert/get"
swing_mode_command_topic: "home/greehvac/swingvert/set"
power_state_topic: "home/greehvac/power/get"
power_command_topic: "home/greehvac/power/set"
# Keep the following as is
payload_off: 0
payload_on: 1
modes:
- none
- auto
- cool
- dry
- fan
- heat
swing_modes:
- default
- full
- fixedTop
- fixedMidTop
- fixedMid
- fixedMidBottom
- fixedBottom
- swingBottom
- swingMidBottom
- swingMid
- swingMidTop
- swingTop
fan_modes:
- auto
- low
- mediumLow
- medium
- mediumHigh
- high
With this first setup i do see the climate.zolderkamer_hvac, but it doesn't actually work.
The second thing i tried is install the Mosquitto broker from the Hass.io Addon system. Then started the Mosquitto broker and finally started your Gree Bridge Addon. In this setup I do not see the climate.zolderkamer_hvac at all.
EDIT: Using the second way I had to add the following to my config (I didn't read this before):
mqtt:
broker: core-mosquitto
Still no luck though.
Am I missing something?
Currently only unprotected MQTT brokers are supported.
Hi,
Tried the project but did not work for me and I am assuming it's because I have a Gree VRF system with 1 compressor and 4 internal units. They are exposed by a single IP.
I wiresharked the commans and what i foudn was that after the scan request {"t": "scan"} the JSON response has an extra field that seems to report how many internal units the unit has - the pack of the JSON return below:
"t": "dev",
"cid": "",
"bc": "",
"brand": "",
"catalog": "",
"mac": "b4430dd50fd2",
"mid": "60",
"model": "",
"name": "æ ¼å��空è°�",
"lock": 0,
"series": "",
"vender": "",
"ver": "",
"subCnt": 4 (does this mean it has 4 internal units)? seems to imply
}
The Gree Mobile App will then send the bind request as per the pack below:
{ "mac": "b4430dd50fd2",
"t": "bind",
"uid": 0
}
and return the unique key as per the below pack:
**{
"r": 200,
"t": "bindOk",
"mac": "b4430dd50fd2",
"key": "<UNIQUE KEY>"
}**
The app then sends the JSON request below:
{"cid":"app","i":0,"pack":"huCTfZr+tmfrmjj5cppWoTuRTSHPH07rvUULx9II4CbtaD8c5Kb1s8De+taRtAFLGRthyav6ml/pLwGix91Arw==","t":"pack","tcid":"b4430dd50fd2","uid":1677840}
and the A/C responds with a JSON request with the pack below that clearly shows the 4 internal units that form part of the VRF.
**{
"t": "subList",
"c": 4,
"i": 0,
"list": [
{
"mac": "5259911b000000",
"name": "æ ¼å��空è°�",
"mid": "604b",
"model": "",
"lock": 0
},
{
"mac": "fa7ad91a000000",
"name": "æ ¼å��空è°�",
"mid": "604b",
"model": "",
"lock": 0
},
{
"mac": "61fed31a000000",
"name": "æ ¼å��空è°�",
"mid": "604b",
"model": "",
"lock": 0
},
{
"mac": "dcecd31a000000",
"name": "æ ¼å��空è°�",
"mid": "604b",
"model": "",
"lock": 0
}
],
"r": 200
}**
From them on to get set command I will need to use the relevant mac of the sub ac for the A/C to work.
By any chance; are there any plans to support VRF systems? I would be happy to help with debugging etc. I don't use Home Assistant but can test via MQTT.
Thank you.
Since you are doing message = message.toString(); when you do it will always translate to 1 (even if you send 0 from mqtt - because toString -> "0" and "0" ? 1 : 0 is 1 always
you need to change hvac.setPower(message) to hvac.setPower(parseInt(message)); in index.js
If you use domain name insted of IP address, the addon will stop.
{
"hvac_host": "192.168.210.80",
"mqtt": {
"broker_url": "mqtt://my.home.domain:1883",
"topic_prefix": "home/greehvac",
"username": "xxx",
"password": "***"
}
}
The addon don't write any error in the log.
After I changed the broker_url to IP address then it worked.
I'm trying to install the addon on my hassio install, however I'm a little confused by the step at https://github.com/arthurkrupa/gree-hvac-mqtt-bridge#running-addon-locally
Do I need to add the code to my hassio options.json file, as it looks a completely different format.
Thanks
Just updated to the latest version and it looks like it doesn't like that it can't find swinghor on my model
found 0 vulnerabilities
[MQTT] Connected to broker on mqtt://192.168.1.36
[UDP] Connected to device at 192.168.1.13
[UDP] New device registered: Office AC
[UDP] Device Office AC is bound!
/usr/src/app/index.js:33
client.publish(mqttTopicPrefix + '/swinghor/get', commands.swingHor.value.getKeyByValue(deviceModel.props[commands.swingHor.code]).toString());
^
TypeError: Cannot read property 'toString' of undefined
at Object.onStatus (/usr/src/app/index.js:33:135)
at Device._handleResponse (/usr/src/app/app/deviceFactory.js:174:26)
at Socket.Device.socket.on (/usr/src/app/app/deviceFactory.js:47:51)
at emitTwo (events.js:126:13)
at Socket.emit (events.js:214:7)
at UDP.onMessage [as onmessage] (dgram.js:659:8)```
Hello, a small update ahead.
19-04-18 16:35:17 WARNING (MainThread) [hassio.addons.data] Can't read /data/addons/git/9b38ba57/config.json: required key not provided @ data['arch']. Got None
you have to add in config.json
"arch": [ "aarch64", "amd64", "armhf", "armv7", "i386" ],
Hello,
Not an issue, but can't get it to work despite days of trying, reading all the issues in hopes for some clues. Everything seems to run fine, but no communication to the Gree/Crown unit. It seems that the bridge is communicating with the MQTT broker. The bridge also confirms it is connected to the GREE hvac host, but it seems to say that regardless of what IP address it is configured for.
Gree-MQTT Bridge Console:
pi@RPI:~/gree-hvac-mqtt-bridge $ node index.js \
> --hvac-host="192.168.10.74" \
> --mqtt-broker-url="mqtt://192.168.10.50" \
> --mqtt-topic-prefix="home/greehvac" \
> --mqtt-username="" \
> --mqtt-password=""
[MQTT] Connecting to mqtt://192.168.10.50...
[MQTT] Connected to broker
[UDP] Connected to device at 192.168.10.74
The above is the only messages from the console, no error or progress, so I'm not sure if it's working.
I'm running Gree-MQTT bridge on a RPI with Node.js version 10.17.0 to a MQTT mosquito broker 1.5.8 on windows. All devices are on the same network and the older Gree G-Life app 1.1.0 for IOS works fine.
Mosquitto Console:
1573863194: New connection from 192.168.10.162 on port 1883.
1573863194: New client connected from 192.168.10.162 as mqttjs_f22da782 (c1, k60).
1573863194: No will message specified.
1573863194: Sending CONNACK to mqttjs_f22da782 (0, 0)
1573863226: Received PINGREQ from mosqsub|6872-CONTROL
1573863226: Sending PINGRESP to mosqsub|6872-CONTROL
1573863232: New connection from ::1 on port 1883.
1573863232: New client connected from ::1 as mosqpub|3800-CONTROL (c1, k60).
1573863232: No will message specified.
1573863232: Sending CONNACK to mosqpub|3800-CONTROL (0, 0)
1573863232: Received PUBLISH from mosqpub|3800-CONTROL (d0, q0, r0, m0, 'home/greehvac/mode/set', ... (3 bytes))
1573863232: Sending PUBLISH to mosqsub|6872-CONTROL (d0, q0, r0, m0, 'home/greehvac/mode/set', ... (3 bytes))
1573863232: Received DISCONNECT from mosqpub|3800-CONTROL
1573863232: Client mosqpub|3800-CONTROL disconnected.
1573863251: New connection from ::1 on port 1883.
1573863251: New client connected from ::1 as mosqpub|13948-CONTROL (c1, k60).
1573863251: No will message specified.
1573863251: Sending CONNACK to mosqpub|13948-CONTROL (0, 0)
1573863251: Received PUBLISH from mosqpub|13948-CONTROL (d0, q0, r0, m0, 'home/greehvac/power/set', ... (1 bytes))
1573863251: Sending PUBLISH to mosqsub|6872-CONTROL (d0, q0, r0, m0, 'home/greehvac/power/set', ... (1 bytes))
1573863251: Received DISCONNECT from mosqpub|13948-CONTROL
1573863251: Client mosqpub|13948-CONTROL disconnected.
1573863254: Received PINGREQ from mqttjs_f22da782
1573863254: Sending PINGRESP to mqttjs_f22da782
Publish test commands with Mosquitto:
C:\Mos>mosquitto_pub -h localhost -t home/greehvac/mode/set -m "off"
C:\Mos>mosquitto_pub -h localhost -t home/greehvac/power/set -m 0
Unfortunately, I can't tell if the bridge is working or if there's a problem elsewhere. Is there a way to enable a "verbose" mode? I have been using the above mosquitto publish commands to test and see if the Gree reacts. In addition there seems to be no response to other publish/set commands or subscribe/get commands.
I'm sorry to ask for help here as I understand this is not a support forum, but I'm just not getting anywhere. If there were more logs or diagnostic messages I might be able to work it out, but I'm stuck. Any help would be most appreciated!
Let me start by thanking you for this absolutely great add-on, which was my reason for buying Gree ACs. I have managed to add one of the ACs and it's working great, but I'm trying to figure out the configuration for adding three ACs ?
Your help is much appreciated..
Thanks,
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
Getting spammed with invalid mode after upgrading to 1.1.0
I have added the new configuration.yaml options according to the readme
climate office_ac:
- platform: mqtt
# Change to whatever you want
name: Office AC
# Change MQTT_TOPIC_PREFIX to what you've set in addon options
current_temperature_topic: "officeac/temperature/get"
temperature_command_topic: "officeac/temperature/set"
temperature_state_topic: "officeac/temperature/get"
mode_state_topic: "officeac/mode/get"
mode_command_topic: "officeac/mode/set"
fan_mode_state_topic: "officeac/fanspeed/get"
fan_mode_command_topic: "officeac/fanspeed/set"
swing_mode_state_topic: "officeac/swingvert/get"
swing_mode_command_topic: "officeac/swingvert/set"
power_state_topic: "officeac/power/get"
power_command_topic: "officeac/power/set"
# Keep the following as is
payload_off: 0
payload_on: 1
mode_state_template: "{{ value_json }}"
modes:
- "off"
- "auto"
- "cool"
- "heat"
- "dry"
- "fan_only"
swing_modes:
- "default"
- "full"
- "fixedTop"
- "fixedMidTop"
- "fixedMid"
- "fixedMidBottom"
- "fixedBottom"
- "swingBottom"
- "swingMidBottom"
- "swingMid"
- "swingMidTop"
- "swingTop"
fan_modes:
- "auto"
- "low"
- "mediumLow"
- "medium"
- "mediumHigh"
- "high"
If the HA started later then the MQTT bridge we don't get the initial values. It's happening often when you touch to HA config files, and restart it because this. It would be great to somehow just load the current values of the climate, without setting a new one.
To solve it, I added a small solution to my NodeRed, which restart this AddOn, but it's not too elegant. I have a MQTT message when HA started (based on a simple HA automatisation), I can catch that.
My router appears to change the IP address for the AC after a reboot, my problem is that the add-on uses the ip address to identify the aircon, rather than a hostname (not sure the ac units have one) or a mac addresss.
My router doesn't allow me to allocate static ip addresses, can anyone suggest a solution?
i read the docs i'm on a windows machine downloaded
cygwin and typed command below
echo -n "{"psw": "YOUR_WIFI_PASSWORD","ssid": "YOUR_WIFI_SSID","t": "wlan"}" | nc -cu 192.168.1.1 7000
as written in the docs replacing my wifi info
it it says there is no such command so i searched netcat docs and indeed there is no cu comand
did i miss something
thanks
dave
Hi!
Hass keeps showing me these errors in the log file:
2019-03-14 01:15:44 ERROR (MainThread) [homeassistant.components.mqtt.climate] Invalid mode: off
As you can see it is quite common:
Invalid mode: off
1:24 components/mqtt/climate.py (ERROR) - message first occured at 1:22 and shows up 45 times
this was generated in a couple minutes only.
Could you please look into it?
There is nothing in the add-on's log.
Thanks!
B
I've got everything setup.
How do I change it to display Fahrenheit instead of Celsius?
Hey.
I've noticed that HVAC may return current room temperature in TemSen
property.
It may be backported to this project from inwaar/gree-hvac-client#11
Can package.json be modified to allow installation in node.js running on Windows?
Is this project compatible with the Gree HVAC GWH12ACC and GWH09QB? Each of those have Wi-Fi on board.
Thank you!
Hello, the bridge works great so far but i'd like to see support for the extra AC functionality
Extra functionality includes:
The people at OpenHAB have already made a binding with all the extras i've mentioned above
Forum link: https://community.openhab.org/t/new-gree-air-conditioner-binding/36429
OpenHAB Binding: https://github.com/jllcunha/openhab-greeair-binding/
Would be great if we could get this functionality on HA :)
Edit: i just realised that there's already a pull request for this functionality ( #13 ) but it hasn't been updated since 22 Jul
Hi, Thanks for developing and sharing the code. I tried to run the wifi command on my macbook while connected to the AC in AP mode.
There was one problem initially when trying to run the nc
command. I then realised that when copying the command from GitHub, the quotes are not in the right encoding. Notice the two different kinds of quotes in \”ssid\"
.
After I fixed that, something interesting happed.
This is what it returns:
{"t":"ret","r":200}
It then stays there with the cursor flashing.
Can you please write in the readme what the output for that command should be.
Regards,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.