Solar-powered weather station

The other way?

Move your dashboard fully into Grafana rather than moving everything to Dashboard.

Ah, with you.
I use both at the moment.
I would like to make my own website and have these widgets / graphs etc. published so I can see them when at work and my friends can access them too, but that's for another topic.

Well, when you do get to that point, you might find uibuilder helpful :wink:

I finally got chance to try using Csongor Varga's chart code last night (which Dave is using).
I adapted the code to work with influxdb instead of sqlite, and in theory it worked ok.
However, I found that it really struggled with the number of data points which I was throwing at it.
For example, power usage is monitored every 5 seconds, so that's over 17,000 data points per day. So displaying even a chart for 24hrs was painfully slow. If I then overlay the solar data - that's then over 34,000 points... and so on.
Displaying exactly the same data feeds on Grafana, is rendered within a couple of seconds.
I of course realise that I can downsample the data in influxdb (I already do this for longer term storage), and display the data at a lower resolution, but I would prefer not to do this as it would mask potential problems with solar diverter data.

So IMO, Csongor Varga's solution works great for low volume data points such as in Dave's example, but the node.js charts (is it node.js?) has its limitations, and possibly Grafana is the proper tool for the job with more demanding data.

Thanks for the feedback Paul, I'll have to have a serious look at Grafana and see how I can incorporate it into the Club's future plans and projects.

This is an example of my node-RED powered Grafana dashboard, using 5 x 5 second feeds (running on a Pi).

You Tube degrades the video quality, but this is a static screenshot -

1 Like

OK Paul you have got me 'hooked' - that looks brilliant.
I really like the way you can zoom into a certain timeframe and expand the plot.

How long did it take you to create it?

Thanks for sharing your work - I really do appreciate it.

I'm not very familiar with databases, queries etc, so it was initially a steep learning curve, with lots of googling over many nights. Once I got my head around the concept, it all seemed to fall into place pretty quickly.

The most important lesson I learnt is to make sure you have your data correctly formatted in influxdb before even looking at Grafana. If your data is wrongly stored, it makes retrieving & charting much more difficult.

Yes, I believe that Grafana does the "right" thing and automatically downsamples the displayed points according to the chart size and resolution.

While Dave (the other dynamic one :slight_smile:) has done what he can to make the Dashboard chart a little smarter I think that he may have hit the limits on what it can do.

Of course, Grafana is a server in its own right and gets lots of its own development - I suspect that it gets a fair bit of money from enterprise stuff too. It has also been doing chart-based dashboards for a long time. So not surprising that it can outperform Dashboard.

With Grafana, you can also improve things further by specifying the minimum time interval allowed. For example, with my Grafana dashboard, I generally get sensor updates about every 50sec or so. So I set my minimum time interval to 1 minute for detailed charts.

But I only keep per minute data for a week. For anything further than that, I summarise the data to hourly and for those charts I set the minimum time interval to 60min

image

2 Likes

Another graphing possibility is InfluxDB's Chronograf. While not as advanced as Grafana it does integrate easily with the InfluxDB database and does not have a steep learning curve.

1 Like

I had problems between Grafana and Influxdb because of formatting issues whilst storing data to Influxdb. I was put on the right track by changing the way the data was stored and then Grafana 'just worked' and is very easy to add graphs, charts, dials, tables etc.
Here is a snapshot of mine which I was suprised to find out, stored the data so anyone can have a play.
https://snapshot.raintank.io/dashboard/snapshot/xgjf6GFoFIwCmIuAnUcxp9JbSxUQ0wAW

Have a look
Martin

1 Like

Hi Martin @Cathprotech
Woo - your dashboard is impressive.
I must seriously consider introducing Influxdb and Grafana into my IoT classes.

Thanks for sharing your work.

Thanks David.

My biggest problem was writing the data to Influxdb in a format that could be read by Grafana.
Once that was done, honestly Grafana is so easy. What I have done is very simple yet the results are impressive.
Imagine what I could do if I actually knew what I was doing.
My Influxdb problem was solved by adding 'topics' to my data, it was quite simple but lots of asking questions to manage to get it right, once the format was correct, Grafana just reads the data and works fantastic.
Did you select the date ranges on my data and zoom in/out. That is just using a snapshot of published data!

Martin

@dynamicdave do your BME280's read an accurate temperature ? I have a couple, but they are all off by 5 degrees Celsius (it appears to be exact 5) I have no idea how this is possible.

Pardon me for butting in, but If you are talking "chinese" bme280s then I believe there are two (perhaps more) "types" around. One is a bmp280, but still labelled (in many cases) as a bme280. One includes humidity, and I think may be more accurate. Worth checking.

The ones I'm using are labelled BME/BMP280 - they sense temperature,humidity and pressure.
Temperature seems fairly accurate (within +- 0.5C) for what I need.
I've checked it against a digital thermometer over a 3hr period.
The sensor connects via I2C to a Wemos D1 Mini running ESP Easy and one thing I did do was to set the altitude in the 'device driver'.

BMP280 vs BME280 difference is the humidity sensor as far as I understand. I can read the temp/humidity/pressure and except for the temperature it seems to match the measurements of my other devices.

@dynamicdave does the altitude make a difference for temperature readings ? I thought that was for the pressure only, i could be wrong.

I think you're right about the altitude and the pressure reading.
I was just saying that was maybe a difference - I'm clutching at straws!!

Quite possibly, although I have read reports of various inaccuracies with them. Perhaps its their reliability that is the problem. It also doesn't help matters that some have been "mislabeled". Lucky they are cheap :wink: