New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broadlink sensor issue #11795
Comments
I'm getting this too, on 0.61.1.
|
I'm also getting a bunch of these in the logs:
|
The Broadlink sensor has not changed since August. |
If the received temperature is not between -50 and 150, we reconnect and ask for a new value 3 times. And then we will try again after a while |
Last night the same issue occurred with the RM3 too. Sensor stopped recording with following warning. First error message before sensor read failure is following error, which might be unrelated:
|
Also, this related warning appears over time: |
I have set independent script that collects temperature using broadlink lib. The script is collecting temperature every minute. I guess that means that HE sensor is not able to recover after multiple incorrect reads. |
Hmm, can find any errors in the code. Here is the code https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/sensor/broadlink.py#L102 |
No, this time no error or warning at all in time of misread or later on. |
Ok, just if there something you do not understand. The data are validated here: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/sensor/broadlink.py#L126 If invalid data are received it tries to reauthorize and ask for new data: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/sensor/broadlink.py#L134 You can try to add |
An idea by looking at the code. |
Hmm, it should do auth() if it fails the first time: |
Oh right, it would do reauth on first retry. Ok, I will add some debugging messages so I can see is it some kind of Throttle class issue that stops triggering update. |
If the data object does not contain the type we are asking this will fail: So it would be possible to change that line to Then self._state will be sat to None and displayed in the gui as Unknown |
Hmm, that does not pass at update:
|
You are missing a
|
Oh right. Sorry. |
I do not think this solve your problem. |
Did not have to wait for long. Here is what I have found:
The first Warning msg is my debug message to show data from the sensor. There you can see that sensor itself return some bad data. Data that made exception: |
I think you have introduced this error. But it seems that we do not except the correct error. Try to change this line https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/sensor/broadlink.py#L132 to; |
Ok. Yea, it looks like an unhandled exception was the issue. |
Another issue appears. Debug messages showing the attempt to read temperature but failing at auth(). (do not succeed in any retry). |
Looks like the problem does not appear anymore in 0.62.0 (0.62.1). At least for now. |
We need to reopen this issue. The solution is to switch to the non-persistent connection for sensors. That way, every time sensor needs to be read, connection and auth to Broadlink RM is established. Solution that work for me is at the link |
@Paxy I'm sorry, Where I need to put this file? /custom_components/sensor/ ? |
I have replaced original one /components/sensors/broadlink.py with modified version. Since than, no single freeze ocured. |
@Danielhiversen can you make such modifications as part of future releases? |
Thanks, I will try that. |
This file fix the issue, when I have 2 RM2 sensors? I can't get working both at the same time... |
This issue does not have anything to do with it.
|
@Paxy : You are welcome to open a pull request we your changes |
@Danielhiversen, I have added pull request. Just saw that I have added it to DEV branch with broadlink lib 0.8.0. Should I add to Master branch too? |
Home Assistant release (
hass --version
):0.61
But noticed issue few minor releases before.
Python release (
python3 --version
):Python 3.5.2
Broadlink lib ver 0.5
Component/platform:
Broadlink Sensor
Description of problem:
On RM2 device, broadlink sensor stops recoding temperature state at some moment. There was no noticeable error in the log. At the same time, RM3 is working perfectly. When HA stops reading temperature, I can still get correct temperature using Broadlink e-Control. HA restart solve the issue. No RM2 restart is required.
My guess that issue is related to resolved issue over 6 months old when HA sometimes read faulty (huge number) temperature. That issue was related to python-broadlink.
Both RM2 and RM3 have the same firmware v20028.
Expected:
In case of RM2 temperature read error, broadlink sensor should restart and reinitiate connection to RM2 so it can keep trying to get temperature value.
The text was updated successfully, but these errors were encountered: