018-10-02 09:48:27 WARNING (MainThread) [homeassistant.loader] You are using a custom component for climate.broadlinkHysen which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-10-02 09:48:29 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform broadlinkHysen
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/climate/broadlinkHysen.py”, line 61, in setup_platform
mac_addr = binascii.unhexlify(config.get(CONF_MAC).encode().replace(b’:’, b’’))
binascii.Error: Non-hexadecimal digit found
so I guess this model is not working so have to send it back in order to get a different one.
But why the MAC adress can not be converted that is strange:
binascii.unhexlify ( hexstr )
Return the binary data represented by the hexadecimal string hexstr . This function is the inverse of b2a_hex(). hexstr must contain an even number of hexadecimal digits (which can be upper or lower case), otherwise an Error exception is raised.
This is the entry I use in my config.
climate:
platform: broadlinkHysen
name: Main Thermostat
host: 10.134.149.227
mac: ‘34ea349fc295’
target_temp_default: 20
target_temp_step: 0.5
scan_interval: 15
I can strongly recommend these Floureon Thermostats, they look good, give a good feel of quality and has a very good screen and touch functionality.
I got 12 of them working in my hass.io setup, they been running for mouth without any hiccups or problems.
I finally recieved some Beok BT-313 thermostats. They are configures in the app, but I am unable to get them working in HA. PS! I am running HA in docker, not HASSio.
Would someone please have a look at the log and config below to and let me know if you have any suggestions for me to try? Many thanks in advance
Excerpt from the HA log:
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/climate/broadlinkHysen.py”, line 74, in setup_platform
BroadlinkHysenClimate(hass, name, broadlink_device, target_temp_default, target_temp_step, operation_list)
File “/config/custom_components/climate/broadlinkHysen.py”, line 120, in init
self.update()
File “/config/custom_components/climate/broadlinkHysen.py”, line 356, in update
self.HysenData = self._broadlink_device.get_full_status()
File “/usr/local/lib/python3.6/site-packages/broadlink/init.py”, line 648, in get_full_status
payload = self.send_request(bytearray([0x01,0x03,0x00,0x00,0x00,0x16]))
File “/usr/local/lib/python3.6/site-packages/broadlink/init.py”, line 628, in send_request
raise ValueError(‘hysen_response_error’,‘first byte of response is not length’)
ValueError: (‘hysen_response_error’, ‘first byte of response is not length’)
I notice there is no folder in my container host named:
/usr/local/lib/python3.6/site-packages/broadlink/
Might this be an issue related to missing file/folder for init.py?
Hi! I took Mark’s code and began working on the module to add some new features and to hopefully get it in a shape that a PR could be made to get it to home-assistant. So far I’ve just done a bit of cleanups and added support for external temperature sensors.
At the moment I’m debugging why the module barfs if there are multiple sensors configured. Other improvements I’d like to make are supporting automatic device discovery (although I’m not sure how feasible that is) and device configuration using services.
@mark.carter, would you mind verifying that your code is licensed under Apache License 2.0 (the same license Home Assistant itself uses)?
@mairas, yep feel free to do what you want with the code I put together, I had intended to get it into Home Assistant but other things have got in the way )
On the auto discovery, if you look in the base broadlink there is a method to do autodiscovery (broadlink.discover), however I found it to be a little bit hit and miss, so opted for the declared version.
Yes, I found the discovery method and that’s what I thought of using. However, HA’s standard discovery uses an external netdisco module and is based on UPnP and mDNS. I’m not yet sure how to incorporate custom discovery methods there.
I guess the best of both worlds would be that you find the devices with autodiscovery and then save them. Then the previously discovered thermostats could work as reliably as the statically declared ones.
In case anyone is using the device with an external temperature sensor: have you noticed that the device would randomly revert back to the internal sensor? That has happened to me a couple of times and I don’t really see how the component code (either Mark’s or my own) could do that.
It’s really annoying because my bathroom thermostat is not even in the bathroom, so the floor had heated up to a balmy 31°C for a couple of days.
Bummer. If I tweak the temperature back and forth via HA, the device eventually reverts back to the internal sensor. Apparently the low level message format is not quite right.
Re the thermostat switching back to internal sensor - the issue is a bit difficult to debug because it doesn’t happen consistently. I do get the following error often on HA startup, and I think it might be related to that:
File "/home/homeassistant/.homeassistant/custom_components/climate/hysen.py", line 410, in update
self.HysenData = self._broadlink_device.get_full_status()
File "/srv/homeassistant/venv/lib/python3.5/site-packages/broadlink/__init__.py", line 648, in get_full_status
payload = self.send_request(bytearray([0x01,0x03,0x00,0x00,0x00,0x16]))
File "/srv/homeassistant/venv/lib/python3.5/site-packages/broadlink/__init__.py", line 612, in send_request
request_payload.append(crc & 0xFF)
TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'