Prescient: How to use InfluxDB 2.0 with Node RED | 5-minute tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi all uh this is a quick tutorial on working with influx 2.0 on node red so this video is in contribution uh to our previous tutorial which was on influx 1.8 uh feel free to check that out all the links in the description below so i'm not i'm running a node red on a jackson nano but you can run noted anywhere on the raspberry pi or on a cloud vm and this is what the flow looks like and for this tutorial i'm using influx cloud and i've already got a bucket set up here which is called youtube tutorial and right now it's empty coming back to our flow so this flow looks uh similar to the flow that we worked on in our last tutorial so we are doing three things we are writing to the database we are reading from the database and we'll make a table in the node red dashboard from the data we read so the first write operation we are just writing a random value to the influx db so i have an inject node with a random number generator and i am formatting the data with fields and tags you can read more about this structure using the info panel in the influx db out node so after the formatting the data i'm sending the data as message.payload to influx db out node and which is set up with my credentials of influx db cloud so what i'm going to do now is add three data points and if i come back to my inflexibility cloud now i should see the three data points that i added so the fields field was temperature the value the random number and the tag is timestamp so to fetch the points i will use an influx db in node and i i can either write the query here or in this scenario i'm using a function node to inject my query so according to my query bucket is my youtube tutorial on the name of my bucket range is from start minus five minutes so it'll give me last time is data the name of my measurement and the field that i'm looking for so you can update this query to add more fields or to filter out the results and i'm using a debug block just to display the results on the debug sidebar so if i fetch i should see the three objects that i added initially now what we're going to do is we're going to use these objects and display them in the note red dashboard so for that i'm using a table node and after the read operation i'm using a function node to parse our data so i'm looping through this object this array and i'm making a list out of it with temperature and my time so and then i'm pushing into influx uh sorry and then i'm pushing it to node red dashboard so if i hit fetch now and if i go to my node right dashboard i should see the three objects that were that were read from the database now let's say if i push add a few more points in the database so if i submit my query again i get more points and if i fetch again so these are the points that i get uh that i pushed in the last five minutes that's it and this flow is available for download so please check the description below you
Info
Channel: Prescient
Views: 23,868
Rating: undefined out of 5
Keywords: Prescient Designer, IoT, IIoT, Industrial IoT, Easy IoT, Multiple edge devices, Node-RED, Node-RED IoT, IoT software, IoT application development, IoT solutions, IoT for business, IoT for Industry 4.0, Internet of Things, IoT tutorial, simple IoT, Prescient, InfluxDB, influxdb, json, JSON object, JSON flow
Id: 4_kCNBfv1t4
Channel Id: undefined
Length: 4min 33sec (273 seconds)
Published: Wed Dec 01 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.