Core: Error while setting up platform eq3btsmart

Created on 29 Jan 2018  Â·  40Comments  Â·  Source: home-assistant/core

Home Assistant release (hass --version):
0.62.0 (hass.io)

Python release (python3 --version):
Python 3.6.3

Component/platform:
climate.eq3btsmart

Description of problem:
Component doesn't load anymore since updating from HA 0.61.1 → 0.62 (hass.io)

Expected:

Problem-relevant configuration.yaml entries and steps to reproduce:

climate:
  - platform: eq3btsmart
    devices:
      thermostat:
        mac: !secret mac_eq3btsmart

Traceback (if applicable):

2018-01-29 13:49:18 INFO (MainThread) [homeassistant.components.climate] Setting up climate.eq3btsmart
2018-01-29 13:49:22 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform eq3btsmart
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 189, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 51, in setup_platform
    devices.append(EQ3BTSmartThermostat(mac, name))
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 63, in __init__
    import eq3bt as eq3
  File "/usr/lib/python3.6/site-packages/eq3bt/__init__.py", line 2, in <module>
    from .eq3btsmart import Thermostat, TemperatureException, Mode
  File "/usr/lib/python3.6/site-packages/eq3bt/eq3btsmart.py", line 17, in <module>
    from .structures import *
  File "/usr/lib/python3.6/site-packages/eq3bt/structures.py", line 79, in <module>
    "cmd" / Const(PROP_INFO_RETURN, Int8ub),
  File "/config/deps/lib/python3.6/site-packages/construct/core.py", line 1930, in __init__
    super(Const, self).__init__(subcon)
  File "/config/deps/lib/python3.6/site-packages/construct/core.py", line 288, in __init__
    raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field
waiting-for-reply

Most helpful comment

Okay I found a workaround:

  • Activate system ssh access (not via hassio addon, see documentation)
  • Enter the following command to upgrade the package construct to the latest version:

docker exec homeassistant pip3 install construct==2.9.29

(Note: On my system this seems to not affect any other component. But for yours it could be...)

All 40 comments

same here

+1

BTW: If you are using Hass.io and want to downgrade for the time being, check this out:
https://blog.dustinrue.com/2017/12/downgrading-hassio/

@elmurato I might actually do that, just hope it doesn't break anything else.

ok, rolled back to 0.61.1 and the eq3 component immediately started working again.

The same with HA version 0.62.1.

@r-jordan yes, tested that one as well before rolling back.

any news regarding this component?

Just tested 0.63: Same problem :(

Issue #12298 has the same problem.

Okay I found a workaround:

  • Activate system ssh access (not via hassio addon, see documentation)
  • Enter the following command to upgrade the package construct to the latest version:

docker exec homeassistant pip3 install construct==2.9.29

(Note: On my system this seems to not affect any other component. But for yours it could be...)

thanks @elmurato got mine working!

I get hung up at this every time:
Create an authorized_keys file containing your public key, and place it in the root of the boot partition of your SD card.
How do I access this? I put the SD-Card in my PC and it does not even see it. I can't find this boot partition.

mine shows up as a resin-boot partition... do try other sd adaptor? im not too sure

yeah I just tried an adapter and I can see it..... no drive letter...... how do I 'do' anything with it?

ok I get access now.....
When I copy the authorized_keys and try and use it with the private key in putty I get server rejected our key.
do i need to put it in a .ssh folder? I just copied it to the root

ok finally got in. my sd-card reader hates it when you eject a card and doesn't recognise a card again. need to eject device and plug in again then connect card.

also worth mentioning is that if you create the public key, it won't work - you need to copy the data from the puttygen screen and create an authorized_keys file as you normally do for putty. just renaming and copying the public key does not work.

Bloody hell! the switches came up right away after I installed the updated construct! Didn't need to reboot.

glad u figured it out... and yes, the public key has to be in 1 single line

rebooting the pi and you lose it so it's not persistent

hmm I just installed it again and they don't come up. Restarted HA and they are there again. So if you reboot the Pi it seems they disappear, if you re-start HA it seems to retain them. Anyway, they seem to be there and working correctly now.

@DavidFW1960 Could you explain this in detail? Does the manual install of construct==2.9.29 survive a reboot of your pi / hassio system? Do you need to restart HA after a reboot to get it working? Do you need to install the dependency manually every time?

I've just updated the construct package but HA 0.63 is still failling. Any ideas?

Name: python-eq3bt
Version: 0.1.8
Summary: EQ3 bluetooth thermostat support library
Home-page: https://github.com/rytilahti/python-eq3bt.git
Author: Teemu Rytilahti
Author-email: [email protected]
License: MIT
Location: /usr/lib/python3.6/site-packages
Requires: construct, bluepy, click-datetime, click

Name: construct
Version: 2.9.29
Summary: A powerful declarative symmetric parser/builder for binary data
Home-page: http://construct.readthedocs.org
Author: Arkadiusz Bulski, Tomer Filiba, Corbin Simpson
Author-email: [email protected], [email protected], [email protected]
License: MIT
Location: /usr/lib/python3.6/site-packages
Requires:

2018-02-12 15:43:49 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform eq3btsmart
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 84, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 51, in setup_platform
    devices.append(EQ3BTSmartThermostat(mac, name))
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 63, in __init__
    import eq3bt as eq3
  File "/usr/lib/python3.6/site-packages/eq3bt/__init__.py", line 2, in <module>
    from .eq3btsmart import Thermostat, TemperatureException, Mode
  File "/usr/lib/python3.6/site-packages/eq3bt/eq3btsmart.py", line 17, in <module>
    from .structures import *
  File "/usr/lib/python3.6/site-packages/eq3bt/structures.py", line 79, in <module>
    "cmd" / Const(PROP_INFO_RETURN, Int8ub),
  File "/config/deps/lib/python3.6/site-packages/construct/core.py", line 1930, in __init__
    super(Const, self).__init__(subcon)
  File "/config/deps/lib/python3.6/site-packages/construct/core.py", line 288, in __init__
    raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field

It worked for me when I downgraded the python-eq3bt package with command:

docker exec -it homeassistant pip3 install python-eq3bt==0.1.6

Then restart with:

hassio ha restart

can confirm, also works with construct==2.9.29 and python-eq3bt==0.1.7 (0.1.8 throws errors)

It looks like this issue is fixed with HA 0.64.x

No, it's still there with HA 0.65.0 and the trick with construct 2.9.29 is not longer working (original installed is 2.9.36).

@gdampf works for me on hassio since 0.64-0.65. which distribution are you running?

It's hassio 0.65.0 - fresh install.

Sun Mar 11 2018 14:32:16 GMT+0100 (CET)

Error while setting up platform eq3btsmart

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 82, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 51, in setup_platform
    devices.append(EQ3BTSmartThermostat(mac, name))
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 63, in __init__
    import eq3bt as eq3
  File "/usr/lib/python3.6/site-packages/eq3bt/__init__.py", line 2, in <module>
    from .eq3btsmart import Thermostat, TemperatureException, Mode
  File "/usr/lib/python3.6/site-packages/eq3bt/eq3btsmart.py", line 17, in <module>
    from .structures import *
  File "/usr/lib/python3.6/site-packages/eq3bt/structures.py", line 75, in <module>
    "cmd" / Const(PROP_INFO_RETURN, Int8ub),
  File "/config/deps/lib/python3.6/site-packages/construct/core.py", line 1930, in __init__
    super(Const, self).__init__(subcon)
  File "/config/deps/lib/python3.6/site-packages/construct/core.py", line 288, in __init__
    raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field

Same with hassio 0.65.1:

Sun Mar 11 2018 20:58:06 GMT+0100 (CET)

Error while setting up platform eq3btsmart

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 82, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 51, in setup_platform
    devices.append(EQ3BTSmartThermostat(mac, name))
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/eq3btsmart.py", line 63, in __init__
    import eq3bt as eq3
  File "/usr/lib/python3.6/site-packages/eq3bt/__init__.py", line 2, in <module>
    from .eq3btsmart import Thermostat, TemperatureException, Mode
  File "/usr/lib/python3.6/site-packages/eq3bt/eq3btsmart.py", line 17, in <module>
    from .structures import *
  File "/usr/lib/python3.6/site-packages/eq3bt/structures.py", line 75, in <module>
    "cmd" / Const(PROP_INFO_RETURN, Int8ub),
  File "/config/deps/lib/python3.6/site-packages/construct/core.py", line 1930, in __init__
    super(Const, self).__init__(subcon)
  File "/config/deps/lib/python3.6/site-packages/construct/core.py", line 288, in __init__
    raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field

@rytilahti Could you check out this issue? It looks like a compatibility issue. The construct version of eq3bt isn't pinned, right?

Hassio 0.65.3:
Still the same! And downgrading construct is not helping - even not temporarily!

Oh, I somehow missed this issue, my apologies for that. python-eq3bt (version 0.1.9) requires construct 2.9.31 (maybe newer ones work too) as of https://github.com/rytilahti/python-eq3bt/pull/20 .

Hassio 0.65.4:
Nothing changed! Still the same error!

Hassio 0.65.6:
Issue is still present

working here Hass.io 0.65.6 and 0.66beta0

Please clean-up your deps folder and restart Home Assistant. This will solve the issue!

rm -rf /config/deps/lib/python3.6/site-packages/construct*

Thansk! But unfortunately I can't find this directory on either my HASS.io root system (ResinOS) or within the HASS.io docker

Could you tell me th path of the directory where the configuration.yaml is located? You should find a "deps" folder there.

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:

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:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arangates picture arangates  Â·  3Comments

Elmardus picture Elmardus  Â·  3Comments

TheZoker picture TheZoker  Â·  3Comments

sibbl picture sibbl  Â·  3Comments

moskovskiy82 picture moskovskiy82  Â·  3Comments