pilight2mqtt

Some days ago I blogged about my first experiments with pilight and mentioned that I intended to attach it to Home Assistant. Today I finally found the time to get started and now have a working prototype ready.

pilight2mqtt

I started a new project on GitHub called pilight2mqtt. What it does is basically talk to the pilight API and broker between an MQTT channel and pilight that way.

The following video gives an impression of how it works. I’m using the awesome mqtt-spy to send MQTT messages, in case you are wondering.

The whole thing is based on python, using paho-mqtt for the MQTT part, which makes things fairly easy. The idea is to eventually install this as a service on my Raspberry Pi and transfer messages that way. Obviously it will work in Home Assistant the same way all other MQTT devices work there.

My to do list is still somewhat long-ish, the most important part being support for brokering message from pilight to MQTT (today only the other direction is implemented, as shown in the video).

Then there are still some more items on my list the will need a closer look

  • Robustness against connection loss
  • Infrastructure to install/run service
  • documentation

In any case, if you are interested, head over to GitHub and check out the project. I will post some more details on the implementation in the next days.

  • David Leon

    Pilight is supported by home-assistant since version 0.26. No reason anymore to do this via mqtt.

    • I also noticed – having the mqtt bridge may still be useful for people not using home-assistant, though.
      But then again, who would not? 😉