Want to Access Inputs and Outputs With MQTT

Topics about the Software of Revolution Pi
Post Reply
guido_ffm
Posts: 1
Joined: 21 Dec 2018, 13:54
Answers: 0

Want to Access Inputs and Outputs With MQTT

Post by guido_ffm »

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?
User avatar
RevPiModIO
KUNBUS
Posts: 322
Joined: 20 Jan 2017, 08:44
Answers: 0
Contact:

Re: Want to Access Inputs and Outputs With MQTT

Post by RevPiModIO »

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:

Code: Select all

sudo apt-get install revpipyload
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
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
Post Reply