Core: PyISY 1.0.8 upgrade gives initialization errors with ISY 4.6.2

Created on 11 Sep 2017  路  14Comments  路  Source: home-assistant/core

Home Assistant release (hass --version): 0.53.0

Python release (python3 --version): Hass.io supervisor 0.61 I can't/don't how login to it enough to see the python version in use.

Component/platform: ISY994

Description of problem:
Since the upgrade to v0.53, ISY initialization returns several instances of:

2017-09-11 08:21:21 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
    result = coro.send(None)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 238, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 246, in async_update_ha_state
    attr = self.state_attributes or {}
  File "/usr/lib/python3.6/site-packages/homeassistant/components/cover/__init__.py", line 245, in state_attributes
    current = self.current_cover_position
  File "/usr/lib/python3.6/site-packages/homeassistant/components/cover/isy994.py", line 62, in current_cover_position
    return sorted((0, self.value, 100))[1]
TypeError: '<' not supported between instances of 'NoneType' and 'int'

In my case, I get that nine times. For covers, I have 3 fans.

This is running on a non-prod Hass.io that is virgin, with the exception of adding in just the base ISY connection and letting it discover. Prior to this upgrade, on HA v0.52.1 there were no exceptions at startup.

I see that #9182 bumped the PyISY version to resolve #7601. Those were all issues aroud the alpha release of ISY 5.0.x. Did anyone test the upgrade against the current stable relase, 4.6.2?

If I take my prod HA v0.52.1 and modify just the home-assistant/homeassistant/components/isy994.py line 20 to REQUIREMENTS = ['PyISY==1.0.8'] to force an upgrade of just that library, it causes these same errors on start up/

The ISY portion will continue to run, but when updating a fan (which also still works), logs the following... Others have seen this second error on 0.52.1 and this may not be related. see #9223. I'm including it for completeness.

2017-09-11 13:29:43 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/core.py", line 1025, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/fan/__init__.py", line 219, in async_handle_fan_service
    yield from getattr(fan, method['method'])(**params)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/fan/isy994.py", line 88, in set_speed
    self.speed = self.state
AttributeError: can't set attribute

Any one else seeing this? Or am I the lone holdout not running the alpha v5 ISY software? I'd love to, I just don't have the time to play with it if or when they break it.

Additional info:
First noticed in Hass.io, non-production (0.53.0)
Duplicated in prod 0.52.1 with modification of updating PyISY to 1.0.8.

isy994

Most helpful comment

Hey @dethpickle, I just opened https://github.com/home-assistant/home-assistant/pull/16812 which should fix these issues. Can you confirm a few things for me?

  1. You would get log spam, but all of the device functionality still worked, correct?
  2. You haven't gotten the fan/isy994.py error (AttributeError: can't set attribute) for quite some time now, correct?

If I am correct about both of those things, then I am pretty sure I fully understand what these errors were and have them fixed appropriately

All 14 comments

I see the same thing. Everything I have in ISY is replicated as every type...Switch, Light, Fan, Cover...
I'm on 5.0.2.

I'm seeing the same error.

I was using 4.6.2 w/ HASS 0.53 w/ no issues. Python version is 3.6. I did upgrade to 5.0.10; however now no entities show up and there are no errors in the logs ;(

Here's the errors I'm still getting.
HASS 0.56.2
Python 3.6.3

2017-11-02 09:47:58 INFO (MainThread) [homeassistant.components.cover] Setting up cover.isy994
2017-11-02 09:47:58 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 398, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 246, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 222, in async_update_ha_state
    attr = self.state_attributes or {}
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/components/cover/__init__.py", line 236, in state_attributes
    current = self.current_cover_position
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/components/cover/isy994.py", line 62, in current_cover_position
    return sorted((0, self.value, 100))[1]
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2017-11-02 09:47:58 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 398, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 246, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 222, in async_update_ha_state
    attr = self.state_attributes or {}
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/components/cover/__init__.py", line 236, in state_attributes
    current = self.current_cover_position
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/components/cover/isy994.py", line 62, in current_cover_position
    return sorted((0, self.value, 100))[1]
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2017-11-02 09:47:58 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 398, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 246, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 222, in async_update_ha_state
    attr = self.state_attributes or {}
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/components/cover/__init__.py", line 236, in state_attributes
    current = self.current_cover_position
  File "/home/hass/hass/lib/python3.6/site-packages/homeassistant/components/cover/isy994.py", line 62, in current_cover_position
    return sorted((0, self.value, 100))[1]
TypeError: '<' not supported between instances of 'NoneType' and 'int'

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Hi baloobbot. Just upgraded my virgin Hass.io to the current 64.3 and all the identical errors with ISY are still there.

It doesn't seem like the person who made the initial change that caused the issue is interested in fixing it. Bummer, because they're running a beta version of ISY and not the real version most people are.

```Sun Mar 04 2018 22:11:50 GMT-0800 (PST)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 268, in _async_add_entity
yield from entity.async_update_ha_state()
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 215, in async_update_ha_state
state = self.state
File "/usr/lib/python3.6/site-packages/homeassistant/components/isy994.py", line 477, in state
return super().state
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 374, in state
return STATE_ON if self.is_on else STATE_OFF
File "/usr/lib/python3.6/site-packages/homeassistant/components/light/isy994.py", line 35, in is_on
return self.value > 0
TypeError: '>' not supported between instances of 'NoneType' and 'int'```

Hey everyone,

I just found this issue. I don't experience it myself, but I'd like to get it fixed. It looks like the update of PyISY to 1.0.8 caused the issue from what I'm reading here.

Could you please post or send me the output of your http://isy/rest/nodes/ endpoint? (check for personal info in there before posting)

This should be for an affected node:

<node flag="0" nodeDefId="UZW000E">
  <address>ZW008_104</address>
  <name>ZW 008 Binary Sensor</name>
  <family>4</family>
  <parent type="1">ZW008_1</parent>
  <type>4.16.0.0</type>
  <enabled>true</enabled>
  <deviceClass>0</deviceClass>
  <wattage>0</wattage>
  <dcPeriod>0</dcPeriod>
  <startDelay>0</startDelay>
  <endDelay>0</endDelay>
  <pnode>ZW008_1</pnode>
  <sgid>104</sgid>
  <devtype>
    <gen>4.16.0</gen>
    <mfg>132.1107.273</mfg>
    <cat>104</cat>
    <model>11</model>
  </devtype>
  <ELK_ID>A13</ELK_ID>
  <property id="ST" value="100" formatted="On" uom="78" />
</node>

Here's a full nodes dump. The error seems to occur once per Insteon fan, of which I have three in there. But the full file for context.

Nothing PII in there that I can find.

I appreciate you looking at this.

nodes.txt

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Hey @dethpickle, I just opened https://github.com/home-assistant/home-assistant/pull/16812 which should fix these issues. Can you confirm a few things for me?

  1. You would get log spam, but all of the device functionality still worked, correct?
  2. You haven't gotten the fan/isy994.py error (AttributeError: can't set attribute) for quite some time now, correct?

If I am correct about both of those things, then I am pretty sure I fully understand what these errors were and have them fixed appropriately

I've been experiencing this very issue and just found this thread!
Thanks for getting it fixed, @OverloadUT!

Just updated my HA to the latest 0.80 release but I still face the issue. Wondering whether the issue I face is different from the one described here. Here is what I get after restarting HA:

Error during setup of component isy994
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/isy994.py", line 379, in setup
    use_https=https, tls_ver=tls_version, log=_LOGGER)
  File "/usr/local/lib/python3.6/site-packages/PyISY/ISY.py", line 84, in __init__
    self.nodes = Nodes(self, xml=self.conn.getNodes())
  File "/usr/local/lib/python3.6/site-packages/PyISY/Nodes/__init__.py", line 52, in __init__
    self.parse(xml)
  File "/usr/local/lib/python3.6/site-packages/PyISY/Nodes/__init__.py", line 238, in parse
    Group(self, nid, nname, members, controllers), ntype)
  File "/usr/local/lib/python3.6/site-packages/PyISY/Nodes/group.py", line 43, in __init__
    self.update()
  File "/usr/local/lib/python3.6/site-packages/PyISY/Nodes/group.py", line 83, in update
    if self.parent[m].status > 0:
  File "/usr/local/lib/python3.6/site-packages/VarEvents/__init__.py", line 255, in __gt__
    return self._val > other
TypeError: '>' not supported between instances of 'NoneType' and 'int'

It's a different stack trace. Please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

neotrunks picture neotrunks  路  169Comments

Ciqsky picture Ciqsky  路  129Comments

soldag picture soldag  路  143Comments

jeromelaban picture jeromelaban  路  123Comments

kdschlosser picture kdschlosser  路  374Comments