OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Using MQTT to log data Reply To: Using MQTT to log data



The MQTT plugin is ready for wider testing. You will need the Blinker Test version (see for instructions – at this stage I am not up to date enough with Git to upload it to the repository, so you will have to use the attached files.

To use it, you need the files and installed in your /home/pi/OSPi/plugins directory, and the mqtt.html file in your /home/pi/OSPi/templates directory. The mqtscfile.dat, mqtlgfile.dat and mqtzcfile.dat are optional and if used should be placed in your /home/pi/OSPi/data directory. The attached file replaces the one provided in the Blinker test branch. The module is new. If you don’t want to install the .dat files, just change the message specification for the zone change, station name change and logged in events so they don’t use the “file” option.

The and files need to be made executable to enable the plugin. These files are attached, but due to forum restrictions I have had to name them and You will need to rename them before using them.

When using it for the first time use the plugins menu item to go to the MQTT configuration screen. Enter the host address and port of your MQTT broker here as a minimum. The attached word document should be self explanatory, and replaces the version I provided earlier.

I am working on a Node Red application that will process these MQTT messages. In the interim period until it is finished, there are some options for testing described in the documentation. The simplest is to use Node Red to subscribe to the topics you define and send the message to email.

NB: Apparently I can only attach 4 files, I will attach the optional .dat files in a separate post.