vendredi 6 mars 2015

How to Subscribe a Bash Script as a MQTT Client


From my understanding:




  • Client can be any device as long as it has an MQTT library running on it, from a microcontroller to a server, but must be connected to an MQTT broker over any network




  • Broker is responsible for receiving all messages,and sending these messages to the clients who are subscribed.




So at the moment I have a bash script that filters out specific data from the MQTT stream. The filtered information is then stored into a csv file, and later called upon to update an MySQL table.


Q: How can I make it so that my bash script (that updates the MySQL table) is subscribed to the MQTT broker as a client, so every time new data is sent I can push/send it out to the MySQL table.



Aucun commentaire:

Enregistrer un commentaire