I have an Arduino Mega sending temp and humidity data through an esp-01 to Mosquitto running on Pi 3. Is it possible to collect the incoming MQTT messages on the Pi to a web server running on the same Pi?

I'm not exactly sure what I want except to be able to view my data easily and possibly save to a spreadsheet of some sort eventually.

  • 1
    It's not clear what you want but the actual question is not Pi specific. – joan Jan 8 '18 at 16:27

You can use Node-Red to collect MQTT data into a database. You can use Peter Scargill's script to install Node-Red, mosquitto, webserver and other software on your Pi.

Here is a tutorial on how to use node red with a database.

You may be able to see the data in Node-Red UI table and later export the data from the DB into CSV and read in a spreadsheet.

enter image description here

  • This gives my project a direction. I already have Mosqitto and Node-Red installed on my Pi but I didn't like the UI Table, too plain. I just came across where there is a UI Dashboard for Node-Red and that looks interesting. – oibdrew Jan 8 '18 at 19:54
  • My whole project consists of 10 hygrometers, 10 water solenoids, 2 DHT22 temp and humidity sensors, 1 rain detector, and soon to have a few more things, all connected to an Arduino mega powered by solar power. I just learned how to add an ESP-01 to send the data via wifi (router with no internet) to my Pi 3 running mosquitto and even more recently started using Node-Red. I wanted something that will give a more appealing look to the data collection. – oibdrew Jan 8 '18 at 20:06
  • @oibdrew you should be able to create a custom db query(s) to suit your needs. Thanks. – Chetan Bhargava Jan 8 '18 at 20:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.