Page 1 of 1

Want to Access Inputs and Outputs With MQTT

Posted: 21 Dec 2018, 14:01
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?

Re: Want to Access Inputs and Outputs With MQTT

Posted: 02 Jan 2019, 11:22
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