-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Broadlink sensor startup failure: expected str instance, bytes found #11418
Comments
Upgraded broadlink to 0.6 using pip but I think hass is downgrading the broadlink component to 0.5 when it starts up from 0.6. Is there a way to prevent that (switch to hass-dev maybe?) |
Note that this will disable pip install for all requirements. |
Having the same issue on a new install on ubuntu. The difference being that I am running python 3.6. Would this have any effect? |
The very same error "TypeError: sequence item 0: expected str instance, bytes found". I'm running Arch on Raspberry Pi with Python 3.6 also. |
Also seeing this issue on a clean install of Home Assistant 0.60.1 with Python 3.5.4; both Broadlink 0.5 and 0.6, with latest versions of pyaes and pycrypto. Have updated both switch and sensor broadlink.py files to use 0.6 to no avail. (This was previously working on a previous install, but have reconfigured using pyenv-virtualenv). |
Just received my RMPRO today and I try to make it work with HA. I'm now at the same point here --> TypeError: sequence item 0: expected str instance, bytes found I'm running on Windows. |
Looks like this is related to conflicting pycrypto vs pycryptodome installs. hass broadlink plugin fails to import AES, so falls back to 'pyaes', which does not work. I was able to resolve it with the steps noted here: pip3 uninstall pycrypto |
Confirmed. Installing pyrcryptodome resolves the issue. Purged my venv and started afresh. Installed pycryptodome before running hass for the first time and no more errors in the log. |
First, thanks for your answer guys. TypeError: sequence item 0: expected str instance, bytes found Any idea ? |
You need to do the uninstall/ reinstalling within the virtualenv used by hass. |
umm sorry for the newb question but i'm not sure to understand what you mean by "within the virtualenv used by hass". Right now the only way I was able to incorporate my RM PRO within my home automation is by installing another automation system on another computer (Domoticz). So I use HA as my main automation system and call all my RM PRO switches by using the Domoticz API. |
Have the same issue on fresh install
|
@AMSHL Have you tried the steps above to install pycryptodome before Hass self-installs the pycrypto libraries? |
@jamieshaw Yes, tried that already - no result. |
@benh57 thank you very much for the instruction. I implemented and got my Broadlinks working!! sudo systemctl stop home-assistant@homeassistant.service |
pip3 install pycryptodomepip3 install |
I openned another issue since the logs wasn't the same but there's an easy fix by simply updating the broadlink library. |
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 👍 |
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍 |
Make sure you are running the latest version of Home Assistant before reporting an issue.
Home Assistant release (
hass --version
):(homeassistant) homeassistant@pi:~/.homeassistant$ hass --version
0.60.0
Python release (
python3 --version
):(homeassistant) homeassistant@pi:~/.homeassistant$ python3 --version
Python 3.4.2
Component/platform:
broadlink-switch
Description of problem:
broadlink component fails to initialize with this error
Expected:
starts up
Problem-relevant
configuration.yaml
entries and steps to reproduce:Traceback (if applicable):
Additional info:
(homeassistant) homeassistant@pi:~/.homeassistant$ pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
aiohttp (2.3.6)
aiohttp-cors (0.5.3)
asn1crypto (0.24.0)
astral (1.4)
async-timeout (2.0.0)
boto3 (1.5.6)
botocore (1.8.20)
broadlink (0.5)
certifi (2017.11.5)
cffi (1.11.2)
chardet (3.0.4)
colorlog (3.0.1)
cryptography (2.1.4)
distro (1.1.0)
docutils (0.14)
ecdsa (0.13)
enum-compat (0.0.2)
envs (1.2.4)
future (0.16.0)
fuzzywuzzy (0.15.1)
gTTS-token (1.1.1)
home-assistant-frontend (20171216.0)
homeassistant (0.60.0)
idna (2.6)
Jinja2 (2.10)
jmespath (0.9.3)
MarkupSafe (1.0)
multidict (3.3.2)
mutagen (1.39)
netdisco (1.2.3)
netifaces (0.10.6)
pip (9.0.1)
protobuf (3.5.1)
py3compat (0.4)
pyaes (1.6.0)
PyChromecast (0.8.2)
pycparser (2.18)
pycrypto (2.6.1)
pycryptodome (3.3.1)
python-dateutil (2.6.1)
python-jose-cryptodome (1.3.2)
pytz (2017.3)
pywemo (0.4.20)
PyYAML (3.12)
requests (2.18.4)
rxv (0.5.1)
s3transfer (0.1.12)
setuptools (38.2.4)
six (1.11.0)
SQLAlchemy (1.1.15)
typing (3.6.2)
ua-parser (0.7.3)
urllib3 (1.22)
user-agents (1.1.0)
voluptuous (0.10.5)
warrant (0.6.1)
xmltodict (0.11.0)
yarl (0.16.0)
zeroconf (0.19.1)
The text was updated successfully, but these errors were encountered: