Skip to content
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

GeniusHub - radiator valves are not appearing as climate entities #25343

Closed
ianpra opened this issue Jul 20, 2019 · 18 comments · Fixed by #25458

Comments

@ianpra
Copy link

commented Jul 20, 2019

**Home Assistant release with the issue: **

0.96.1

Last working Home Assistant release (if known):

0.94.3

Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io running on a NUC (Ubuntu server 18.04 & docker)

Component/platform: GeniusHub

https://www.home-assistant.io/components/geniushub/

Description of problem:

I am no longer seeing radiator valves appear as climate entities. This was working okay, but broke around the time that 0.95 was released. At the same time I switched from a RP3 to Hass.io running on a NUC, so I wasn't sure at the time whether it was the 0.95 release, or something hadn't migrated to the NUC properly.

However I no longer appear to have any other HA issues apart from this, so I'm beginning to think that something is broken. I can still receive the the battery status from the radiator valves, and see the binary sensors for the smart plugs, so I know that it is not basic connectivity issue between HA and the GeniusHub.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

geniushub:
  host: *.*.*.*
  username: !secret genius_username
  password: !secret genius_password

Traceback (if applicable):

2019-07-20 13:18:06 WARNING (MainThread) [geniushubclient] _convert_zone(): Failed to convert Timer schedule for Zone 14
2019-07-20 13:18:06 WARNING (MainThread) [geniushubclient] _convert_zone(): Failed to convert Timer schedule for Zone 15
2019-07-20 13:18:06 WARNING (MainThread) [geniushubclient] _convert_zone(): Failed to convert Timer schedule for Zone 16
2019-07-20 13:18:06 WARNING (MainThread) [geniushubclient] _convert_zone(): Failed to convert Timer schedule for Zone 17
2019-07-20 13:18:06 WARNING (MainThread) [geniushubclient] _convert_zone(): Failed to convert Timer schedule for Zone 18
2019-07-20 13:18:06 WARNING (MainThread) [geniushubclient] _convert_zone(): Failed to convert Timer schedule for Zone 19
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'
2019-07-20 13:18:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 171, in state_attributes
    self.hass, self.current_temperature, self.temperature_unit,
  File "/usr/src/homeassistant/homeassistant/components/geniushub/climate.py", line 92, in current_temperature
    return self._zone.temperature
AttributeError: 'GeniusZone' object has no attribute 'temperature'

Additional information:
Some of these errors are already known about as some of my zones are smart plugs and not radiator valves, however the 'Error doing job:' is new and fails every time it polls - I had 42,000 errors before I upgraded from 0.95

@ianpra ianpra changed the title GeniusHub - radiator valves are no longer being detected GeniusHub - radiator valves are not appearing as climate entities Jul 20, 2019

@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2019

@ianpra I am the CODEOWNER for the geniushub integration and I also wrote the client library which it uses to speak with the Genius Hub...

My system, which has both genius vales and radiator valves (i.e. danfoss TRVs, has no issues with 0.96. So there is something about your system, I guess, that is causing the issue - this wouldn't surprise me...

The best way forward would be if you'd allow me to access your hub directly? You'd have to expose the port to the internet, though...

Otherwise, send me the result of this command, and I'll see what I can do...

python ghclient.py ${HUB_ADDRESS} -u ${USERNAME} -p ${PASSWORD} zones -vvv
@ianpra

This comment has been minimized.

Copy link
Author

commented Jul 20, 2019

@zxdavb zxdavb referenced this issue Jul 20, 2019
9 of 9 tasks complete
@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2019

Hmmm... that doesn't seem right - did you follow the instructions at https://github.com/zxdavb/geniushub-client to set the variables?

Try: python ghclient.py ${HUB_ADDRESS} -u ${USERNAME} -p ${PASSWORD} zones

@ianpra

This comment has been minimized.

Copy link
Author

commented Jul 21, 2019

@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 21, 2019

The output is rather large

Yes (and that is only 50% of the relevant JSON), you can see why it is a mission to debug without direct access to the hub.

I am working on a plan to be able to input that output directly into the client library, which should make it easier to debug, rather than going through the JSON by hand!

@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 21, 2019

@ianpra

This comment has been minimized.

Copy link
Author

commented Jul 21, 2019

@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 21, 2019

I got it via https://forum.geniushub.co.uk - will have a look & let you know - might take a while...

@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 21, 2019

The PR has been merged.

@ianpra

This comment has been minimized.

Copy link
Author

commented Jul 22, 2019

@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

Add the following to your configuration.yaml:

logger:
  default: warn
  logs:
#   geniushubclient: debug
    homeassistant.components.geniushub: debug
    homeassistant.components.geniushub.climate: debug

Keep the # in front of geniushubclient for now.

Grep for zones_raw and devices_raw and send me the first copy of those two lines (they are large - send via PM/Dropbox as before). [Edited because typo]

@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2019

Is your configuration.yaml correct? Note the warn, and the #:

logger:
  default: warn
  logs:
#   geniushubclient: debug
    homeassistant.components.geniushub: debug
    homeassistant.components.geniushub.climate: debug

Also, there was a typo above - send me devices as well as zone. I only need the instance of the zones_raw and devices_raw lines from homeassistant.components.geniushub:

2019-07-22 11:04:02 DEBUG (MainThread) [homeassistant.components.geniushub] zones_raw = ...
2019-07-22 11:04:02 DEBUG (MainThread) [homeassistant.components.geniushub] devices_raw = ...
@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

Perfect! I can reproduce the problem, and I can confirm it is an issue with the client library.

@ianpra

This comment has been minimized.

Copy link
Author

commented Jul 24, 2019

Great - let me know if you want me to test anything.

Regards
Ian

@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

The bug has been found.

@zxdavb zxdavb referenced this issue Jul 24, 2019
9 of 9 tasks complete
@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2019

@ianpra when 0.96.5 is out, please let me know how it goes.

@ianpra

This comment has been minimized.

Copy link
Author

commented Jul 26, 2019

@zxdavb - just updated to 0.96.5 and it is now all working correctly - thank you.

Has this been tested with the latest version of GeniusHub (5.3)? I haven't upgraded yet as I didn't want to change anything whilst you were troubleshooting this issue.

Ian

@zxdavb

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2019

Only tested on 5.2.10, specifically:

root@vm-builder:~$ curl -X GET https://my.geniushub.co.uk/v1/version -H "authorization: Bearer ${HUB_TOKEN}"
{"hubSoftwareVersion":"5.2.10","earliestCompatibleAPI":"https://my.geniushub.co.uk/v1","latestCompatibleAPI":"https://my.geniushub.co.uk/v1"}

Will try to get mine upgraded & see what happens...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.