What I want to achieve is:
The state of all configured inputs should be published to MQTT every 15 seconds.
Any state change of an input should be published immediatly.
Thre should be a topic that allows me to control the outputs.
I do not want to run additional logic.
Just forward the inputs to MQTT and MQTT to outputs.
How can I achieve this?
Want to Access Inputs and Outputs With MQTT
- RevPiModIO
- KUNBUS
- Posts: 335
- Joined: 20 Jan 2017, 08:44
- Contact:
Re: Want to Access Inputs and Outputs With MQTT
Just use RevPiPyLoad: https://revpimodio.org/en/revpipyplc-2/revpipyload/. It has all you want, out of the box.
Install the service on the Revolution Pi:
You can configure the MQTT system via graphical user interface from a computer connectet to the network or via configfile on the RevPi. Just set broker address, interval and set "send_on_event" to 1. Important: set the export flag in piCtory for the IO you want to publish via MQTT and start the System. RevPiPyLoad will just send that IO values with set export flag!
Set "write_outputs" to 1 to activate the topic which will allow you to set outputs.
Sven
Install the service on the Revolution Pi:
Code: Select all
sudo apt-get install revpipyload
Set "write_outputs" to 1 to activate the topic which will allow you to set outputs.
Sven
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!