Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




3690 posts

Uber Geek
+1 received by user: 1393

Subscriber

Topic # 239825 6-Aug-2018 18:30
Send private message

Sticking this in here because my use is for home automation.

 

So I am just not getting anywhere with Grafana. I have node-red feeding sensor data in to influxdb, and now I just want to make a pretty graph in Grafana.

 

I've double checked the data is in influxdb by just using the CLI and do a query 'SELECT * FROM StudyTemp'.

 

The 'Data Sources' thing in Grafana says the data source for influxdb is working.

 

But then I come to make a graph, and that stupid click and drag query thing just isn't doing what I want/I don't know what i want it to do.

 

So all I want to know, is how do I fill this in to make a nice graph of my 'StudyTemp' data...

 

 

Have worked out, obviously, that select measurement gets set to StudyTemp. But then I don't need any 'where' statements as far as I'm concerned because I just want all of it.

 

And yes, I know there is heaps of info out there but have been sifting through it all weekend and really got no where - they seem to be mostly aimed at just the set up of the system and not actually about displaying data.


Create new topic
Amanzi
895 posts

Ultimate Geek
+1 received by user: 97

Trusted
Subscriber

  Reply # 2068904 6-Aug-2018 18:34
Send private message

I struggled at first with Grafana, but this article helped me https://philhawthorne.com/getting-started-with-grafana-influxdb-for-home-assistant/

3764 posts

Uber Geek
+1 received by user: 2284

Trusted
Spark NZ

  Reply # 2068937 6-Aug-2018 20:06
Send private message

I haven't looked at yours in detail, but I do the same thing and this is what my setup looks like.

 

 

Cheers - N

 

 


 
 
 
 




3690 posts

Uber Geek
+1 received by user: 1393

Subscriber

  Reply # 2068957 6-Aug-2018 20:36
Send private message

How do you put your data in to influxdb? Specifically, where does that 'domain' and 'entity_id' stuff come from. When I look at the influxdb table it's just two columns (timestamp and data), so I'm not sure what else I can select on?

 

For background, I made that multisensor from Bruh automation (same as your sensors I think). Only difference is I'm running the ESP Easy firmware instead of that Arduino sketch of Bruh's.

 

To get the temperature though node-red just needs to monitor the MQTT topic for it (/esp05/temp_humid/temp), and then pipes that straight in to an influxdb node. The only option I have for that is influxdb node is to set the 'Measurement' field which is where the 'StudyTemp' thing comes from.


3764 posts

Uber Geek
+1 received by user: 2284

Trusted
Spark NZ

  Reply # 2068959 6-Aug-2018 20:41
Send private message

Hmm. let me try and remember... My sensors are MQTT and are using the arduino sketch. My influx DB has lots of other stuff in it as well, and multiple sensors - so those fields just restrict (maybe needlessly) to the entity of interest.

 

Homeassistant reads he sensors and shoves the data into influxDB

 

 

 

Cheers - N

 

 


Amanzi
895 posts

Ultimate Geek
+1 received by user: 97

Trusted
Subscriber

  Reply # 2068961 6-Aug-2018 20:44
Send private message

The "select measurement" field needs to be set to the units you want, i.e. the degrees symbol for temperature. Look at the screenshot above, or follow the instructions in the link I posted.

Amanzi
895 posts

Ultimate Geek
+1 received by user: 97

Trusted
Subscriber

  Reply # 2068963 6-Aug-2018 20:59
Send private message

Here's a basic example to create a temperature graph.

 

You need to change the "select measurement" field to the units relevant to what you're want to graph, then choose the correct entity_id, then change the 'group by' field so that it says 'fill(none)'.

 

 

 


1586 posts

Uber Geek
+1 received by user: 156

Trusted

  Reply # 2068965 6-Aug-2018 21:10
Send private message

click "select measurement" and then from the list choose what you want.

 

if there is nothing there then something isn't working




CPU: Intel 3770k| RAM: F3-2400C10D-16GTX G.Skill Trident X |MB:  Gigabyte Z77X-UD5H-WB | GFX: GV-N660OC-2GD gv-n660oc-2gd GeForce GTX 660 | Monitor: Qnix 27" 2560x1440

 

 


1586 posts

Uber Geek
+1 received by user: 156

Trusted

  Reply # 2068966 6-Aug-2018 21:10
Send private message

click "select measurement" and then from the list choose what you want.

 

if there is nothing there then something isn't working




CPU: Intel 3770k| RAM: F3-2400C10D-16GTX G.Skill Trident X |MB:  Gigabyte Z77X-UD5H-WB | GFX: GV-N660OC-2GD gv-n660oc-2gd GeForce GTX 660 | Monitor: Qnix 27" 2560x1440

 

 




3690 posts

Uber Geek
+1 received by user: 1393

Subscriber

  Reply # 2068984 6-Aug-2018 21:57
Send private message

Ah right. So when I click that select measurement field, it just shows me the names of the 'tables' in my database ie. StudyTemp.

So I think my issue is how I am putting the info in to the DB. Perhaps I'm not using the correct node.

Amanzi
895 posts

Ultimate Geek
+1 received by user: 97

Trusted
Subscriber

  Reply # 2068989 6-Aug-2018 22:00
Send private message

I don't use node-red, I just have the standard Home-assistant component feeding all data into InfluxDB. That automatically creates a database called home_assistant which is the one that I connect to in the data source screen.


2020 posts

Uber Geek
+1 received by user: 1131


  Reply # 2068995 6-Aug-2018 22:12
Send private message

Does "StudyTemp" contain only the data you want?
Or do you want to select only part of it for a graph line




Location: Dunedin



3690 posts

Uber Geek
+1 received by user: 1393

Subscriber

  Reply # 2069084 7-Aug-2018 08:03
Send private message

andrewNZ: Does "StudyTemp" contain only the data you want?
Or do you want to select only part of it for a graph line

 

Yep StudyTemp contains the only data I want... which is why I don't get why I can't just do a select all on that table.


2020 posts

Uber Geek
+1 received by user: 1131


  Reply # 2069179 7-Aug-2018 10:18
Send private message

Assuming you have set a default database in grafana. Try

From: default. StudyTemp
Select: field(value). Last().




Location: Dunedin

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Geekzone Live »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.