OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Using MQTT to log data › Reply To: Using MQTT to log data
Thanks, Ian. I got the single node fnBuildurl.. I noticed that you used two different topics – one with plural “api-responses” on lines 48 and 38. I get an “Unexpected Token” error when I try to deploy the node…. not very helpful; it just gives the message and no other info. Maybe it was garbled in the email.
I don’t understand the full data flow of how this all works…
It would seem simpler to me to put the publisher logic in the main OSPI routine, synchronized with the state change of the sprinkler. Polling seems to be a lot more complicated, and subject to some missed events if the poll happens to happen during a state change in OSPI. I haven’t done real time systems like this before, but it seems to me that the whole value of having a event/message architecture is to get around all the problems of polling. Plus, polling doesn’t seem to be scalable; as we add more detail and events, it would seem that the polling process would get overwhelmed.
How do you display the messages in XBMC?
Maybe this is worth moving off to a Github repo?
This is a lot of fun.