IO Pi Plus & Mosquitto MQTT
2018 Views - Created 19/12/2017
It would be great to do this the outher way round as well so Home Assistant could publish a MQTT messge and the Pi could then turn on the output.
So I know what I want to happen and that it can be done but I do not know how in python to program the boards and to interface with the Mosquitto python library.
Is there a great python programmer that can help me I do not think it should be very hard to achieve - if you know how to program python.
If I can get this to work it will allow endless automations and real life onteraction
I found this tutorial on using MQTT with Raspberry Pi and Python.
The code in the subscriber example could be modified to work with the IO Pi library. You would need to add your code into the on_message function so it checks to see if a certain message has been received and if so it can then send the command to the IO Pi to read or write to the pins.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.