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

After HA restart the initial values not accessable #44

Open lazlyhu opened 5 years ago

lazlyhu commented 5 years ago

Issue

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.

Temporary solution

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.

image

avbdr commented 4 years ago

A fix for this problem is available at http://smarttechdo.com/~avb/mqtt-group.diff patch adds --mqtt-group parameter using which ALL index.js instances will be able to listen same /status request. On HA startup automation will request /status from the air conditioners and will update its counters. Pretty simple

lazlyhu commented 4 years ago

Thank you the suggestion, I'll check.

Maybe the retain option from https://github.com/arthurkrupa/gree-hvac-mqtt-bridge/pull/55 could be a solution too.

OddyAte commented 4 years ago

A fix for this problem is available at http://smarttechdo.com/~avb/mqtt-group.diff patch adds --mqtt-group parameter using which ALL index.js instances will be able to listen same /status request. On HA startup automation will request /status from the air conditioners and will update its counters. Pretty simple

Hey guys, I have the same issue and I would really like to implement the fix suggested but honestly I have no idea how can I do that. I installed the add-on from Home Assistant.

orzechszek commented 3 months ago

Hi, Can anyone merge this fix?