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

#34295

Ian
Participant

munnecke

I haven’t had much of a look at gv.py yet. I assume your modifications will create data items that can be input via the Opensprinkler web interface?

Some comments

– we probably need hostname and port for the MQTT broker (although we could just enter it as part of the hostname).

– I am thinking of having several topics to post to eg Garden/OSPI/stationrun, Garden/OSPI/weather, and so on and being able to enable/disable each separately. Topics will essentially be based on logical groupings of data items. For example in my logging application I need the Station names, the station number of the master valve, the number of stations, and the status information for each station.

However this mixes some static information and dynamic, and I may change my mind! I am confident though that I will wind up publishing to more than one topic from OSPi.

– I am not sure what your mpay variable is for (in my mind a topic would have a fixed set of data items which would define the payload).  Are you thinking to have a more generic system and mpay defines the data items (from gv)? That would be very flexible.

Your links provided some interesting reading. I too am a bit creaky with my programming skills.