# IoT database through MQTT

**URL:** <https://discourse.nodered.org/t/iot-database-through-mqtt/25542>\
**Category:** General\
**Created:** [26 April 2020 11:15 UTC](https://discourse.nodered.org/t/iot-database-through-mqtt/25542 "2020-04-26T11:15:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![luiza98](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@luiza98](https://discourse.nodered.org/u/luiza98)\
**Post date:** [26 April 2020 11:15 UTC](https://discourse.nodered.org/t/iot-database-through-mqtt/25542/1 "2020-04-26T11:15:46Z")

</div>

Hello,

I'm new to this and I have a project that is very important to me, but it exceeds my knowlede.  
I have to a database for an IoT device through mqtt protocol and sowing the results in Grafana.  
Can this be done with Node-Red? If yes, can someone give me more details about the process?  
I've been looking at some yt tutorials but it's still unclear to me  
Thank you so much!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 April 2020 12:26 UTC](https://discourse.nodered.org/t/iot-database-through-mqtt/25542/2 "2020-04-26T12:26:54Z")

</div>

Welcome to the forum. Yes this can be done with the aid of node red. It exactly what many people do. I suggest storing the data in an Influx database as that is designed for time series data and is easy to interface with node red and grafana.  
I would build this in parts rather than trying to get it all going at once. Initially think about getting the data from the device into node-red.  
What sort of computer/operating system are you using?  
What sort of IoT device is it and how does it make its data available?

---

<div class="post-metadata">

**Author:** ![luiza98](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@luiza98](https://discourse.nodered.org/u/luiza98)\
**Post date:** [26 April 2020 12:36 UTC](https://discourse.nodered.org/t/iot-database-through-mqtt/25542/3 "2020-04-26T12:36:37Z")

</div>

Thank you for your response.  
I am working with Windows 10. And as for the IoT part, I was thinking about using a rasberry pi emulator.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 April 2020 13:41 UTC](https://discourse.nodered.org/t/iot-database-through-mqtt/25542/4 "2020-04-26T13:41:02Z")

</div>

Sorry I don't know what you mean by a pi emulator being an IoT part. I thought you meant you had an IOT device. I think you had better explain in more detail what you are trying to do. Is this a college exercise or something?

---

<div class="post-metadata">

**Author:** ![luiza98](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@luiza98](https://discourse.nodered.org/u/luiza98)\
**Post date:** [27 April 2020 09:26 UTC](https://discourse.nodered.org/t/iot-database-through-mqtt/25542/5 "2020-04-27T09:26:58Z")

</div>

Yes, it is a college project.  
And I don't currently have an IoT device and I thought I'd use something virtual instead

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 April 2020 12:36 UTC](https://discourse.nodered.org/t/iot-database-through-mqtt/25542/6 "2020-04-27T12:36:52Z")

</div>

OK, yes a Pi could do that. Run node-red on that too and you can easily send the simulated data to an MQTT broker on the PC.

---

<div class="post-metadata">

**Author:** ![luiza98](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@luiza98](https://discourse.nodered.org/u/luiza98)\
**Post date:** [27 April 2020 16:24 UTC](https://discourse.nodered.org/t/iot-database-through-mqtt/25542/7 "2020-04-27T16:24:27Z")

</div>

I will try that. Thank you so much for your advice!

---

<div class="post-metadata">

**Author:** ![onbekende](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/onbekende/32/20559_2.png) [@onbekende](https://discourse.nodered.org/u/onbekende)\
**Post date:** [27 April 2020 20:05 UTC](https://discourse.nodered.org/t/iot-database-through-mqtt/25542/8 "2020-04-27T20:05:18Z")

</div>

InfluxDB also works fine to grab your data from for Grafana.  
MQTT is volatile data.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 June 2020 20:05 UTC](https://discourse.nodered.org/t/iot-database-through-mqtt/25542/9 "2020-06-26T20:05:33Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
