Pilight Errors

Hi All,

Is anyone else getting lots of pilight errors (HA 44.1 pilight 7) -

2017-06-26 15:02:48 ERROR (Recorder) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/core.py”, line 1020, in execute_service
service_handler.func(service_call)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/pilight.py”, line 148, in decorated
method(*args, **kwargs)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/pilight.py”, line 91, in send_code
pilight_client.send_code(message_data)
File “/home/homeassistant/.homeassistant/deps/pilight/pilight.py”, line 186, in send_code
if (‘status’ in acknowledge_message and
TypeError: argument of type ‘int’ is not iterable
2017-06-26 15:02:53 ERROR (Thread-6) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 1}
2017-06-26 15:02:53 ERROR (Thread-9) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 9}
2017-06-26 15:02:53 ERROR (Thread-10) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 1, ‘protocol’: [‘kaku_dimmer’], ‘on’: 1, ‘dimlevel’: 6, ‘id’: 14445560}
2017-06-26 15:02:53 ERROR (Thread-11) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 13}
2017-06-26 15:02:53 ERROR (Thread-1) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 2}
2017-06-26 15:03:34 ERROR (MainThread) [homeassistant.components.sensor.template] Could not render template Bedroom Min Temp: UndefinedError: ‘fibaro_system_fgms001_motion_sensor_temperature_11_1’ is undefined
2017-06-26 15:06:12 ERROR (Thread-6) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 3}
2017-06-26 15:06:12 ERROR (Thread-4) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 1}
2017-06-26 15:06:12 ERROR (Thread-11) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 9}
2017-06-26 15:06:12 ERROR (Thread-6) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 1, ‘protocol’: [‘kaku_dimmer’], ‘on’: 1, ‘dimlevel’: 6, ‘id’: 14445560}
2017-06-26 15:06:12 ERROR (Thread-4) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 13}
2017-06-26 15:06:12 ERROR (Thread-11) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 2}
2017-06-26 15:07:36 ERROR (Thread-1) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 3}
2017-06-26 15:07:36 ERROR (Thread-10) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 1}
2017-06-26 15:07:36 ERROR (Thread-1) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 9}
2017-06-26 15:07:36 ERROR (Thread-6) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 1, ‘protocol’: [‘kaku_dimmer’], ‘on’: 1, ‘dimlevel’: 6, ‘id’: 14445560}
2017-06-26 15:07:36 ERROR (Thread-3) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 13}
2017-06-26 15:07:36 ERROR (Thread-11) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 2}
2017-06-26 15:11:14 ERROR (Thread-1) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 3}
2017-06-26 15:11:14 ERROR (Thread-3) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 1}
2017-06-26 15:11:14 ERROR (Thread-11) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 9}
2017-06-26 15:11:14 ERROR (Thread-1) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 1, ‘protocol’: [‘kaku_dimmer’], ‘on’: 1, ‘dimlevel’: 6, ‘id’: 14445560}
2017-06-26 15:11:14 ERROR (Thread-3) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 13}
2017-06-26 15:11:14 ERROR (Thread-11) [homeassistant.components.pilight] Pilight send failed for {‘unit’: 0, ‘protocol’: [‘kaku_switch_old’], ‘on’: 1, ‘id’: 2}

pilight sometimes still works for a little while but then dies :frowning:

Is pilight running at all? If you’ve done recently an update and upgraded to the 4.9 kernel pilight doesn’t work with it.

run the following on your raspberry:

uname -r

if you get back a response that starts with 4.9 then that’s the reason why it fails. Pilight development has gone stale and there has been no stable release for 2 years now. I personally switched to rpi_rf:

You can check the pilight issue https://github.com/pilight/pilight/issues/324

It’s not pilight that fails I think as I can still use the pilight web gui, it’s HA that fails to communicate with pilight. I can’t change to rpi_rf as it won’t work with half my equipment :frowning: Also I know about the problem with the kernal, I run the previous version since that works fine :slight_smile: (4.4.5)

Exactly the same issue here: plight version 8.1.1 and hass 0.73.1. gui-pilight and gui-hass work fine day-1:

