core icon indicating copy to clipboard operation
core copied to clipboard

Hive integration has no climate data

Open pauljsgreen opened this issue 1 year ago • 43 comments

The problem

The Hive integration installs fine but i only get battery levels on thermostat and all TRVs - no temperature information

What version of Home Assistant Core has the issue?

2022.10.3

What was the last working version of Home Assistant Core?

approx 6 weeks ago

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Hive

Link to integration documentation on our website

No response

Diagnostics information

Logger: homeassistant.components.water_heater Source: components/hive/init.py:150 Integration: Water Heater (documentation, issues) First occurred: 15:40:45 (1 occurrences) Last logged: 15:40:45

Error while setting up hive platform for water_heater Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/hive/water_heater.py", line 54, in async_setup_entry entities.append(HiveWaterHeater(hive, dev)) File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 150, in init model=self.device["deviceData"]["model"], KeyError: 'model'

Logger: homeassistant.components.climate Source: components/hive/init.py:150 Integration: Climate (documentation, issues) First occurred: 15:40:45 (1 occurrences) Last logged: 15:40:45

Error while setting up hive platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 64, in async_setup_entry entities.append(HiveClimateEntity(hive, dev)) File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 113, in init super().init(hive_session, hive_device) File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 150, in init model=self.device["deviceData"]["model"], KeyError: 'model'

Logger: homeassistant.components.sensor Source: components/hive/sensor.py:66 Integration: Sensor (documentation, issues) First occurred: 15:40:45 (2 occurrences) Last logged: 15:40:45

hive: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 703, in async_device_update await task File "/usr/src/homeassistant/homeassistant/components/hive/sensor.py", line 66, in async_update self._attr_native_value = self.device["status"]["state"] KeyError: 'status'

Logger: homeassistant.components.binary_sensor Source: components/hive/binary_sensor.py:76 Integration: Binary Sensor (documentation, issues) First occurred: 15:40:45 (1 occurrences) Last logged: 15:40:45

hive: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 703, in async_device_update await task File "/usr/src/homeassistant/homeassistant/components/hive/binary_sensor.py", line 76, in async_update self._attr_is_on = self.device["status"]["state"] KeyError: 'status'

Logger: homeassistant.components.switch Source: components/hive/init.py:150 Integration: Switch (documentation, issues) First occurred: 15:40:45 (1 occurrences) Last logged: 15:40:45

Error while setting up hive platform for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/hive/switch.py", line 43, in async_setup_entry entities.append(HiveSwitch(hive, dev, description)) File "/usr/src/homeassistant/homeassistant/components/hive/switch.py", line 52, in init super().init(hive, hive_device) File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 150, in init model=self.device["deviceData"]["model"], KeyError: 'model'

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

pauljsgreen avatar Oct 14 '22 15:10 pauljsgreen

Hey there @rendili, @kjonline, mind taking a look at this issue as it has been labeled with an integration (hive) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)


hive documentation hive source (message by IssueLinks)

home-assistant[bot] avatar Oct 14 '22 23:10 home-assistant[bot]

Many thanks 👍

pauljsgreen avatar Oct 15 '22 12:10 pauljsgreen

Having exact same issue!

andyclarke1978 avatar Oct 16 '22 16:10 andyclarke1978

This is a strange one, I have upgraded to the lastest version of home assistant and il not getting this error. Can you give any context around what devices are trying to be setup?

KJonline avatar Oct 16 '22 18:10 KJonline

Just trying to setup the standard thermostat, installed a fresh instance of Home Assistant on another RPi and have the same issue.

Tried the standard integration too, same errors.

Here are my log errors

Logger: homeassistant.components.climate Source: components/hive/init.py:150 Integration: Climate (documentation, issues) First occurred: 21:20:00 (1 occurrences) Last logged: 21:20:00

Error while setting up hive platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 64, in async_setup_entry entities.append(HiveClimateEntity(hive, dev)) File "/usr/src/homeassistant/homeassistant/components/hive/climate.py", line 113, in init super().init(hive_session, hive_device) File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 150, in init model=self.device["deviceData"]["model"], KeyError: 'model'

Logger: homeassistant.components.water_heater Source: components/hive/init.py:150 Integration: Water Heater (documentation, issues) First occurred: 21:20:02 (1 occurrences) Last logged: 21:20:02

Error while setting up hive platform for water_heater Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/hive/water_heater.py", line 54, in async_setup_entry entities.append(HiveWaterHeater(hive, dev)) File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 150, in init model=self.device["deviceData"]["model"], KeyError: 'model'

Logger: homeassistant.components.sensor Source: custom_components/hive/init.py:148 Integration: Sensor (documentation, issues) First occurred: 21:20:00 (1 occurrences) Last logged: 21:20:00

Error while setting up hive platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/hive/sensor.py", line 96, in async_setup_entry entities.append(HiveSensorEntity(hive, dev, description)) File "/config/custom_components/hive/sensor.py", line 105, in init super().init(hive, hive_device) File "/config/custom_components/hive/init.py", line 148, in init model=self.device["deviceData"]["model"], KeyError: 'model'

Logger: homeassistant.components.switch Source: components/hive/init.py:150 Integration: Switch (documentation, issues) First occurred: 21:20:01 (1 occurrences) Last logged: 21:20:01

Error while setting up hive platform for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/hive/switch.py", line 43, in async_setup_entry entities.append(HiveSwitch(hive, dev, description)) File "/usr/src/homeassistant/homeassistant/components/hive/switch.py", line 52, in init super().init(hive, hive_device) File "/usr/src/homeassistant/homeassistant/components/hive/init.py", line 150, in init model=self.device["deviceData"]["model"], KeyError: 'model'

andyclarke1978 avatar Oct 17 '22 20:10 andyclarke1978

updated core to 2022.10.4 reinstalled Hive integration.. now i lost the thermostat altogether. Only have Hub Status

andyclarke1978 avatar Oct 17 '22 22:10 andyclarke1978

Hi there. I have 1 thermostat, 6 trvs, a bulb and a plug. For the trvs and thermostat all I get is the battery level, no climate / temperature information. I can't switch the plug on but can see the power consumption. The bulb seems to work OK.

Thanks very much for looking into this for the community

pauljsgreen avatar Oct 18 '22 01:10 pauljsgreen

Hi. Does anyone have any ideas?

thanks again Paul

pauljsgreen avatar Oct 22 '22 17:10 pauljsgreen

Is everyone using 2fa and do they see device management within the account section of the hive app?

KJonline avatar Oct 22 '22 17:10 KJonline

Yep, 2fa enabled, home assistant appears in trusted devices, within account- account security- your trusted devices.

andyclarke1978 avatar Oct 22 '22 19:10 andyclarke1978

Don't see device management in account section. Manage devices is a section separate from account, my devices appear in there and working correctly.

andyclarke1978 avatar Oct 22 '22 19:10 andyclarke1978

01A88612-8DB5-47BE-A99E-3FC46AB1E434 91B1EF52-DC83-4CE8-B7CD-58284F9E0C25 DDC10FDA-30FF-4693-AF8A-0DE8AFAC52D5

pauljsgreen avatar Oct 22 '22 20:10 pauljsgreen

That’s how mine looks

pauljsgreen avatar Oct 22 '22 20:10 pauljsgreen

Sorry for all the questions. Im just trying to understand what’s different between mine and your setup.

Is everybody using the owner account to sign in?

@pauljsgreen I noticed you had a quick action setup can you try your setup without any quick actions?

KJonline avatar Oct 22 '22 21:10 KJonline

Yes, logged in as main user, no quick actions.

Just to reiterate.. standard integration install pulls in Hub (binary_sensor.hive_hub_status) and thermostat battery level only(sensor.home_battery_level)

Custom integration(2022.10.0) just pulls in hub status. No Thermostat!

Many thanks for looking into this!

andyclarke1978 avatar Oct 23 '22 10:10 andyclarke1978

Hi and thanks @KJonline

I have a number of quick actions but they took ages to set up. I know it’s not your remit but do you know if they can be backed up, deleted and restored before I get rid of them to test?

However, this was all working a few weeks ago and I had the quick actions then and haven’t touched any of them :|

thanks Paul

pauljsgreen avatar Oct 24 '22 21:10 pauljsgreen

I would like to add my weight to this issue. I've just done a complete new install of my system and I too are not getting any temperature readings from my Hive TRV's. I am main Hive account user and logged in as such.

System Information

