Hey guys, I feel a little like I’m banging my head against a wall here. I’d appreciate any input!
I’ve got pilight, homeassistant and Alexa Voice service installed on a Pi3, HA is installed in virtual env.
I’ve got various rf sockets that I control using HA with homebridge and/or alexa. All working nicely. But I want to be able to use a remote too, so that if I have a guest staying they can use a remote control to operate said lights and this then update in HA. I also want to add further RF stuff like door and weather monitoring etc, but I can’t get HA to receive from pilight.
The Pilight gui reflects my remote control operating, and it works when using HA dashboard. But when I use the remote, it doesn’t update the HA dashboard with whether it’s on/off.
Firstly, here’s my pilight config.json:
{
"devices": {
"ambilight": {
"protocol": [ "kaku_switch" ],
"id": [{
"id": 5628626,
"unit": 1
}],
"state": "off"
}
},
"rules": {},
"gui": {
"ambilight": {
"name": "ambilight",
"group": [ "Lights" ],
"media": [ "all" ],
"readonly": 0
}
},
"settings": {
"log-level": 6,
"pid-file": "/var/run/pilight.pid",
"log-file": "/var/log/pilight.log",
"webserver-enable": 1,
"webserver-root": "/usr/local/share/pilight/webgui",
"webserver-http-port": 5001,
"webserver-https-port": 5002,
"webserver-cache": 1,
"port": 5000,
"gpio-platform": "none"
},
"hardware": {
"433nano": {
"comport": "/dev/ttyUSB0"
}
},
"registry": {
"webserver": {
"ssl": {
"certificate": {
"secure": 0,
"location": "/etc/pilight/pilight.pem"
}
}
}
},
"pilight": {
"firmware": {
"version": 1,
"lpf": 8,
"hpf": 1600
},
"version": {
"current": "8.0.8"
}
}
}}
Here’s my HA configuration.yaml:
pilight:
host: 127.0.0.1
port: 5000
My switch.yaml:
- platform: pilight
switches:
Ambilight:
on_code:
protocol: kaku_switch
unit: 0
id: 5628626
'on': 1
off_code:
protocol: kaku_switch
unit: 0
id: 5628626
'off': 1
on_code_receive:
protocol: kaku_switch
id: 5628626
unit: 0
state: 'on'
echi: false
off_code_receive:
protocol: kaku_switch
id: 5628626
unit: 0
state: 'off'
echo: false
Here’s my output from pilight-receive:
{
"message": {
"id": 5628626,
"unit": 1,
"state": "on"
},
"origin": "receiver",
"protocol": "arctech_switch",
"uuid": "0000-b8-27-eb-09d9a5",
"repeats": 1
}
{
"message": {
"id": 5628626,
"unit": 1,
"state": "off"
},
"origin": "receiver",
"protocol": "arctech_switch",
"uuid": "0000-b8-27-eb-09d9a5",
"repeats": 1
}
So when I operate the switch in HA, it operates the switch in plight gui. But if i use the remote, it operates the pilight gui but doesn’t update the HA dashboard.
Any idea where I might be going wrong? Thanks!