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

Error while setting up platform eq3btsmart #12028

Closed
disrupted opened this issue Jan 29, 2018 · 40 comments
Closed

Error while setting up platform eq3btsmart #12028

disrupted opened this issue Jan 29, 2018 · 40 comments

Comments

@disrupted
Copy link

disrupted commented Jan 29, 2018

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
@jnmcfly
Copy link

jnmcfly commented Jan 31, 2018

same here

@elmurato
Copy link
Contributor

elmurato commented Jan 31, 2018

+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/

@disrupted
Copy link
Author

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

@disrupted
Copy link
Author

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

@r-jordan
Copy link
Contributor

r-jordan commented Feb 2, 2018

The same with HA version 0.62.1.

@disrupted
Copy link
Author

disrupted commented Feb 2, 2018

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

@disrupted
Copy link
Author

any news regarding this component?

@elmurato
Copy link
Contributor

Just tested 0.63: Same problem :(

@elmurato
Copy link
Contributor

Issue #12298 has the same problem.

@elmurato
Copy link
Contributor

elmurato commented Feb 11, 2018

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...)

@LaFed
Copy link

LaFed commented Feb 12, 2018

thanks @elmurato got mine working!

@DavidFW1960
Copy link

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.

@LaFed
Copy link

LaFed commented Feb 12, 2018

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

@DavidFW1960
Copy link

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

@DavidFW1960
Copy link

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

@DavidFW1960
Copy link

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.

@DavidFW1960
Copy link

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

@LaFed
Copy link

LaFed commented Feb 12, 2018

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

@DavidFW1960
Copy link

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

@DavidFW1960
Copy link

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.

@syssi
Copy link
Member

syssi commented Feb 12, 2018

@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?

@r-jordan
Copy link
Contributor

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

@r-jordan
Copy link
Contributor

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

@disrupted
Copy link
Author

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

@elmurato
Copy link
Contributor

elmurato commented Mar 5, 2018

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

@gdampf
Copy link

gdampf commented Mar 11, 2018

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).

@disrupted
Copy link
Author

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

@gdampf
Copy link

gdampf commented Mar 11, 2018

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

@gdampf
Copy link

gdampf commented Mar 11, 2018

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

@syssi
Copy link
Member

syssi commented Mar 11, 2018

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

@gdampf
Copy link

gdampf commented Mar 12, 2018

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

@rytilahti
Copy link
Member

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 rytilahti/python-eq3bt#20 .

@gdampf
Copy link

gdampf commented Mar 13, 2018

Hassio 0.65.4:
Nothing changed! Still the same error!

@jcortenbach
Copy link

Hassio 0.65.6:
Issue is still present

@disrupted
Copy link
Author

working here Hass.io 0.65.6 and 0.66beta0

@syssi
Copy link
Member

syssi commented Mar 27, 2018

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*

@jcortenbach
Copy link

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

@syssi
Copy link
Member

syssi commented Mar 30, 2018

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

@balloobbot
Copy link

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 👍

@balloobbot
Copy link

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 👍

@home-assistant home-assistant locked and limited conversation to collaborators Mar 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests