core: Eq3 Smart bluetooth thermostats not working after upgrade from 0.95.4 to 0.96.2
Home Assistant release with the issue: 0.96.2
Last working Home Assistant release (if known): 0.95.4
Operating environment (Hass.io/Docker/Windows/etc.): Hass.io
Component/platform: climate/eq3btsmart
Description of problem: After upgrading from 0.95.4 to 0.96.2 my Eq3 Bluetooth Thermostats gets ‘Unavailable’ and not showing up in Lovelace GUI.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
- platform: eq3btsmart
devices:
Termostat Køkken:
mac: '00:1A:22:06:8B:88'
Termostat Stue mod vej:
mac: '00:1A:22:06:8B:D3'
Termostat Stue mod mark:
mac: '00:1A:22:06:7D:55'
Traceback (if applicable):
2019-07-20 09:26:57 ERROR (MainThread) [homeassistant.components.generic_thermostat.climate] Unable to update from sensor: could not convert string to float: 'unavailable'
Additional information:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 36 (12 by maintainers)
Commits related to this issue
- eq3bt: handle zero (closed valve) as a valid mode. fixes #25333 (#25905) — committed to home-assistant/core by rytilahti 5 years ago
Actually this has something to do with BLE module itself. If eq3 doesn’t update or respond, other BLE devices wont respond either. I experienced this with eq3 and a couple other BLE temp / flower sensors. After reboot they will work fine for an hour to a few days…
I wrote an automation to automatically reboot hass-io when theres no updated values from either BLE sensor after an hour.
Thanks a bunch for debugging @reaper7 & @matthiasfaeth! After digging a bit into the code with the help of your comments, I think I located the problem and created #25905 to fix it, it’d be great if you could test it out 😃.
The mode that is used by
availableis actually the one coming from the backend library, see https://github.com/rytilahti/python-eq3bt/blob/master/eq3bt/eq3btsmart.py#L138 – the correct solution is to make the comparison to bereturn self._thermostat.mode >= 0(as zero stands for closed as seen in here https://github.com/rytilahti/python-eq3bt/blob/master/eq3bt/eq3btsmart.py#L49).@reaper7, @rytilahti : I can confirm that reading and updating modes and temperatures seems to work well after changing the definition of the available property in climate.py.
Rather than unconditionally returning True I check for _thermostat.mode is not None:
I guess the check for _thermostat.mode > 0 no longer makes sense since _thermostat.mode 0 seems to be a valid mode, thus mode 0 shouldn’t mean not available in the new climate version. @rytilahti: please check whether this is a suitable modification.
Btw. I use the current dev branch version of climate.py (commit 4de97abc3aa83188666336ce0a015a5bab75bc8f) together with eq3bt v0.1.11.
@rytilahti - there can be 3 reasons for me:
_thermostat.mode value initialization during start problem, this value can be changed in two places: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/eq3btsmart/climate.py#L144 https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/eq3btsmart/climate.py#L189
the reason may be a new PRESET_NONE https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/eq3btsmart/climate.py#L16
Generally, as I mentioned in my previous comment: https://github.com/home-assistant/home-assistant/issues/25333#issuecomment-516045127, if available return hardcoded true then everything works correctly for me (change of operating mode, temperature change)
I checked reaction on python-eq3bt 0.1.9 and 0.1.11 and there is no change, the only change as it causes correct operation or not is HASS version, below 0.96 works, equal or above not
@rytilahti, thanks for looking into the issue. Please let me give you the debug logs you were asking for, the first with the default eq3bt v0.1.9, the second with v0.1.11.
With home-assistant:0.97.2 (from docker hub) I get the following debug log output for the default eq3bt v0.1.9:
With the same docker image except for a modified manifest.json mouted into the container in order to load eq3bt v0.1.11 I get the following debug log output:
All the readings are correct and exactly the current settings of my eq3 thermostat.
The ‘state’ in home-assistant 0.97.2 is ‘unavailable’ nevertheless. The last version of home-assistant working with eq3bt was 0.95.4.
Inside docker homeassistant/home-assistant:0.97.0 I executed
pip install --upgrade python-eq3btwhich upgraded from 0.1.9 to 0.1.11. eq3cli ran without problems in 0.1.11 but didn’t in 0.1.9. An upgrade seems to be the solution.However, after a restart of home-assistant the version of python-eq3bt is back to 0.1.9 and it won’t work.
Thanks axel0073 for pointing this upgrade out as the likely solution.
Upgrade python-eq3bt in eq3btsmart/manifest.json to a newer Version should fix it?
New Climate 1.0 requires some changes in submodules: https://github.com/home-assistant/home-assistant/pull/23899
maybe eq3btsmart also requires corrections?
I made a dirty change in: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/eq3btsmart/climate.py#L91
in propery “available” I always
instead
and it looks like I can read the temperature, there is no message unavailable anymore
INFO (MainThread) [homeassistant.components.climate] Setting up climate.eq3btsmart@HomeBro Sadly not, this is just the output of eq3cli. HA changed its way of handling these values, I guess 😦 @MartinHjelmare Thank u for the formatting!
If you need output of eq3cli, I can help 😃
I have the same problem:
https://github.com/home-assistant/home-assistant/issues/25266#issuecomment-513276891