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.


3535 posts

Uber Geek
+1 received by user: 1292

Subscriber

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

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
865 posts

Ultimate Geek
+1 received by user: 73

Trusted
Subscriber

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

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

3602 posts

Uber Geek
+1 received by user: 2132

Trusted
Spark NZ

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

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

 

 

Cheers - N

 

 




3535 posts

Uber Geek
+1 received by user: 1292

Subscriber

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

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.


3602 posts

Uber Geek
+1 received by user: 2132

Trusted
Spark NZ

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

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
865 posts

Ultimate Geek
+1 received by user: 73

Trusted
Subscriber

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

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
865 posts

Ultimate Geek
+1 received by user: 73

Trusted
Subscriber

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

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)'.

 

 

 


1567 posts

Uber Geek
+1 received by user: 152

Trusted

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

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

 

 


1567 posts

Uber Geek
+1 received by user: 152

Trusted

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

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

 

 




3535 posts

Uber Geek
+1 received by user: 1292

Subscriber

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

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
865 posts

Ultimate Geek
+1 received by user: 73

Trusted
Subscriber

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

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.


1903 posts

Uber Geek
+1 received by user: 1051


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

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




Location: Dunedin



3535 posts

Uber Geek
+1 received by user: 1292

Subscriber

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

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.


1903 posts

Uber Geek
+1 received by user: 1051


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

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:





News »

Intel introduces new NUC kits and NUC mini PCs
Posted 16-Aug-2018 11:03


The Warehouse leaps into the AI future with Google
Posted 15-Aug-2018 17:56


Targus set sights on enterprise and consumer growth in New Zealand
Posted 13-Aug-2018 13:47


Huawei to distribute nova 3i in New Zealand
Posted 9-Aug-2018 16:23


Home robot Vector to be available in New Zealand stores
Posted 9-Aug-2018 14:47


Panasonic announces new 2018 OLED TV line up
Posted 7-Aug-2018 16:38


Kordia completes first live 4K TV broadcast
Posted 1-Aug-2018 13:00


Schools get safer and smarter internet with Managed Network Upgrade
Posted 30-Jul-2018 20:01


DNC wants a safer .nz in the coming year
Posted 26-Jul-2018 16:08


Auldhouse becomes an AWS Authorised Training Delivery Partner in New Zealand
Posted 26-Jul-2018 15:55


Rakuten Kobo launches Kobo Clara HD entry level reader
Posted 26-Jul-2018 15:44


Kiwi team reaches semi-finals at the Microsoft Imagine Cup
Posted 26-Jul-2018 15:38


KidsCan App to Help Kiwi Children in Need
Posted 26-Jul-2018 15:32


FUJIFILM announces new high-performance lenses
Posted 24-Jul-2018 14:57


New FUJIFILM XF10 introduces square mode for Instagram sharing
Posted 24-Jul-2018 14:44



Geekzone Live »

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



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.