2018-07-19 17:51:01 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=protocol=nexa_switch, id=7733802, unit=1, on=1, service=send, service_call_id=1976793520-34, domain=pilight> 2018-07-19 17:51:03 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=protocol=nexa_switch, id=7733802, unit=1, off=1, service=send, service_call_id=1976793520-36, domain=pilight> 2018-07-19 17:51:15 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=protocol=nexa_switch, id=7733802, unit=1, on=1, service=send, service_call_id=1976793520-38, domain=pilight> 2018-07-19 17:51:17 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=protocol=nexa_switch, id=7733802, unit=1, off=1, service=send, service_call_id=1976793520-40, domain=pilight> 2018-07-19 17:51:33 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=protocol=nexa_switch, id=7733802, unit=1, on=1, service=send, service_call_id=1976793520-42, domain=pilight> 2018-07-19 17:51:39 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=protocol=nexa_switch, id=7733802, unit=1, off=1, service=send, service_call_id=1976793520-44, domain=pilight>

Then next day gui-hass gives error whilst gui-pilight works perfectly fine:

018-07-20 22:06:33 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=protocol=nexa_switch, id=7733802, unit=1, on=1, service=send, service_call_id=1976793520-52, domain=pilight> 2018-07-20 22:06:33 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall pilight.send: protocol=['nexa_switch'], id=7733802, unit=1, on=1> File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/pilight.py", line 148, in decorated File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/pilight.py", line 91, in send_code pilight_client.send_code(message_data) File "/srv/homeassistant/lib/python3.5/site-packages/pilight/pilight.py", line 186, in send_code 2018-07-20 22:06:35 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=protocol=nexa_switch, id=7733802, unit=1, on=1, service=send, service_call_id=1976793520-54, domain=pilight> 2018-07-20 22:06:35 ERROR (Thread-12) [homeassistant.components.pilight] Pilight send failed for {'unit': 1, 'on': 1, 'protocol': ['nexa_switch'], 'id': 7733802} 2018-07-20 22:06:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_data=protocol=nexa_switch, id=7733802, unit=1, off=1, service=send, service_call_id=1976793520-56, domain=pilight> 2018-07-20 22:06:37 ERROR (Thread-3) [homeassistant.components.pilight] Pilight send failed for {'unit': 1, 'protocol': ['nexa_switch'], 'id': 7733802, 'off': 1}

I guess I know what’s going on. If pilight gets restarted then HA loses connection (pid). Can be this considered a bug?

Hi all!

I want to weigh in on this discussion. I have some similar issues showing up.

I am running pilight 8 on RPi3 connected via Wifi to my network. Its solely purpose is to control my RF switches from a central position in my apartment. Home Assistant is running in a docker container on a EXSi VM (Ubuntu Server). Both devices are in the same subnet and VLAN, so no routing needed.

I have been on HA 100.3 for the last couple weeks and switched to 102.2 just now in the hope it might resolve my issue. Enough of background info (I hope)…

My problem: When ever I fire a switch in HASS related to a pilight device the first switching causes an error in HA log, e.g. Pilight send failed for {'protocol': ['intertechno_switch'], 'unit': 0, 'id': 105, 'on': 1}

The next switching (does not matter if on the same device or any other devices) works fine. Same goes for all following switches. The same behaviour repeats after some idle time (I couldn’t not figure out how long, yet). Again the first switching does not work, the following activities work fine.

This causes multiple issue:

  1. Automations, which just turn on or off one device simply have no effect on the device anymore, as the first (and only) firing of the switch fails.

  2. Automations with multiple devices (turn on a group of lamps) miss turning on / off the first lamp in the group.

Network connection is solid: Ping runs for hours without any drop packages between HA VM and pilight.

Any considerations? As I did not change any of my configuration I did not post any of it, yet. I can though, if it helps trouble shooting.

I am a little desperate as the exact setup has been working for over 2 years without any of theses issue. (Of course, I upgraded Home Assistant from time to time over the course of months).

Help highly appreciated! :slight_smile:

I think I figured it out.

The problem was that I disallowed all traffic for my RB3 into other VLANs / to the internet. This lead to the RB3’S WiFi connection dozing off, so the first packages sent from HA to pilight being rejected. I now allowed DNS probing for the Pi to the internet again and everything is back to normal. NOICE! :smiley:

Maybe that helps somebody else!