ralphm2004 / broadlink-thermostat

link broadlink thermostat with mqtt to openhab
GNU General Public License v3.0
35 stars 15 forks source link

issues while running in a multi interface environment #15

Open kovaga opened 5 years ago

kovaga commented 5 years ago

UPDATE: Fixed it. My bad, didnt pay enough attention to little things I was having problem discovering the devices rnning mosquito on a multi interface server ad solved it by modifying the code and setting the fixed IP addresses of the thermostats as per

++++++ To do so, I changed line 213:

devices = broadlink.discover(timeout=conf.get('lookup_timeout', 5)) To something like:

hysen = 0x4EAD d1 = broadlink.gendevice(hysen, ('192.168.1.61', 80), bytearray(b'>\xenn\xebw\x0fx')) d2 = broadlink.gendevice(hysen, ('192.168.1.62', 80), bytearray(b'\x18\vebw\x0fx')) d3 = broadlink.gendevice(hysen, ('192.168.1.63', 80), bytearray(b'\xb5\xef\xeb\x0fx')) d4 = broadlink.gendevice(hysen, ('192.168.1.64', 80), bytearray(b'\x93@4\xea4')) devices = [d1, d2, d3, d4] ++++++

However, in such setup I am only able to receive updates over the MQTT. When I try to publish using mosquito_pub the changes are not applied to the device. On a contrary, when I run the same command in a single interface environment all works fine.

Any ideas on how to solve that?