I have been trying to configure pilight switchs (gpio) and after lots of debuging around and lots of configuration options tested I finally supossing that the pilight service is broken in HA.
I was not able to get any event received with binary-sensor, sensor, switchs with “on/off_code_received” even automation with event trigger.
The “sending” service works like a charm.
This is the related pilight debug log (in witch you can se that service “receive” is not initiated at all.
homeassistant@rpi3s:~/.homeassistant$ tail -f home-assistant.log |grep pilight
2018-09-06 08:48:15 INFO (MainThread) [homeassistant.loader] Loaded switch.pilight from homeassistant.components.switch.
pilight
2018-09-06 08:48:16 INFO (MainThread) [homeassistant.loader] Loaded pilight from homeassistant.components.pilight
2018-09-06 08:48:16 INFO (MainThread) [homeassistant.loader] Loaded binary_sensor.pilight from homeassistant.components.
binary_sensor.pilight
2018-09-06 08:48:18 DEBUG (MainThread) [homeassistant.components.automation] Automation automation.pilight_door1_closed
initial state True from default initial state
2018-09-06 08:48:18 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=None, new_sta
te=<state automation.pilight_door1_closed=off; last_triggered=None, friendly_name=pilight_door1_closed @ 2018-09-06T08:4
8:18.349905+02:00>, entity_id=automation.pilight_door1_closed>
2018-09-06 08:48:18 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service=set, service_cal
l_id=1974718192-3, service_data=visible=False, entities=['automation.deteccion', 'automation.en_coche', 'automation.kodi
_play_on', 'automation.luz_cocina_off', 'automation.luz_cocina_on', 'automation.luz_entrada_off', 'automation.luz_entrad
a_on', 'automation.palomas', 'automation.piscina_alta_velocidad', 'automation.piscina_baja_velocidad', 'automation.pisci
na_filtrar', 'automation.piscina_no_filtrar', 'automation.plantas', 'automation.puerta_garaje_abierta', 'automation.puls
ador1_1click', 'automation.pulsador1_2click', 'automation.updates', 'automation.kodi_play_off', 'automation.pilight_door
1_closed', 'automation.timer'], object_id=all_automations, name=all automations, domain=group>
2018-09-06 08:48:18 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=None, new_sta
te=<state group.all_automations=off; order=6, entity_id=('automation.deteccion', 'automation.en_coche', 'automation.kodi
_play_on', 'automation.luz_cocina_off', 'automation.luz_cocina_on', 'automation.luz_entrada_off', 'automation.luz_entrad
a_on', 'automation.palomas', 'automation.piscina_alta_velocidad', 'automation.piscina_baja_velocidad', 'automation.pisci
na_filtrar', 'automation.piscina_no_filtrar', 'automation.plantas', 'automation.puerta_garaje_abierta', 'automation.puls
ador1_1click', 'automation.pulsador1_2click', 'automation.updates', 'automation.kodi_play_off', 'automation.pilight_door
1_closed', 'automation.timer'), auto=True, hidden=True, friendly_name=all automations @ 2018-09-06T08:48:18.432530+02:00
>, entity_id=group.all_automations>
2018-09-06 08:48:23 INFO (MainThread) [homeassistant.setup] Setting up pilight
2018-09-06 08:48:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=send, doma
in=pilight>
2018-09-06 08:48:23 INFO (MainThread) [homeassistant.setup] Setup of domain pilight took 0.1 seconds.
2018-09-06 08:48:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=pilight>
2018-09-06 08:48:23 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.pilight
2018-09-06 08:48:23 INFO (MainThread) [homeassistant.components.switch] Setting up switch.pilight
2018-09-06 08:48:30 INFO (MainThread) [homeassistant.components.automation] Initialized trigger pilight_door1_closed
2018-09-06 08:48:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state automa
tion.pilight_door1_closed=off; last_triggered=None, friendly_name=pilight_door1_closed @ 2018-09-06T08:48:18.349905+02:0
0>, new_state=<state automation.pilight_door1_closed=on; last_triggered=None, friendly_name=pilight_door1_closed @ 2018-
09-06T08:48:30.604167+02:00>, entity_id=automation.pilight_door1_closed>
2018-09-06 08:48:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state group.
all_automations=off; order=6, entity_id=('automation.deteccion', 'automation.en_coche', 'automation.kodi_play_on', 'auto
mation.luz_cocina_off', 'automation.luz_cocina_on', 'automation.luz_entrada_off', 'automation.luz_entrada_on', 'automati
on.palomas', 'automation.piscina_alta_velocidad', 'automation.piscina_baja_velocidad', 'automation.piscina_filtrar', 'au
tomation.piscina_no_filtrar', 'automation.plantas', 'automation.puerta_garaje_abierta', 'automation.pulsador1_1click', '
automation.pulsador1_2click', 'automation.updates', 'automation.kodi_play_off', 'automation.pilight_door1_closed', 'auto
mation.timer'), auto=True, hidden=True, friendly_name=all automations @ 2018-09-06T08:48:18.432530+02:00>, new_state=<st
ate group.all_automations=on; order=6, entity_id=('automation.deteccion', 'automation.en_coche', 'automation.kodi_play_o
n', 'automation.luz_cocina_off', 'automation.luz_cocina_on', 'automation.luz_entrada_off', 'automation.luz_entrada_on',
'automation.palomas', 'automation.piscina_alta_velocidad', 'automation.piscina_baja_velocidad', 'automation.piscina_filt
rar', 'automation.piscina_no_filtrar', 'automation.plantas', 'automation.puerta_garaje_abierta', 'automation.pulsador1_1
click', 'automation.pulsador1_2click', 'automation.updates', 'automation.kodi_play_off', 'automation.pilight_door1_close
d', 'automation.timer'), auto=True, hidden=True, friendly_name=all automations @ 2018-09-06T08:48:30.700890+02:00>, enti
ty_id=group.all_automations>
2018-09-06 08:48:33 DEBUG (Thread-22) [homeassistant.util.json] JSON file not found: /srv/homeassistant/lib/python3.5/si
te-packages/homeassistant/components/binary_sensor/.translations/pilight.es.json
2018-09-06 08:48:33 DEBUG (Thread-22) [homeassistant.util.json] JSON file not found: /srv/homeassistant/lib/python3.5/si
te-packages/homeassistant/components/switch/.translations/pilight.es.json
2018-09-06 08:48:33 DEBUG (Thread-22) [homeassistant.util.json] JSON file not found: /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/.translations/pilight.es.json
2018-09-06 08:48:35 DEBUG (Thread-16) [homeassistant.util.json] JSON file not found: /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/binary_sensor/.translations/pilight.en.json
2018-09-06 08:48:35 DEBUG (Thread-16) [homeassistant.util.json] JSON file not found: /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/.translations/pilight.en.json
2018-09-06 08:48:35 DEBUG (Thread-16) [homeassistant.util.json] JSON file not found: /srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/.translations/pilight.en.json
Note this registered service:
2018-09-06 08:48:23 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: service=send, domain=pilight>
Maybe I missing a “service=receive, domain=pilight”
Maybe I have a problem with my instalation, or maybe I using latest pilight 8.x, but I suppose it has the same api in receiving json events.
But I suspect for a problem in HA because there are some posts here reporting similar issues (sending work fine, receiving fails at all).
Please, any help would be apreciated.
Please any help could be apreciated.