version core-2022.10.5
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.5
os_name Linux
os_version 5.15.61-v8
arch aarch64
timezone Europe/London
config_dir /config
host_os Home Assistant OS 9.2
update_channel stable
supervisor_version supervisor-2022.10.0
agent_version 1.4.1
docker_version 20.10.17
disk_total 28.6 GB
disk_used 4.0 GB
healthy true
supported true
board rpi3-64
supervisor_api ok
version_api ok
installed_addons Z-Wave JS (0.1.74), File editor (5.4.1), AppDaemon (0.9.3), FTP (4.6.1), SSH & Web Terminal (12.0.2)

wwpjm06 avatar Oct 26 '22 14:10 wwpjm06

To add another voice here, I am also seeing the same issue getting my climate info and the same logs are occurring as andy clark posted above. I tried to reload the hive integration and now I seem to have lost control of my light bulbs too.

Home Assistant 2022.10.5 Supervisor 2022.10.0 Operating System 9.2

Tehsmash avatar Oct 26 '22 14:10 Tehsmash

The issue I’m having here is I can’t replicate the issue. So I can’t debug it, this maybe a bit of an ask but does anyone on this thread feel comfortable using VS code and debugging code?

KJonline avatar Oct 26 '22 16:10 KJonline

@KJonline i have no prior knowledge and no development environment but happy to try

pauljsgreen avatar Oct 26 '22 23:10 pauljsgreen

Ditto happy to try, however I just went through the process of setting things up and making hive a custom_component so I could poke around and suddenly everything started working after disabling and reenabling the hive integration and restarting HA...

Tehsmash avatar Oct 27 '22 06:10 Tehsmash

@Tehsmash that’s just confused it even more the custom component uses 90% of the official home assistant code. It’s just sensors that don’t use the official home assistant code. Only thing it may point to is that the supporting library doesn’t have the correct version.

KJonline avatar Oct 27 '22 07:10 KJonline

The weird thing is that switching back to the non-custom_component version, things are still working, so unless switching to the custom component fixed something or maybe cleared some bad system state I'm really confused...

Tehsmash avatar Oct 27 '22 07:10 Tehsmash

My issue was fixed in yesterday’s update. I thought that you’d fixed it. 😵‍💫😎😵‍💫ThanksSent from my iPhoneOn 26 Oct 2022, at 17:33, Khole @.***> wrote: The issue I’m having here is I can’t replicate the issue. So I can’t debug it, this maybe a bit of an ask but does anyone on this thread feel comfortable using VS code and debugging code?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

wwpjm06 avatar Oct 27 '22 08:10 wwpjm06

I haven't rolled out any updates. I heard of something like this before but from a code point of view it’s correct. I’m not sure if this is a home assistant code code issue.

The issue that been mentioned previously was that people were updating their home assistant version but home assistant wasn’t updating the pyhiveapi package dependancy.

KJonline avatar Oct 27 '22 11:10 KJonline

Thx for the feedback. All I can say that my (new) system is working as expected 👍ThanksSent from my iPhoneOn 27 Oct 2022, at 12:52, Khole @.***> wrote: I haven't rolled out any updates. I heard of something like this before but from a code point of view it’s correct. I’m not sure if this is a home assistant code code issue. The issue that been mentioned previously was that people were updating their home assistant version but home assistant wasn’t updating the pyhiveapi package dependancy.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

wwpjm06 avatar Oct 27 '22 13:10 wwpjm06

Is there a way to update pyhiveapi dependancy manually?

andyclarke1978 avatar Oct 28 '22 18:10 andyclarke1978

@andyclarke1978 it depends on your installation type if it’s running in a docker container then no. If it’s running on a bare metal machine then yes.

If your running docker have your tried using the custom component to try and force the update?

KJonline avatar Oct 28 '22 18:10 KJonline

Please excuse my ignorance, but my installation is a brand new virtualbox VM and I get this issue with setting up my first hive integration, whether via HACS custom integration, or the home assistant “approved” integration.

Thanks Paul

pauljsgreen avatar Oct 28 '22 23:10 pauljsgreen

Hi. I have installed Hive from both the normal integration and the HACS integration - both on a fresh Virtualbox VM and still the same.

What is the pyhiveapi dependancy and how do i fix it manually?

thanks paul

pauljsgreen avatar Nov 10 '22 16:11 pauljsgreen