I want to dump data which is received by MQTT broker to the sqlite3 db provided by Django/

2k views Asked by At

I am using a mqtt broker in my code and it is reading some data for particular user.How can i dump this data for that user for activity log in sqlite3 db ,which is provided by Django.

2

There are 2 answers

1
Dominik Obermaier On

Different approaches for doing this are described here: http://www.hivemq.com/mqtt-sql-database/

To sum up, you have essentially two possibilities

  • Using a wildcard subscriber application which stores the data to the DB
  • Intercept messages directly at the broker and then persist it to the DB
0
hardillb On

You can also do this with Node-RED (http://nodered.org) with a MQTT subscriber node and a sqlite output node.