I’m trying to integrate my working Pilight installation into Homeassistant.
Pilight runs on an external Raspberry and I can switch sockets via SSL, HTTP and via Pilight’s web interface.
Here is my entry in the configuration.yaml
pilight:
host: 192.168.1.149
port: 5001
send_delay: 0.4
switch:
- platform: pilight
switches:
my_switch:
on_code:
protocol: pollin
systemcode: 16
unitcode: 16
'on': 1
off_code:
protocol: pollin
systemcode: 16
unitcode: 16
'off': 1
Unable to prepare setup for platform pilight.switch: Unable to set up component.
19:08:15 – (FEHLER) setup.py
Logger: homeassistant.setup
Source: setup.py:339
first occurred: 19:08:15 (1 occurrences)
Unable to prepare setup for platform pilight.switch: Unable to set up component.
Error during setup of component pilight
19:08:15 – (FEHLER) components/pilight/__init__.py
Logger: homeassistant.setup
Source: components/pilight/__init__.py:78
First occurred: 19:08:15 (1 occurrences)
Last logged: 19:08:15
Error during setup of component pilight Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/pilight/__init__.py", line 78, in setup
pilight_client = pilight.Client(host=host, port=port)
File "/usr/local/lib/python3.10/site-packages/pilight/pilight.py", line 93, in __init__
answer_1 = json.loads(self.receive_socket.recv(1024).decode())
File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I can’t find any devices or entities.
After a reboot the log says:
What ist wrong?