Hi guys, I’m new in the HA world.
I’ve some IoT devices, so I built a small server to add a single aggregator using Home Assistant.
I had no problem with every platform, except to the broadlink one.
I have 2 broadlink SC1 smart socket and I’d like to setup as switch.
I’m following the instruction on docs, adding the sc1 as sp2 type.
This is my configuration (with only a single device online):
switch:
- platform: broadlink
host: 192.168.X.XX
mac: '34:EA:34:XX:XX:XX'
friendly_name: 'Lamp1'
type: sp2
No way to get that working.
The log gives me this stacktrace:
2018-12-14 20:01:27 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform broadlink
Traceback (most recent call last):
File "/home/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/broadlink.py", line 74, in setup_platform
import broadlink
File "/home/homeassistant/lib/python3.5/site-packages/broadlink/__init__.py", line 5, in <module>
from Crypto.Cipher import AES
ValueError: source code string cannot contain null bytes
I tried to update or make a clean install, but nothing solves.
Any idea?