smurphy
Full Member
Posts: 169
Raspberry Pi: Yes
Other Device: many ...
|
Post by smurphy on Feb 7, 2020 2:36:41 GMT -8
Was wondering, even looking at all kind of Docs, but can't figure it out. What data does the lightning detetor provide? Gauge data? Count? When is it reset? It seems the value is incremented as long as the system runs, and never set back to 0.
I need the info to know how to collect the data in my long term storage?
Seems the rain is incremente and store as what? mm? case in that case I need to multiplly the output by 1000.
For the lightnings, it seems it is a counter gauge. Always increasing too.
|
|
|
Post by SDL on Feb 7, 2020 15:59:07 GMT -8
That is the count of lightning strikes.
There is other information about the distance and time.
BP
|
|
smurphy
Full Member
Posts: 169
Raspberry Pi: Yes
Other Device: many ...
|
Post by smurphy on Feb 9, 2020 10:41:53 GMT -8
OK. I saw that. But is the counter always going up until the PI is rebooted? or how does it work. I need to know how to handle the data. If I store the difference to the previous entry etc., if the coiunter is reset, when and/or why?
|
|
|
Post by SDL on Feb 9, 2020 11:08:58 GMT -8
It goes back to zero when the Pi is rebooted. Yes, you can do that, but a better solution might be to store the count on the Pi and re-read it upon boot up.
BP
|
|
smurphy
Full Member
Posts: 169
Raspberry Pi: Yes
Other Device: many ...
|
Post by smurphy on Feb 10, 2020 4:46:24 GMT -8
Actually, in MRTG using counter that increases over time, you can set a max value. When that one is overshot, the MRTG will nill that entry and continue after. Used for network interfaces where you know the max value may be 100MBytes per 5minutes. Or else the graphs will be completely out of and. I'll have to think about how I'll handle it. With the current Storm conditions we have here, I see quite some Lightnings being detected, but I think I need to make a dedicated graph for it to be displayed.
|
|
smurphy
Full Member
Posts: 169
Raspberry Pi: Yes
Other Device: many ...
|
Post by smurphy on Feb 11, 2020 7:02:43 GMT -8
Actually, in MRTG using counter that increases over time, you can set a max value. When that one is overshot, the MRTG will nill that entry and continue after. Used for network interfaces where you know the max value may be 100MBytes per 5minutes. Or else the graphs will be completely out of band. I'll have to think about how I'll handle it. With the current Storm conditions we have here, I see quite some Lightnings being detected, but I think I need to make a dedicated graph for it to be displayed. So, I did kind of that. I have a weather-poller script for MRTG. It extracts the data from the csv files I exported from the DB, and will take into account the last value if it is configured and if it existed, substracting it. This will come in ha dy for the lightning counter and the rain-gauge as these counters always increase.
The reason I went with that, is that a mysql-request costs way more in terms of resources than a simple file-grep. And because my processing server is not on the Weatherstation itself (exported).
The way it works: SkyWeather.py stores the data into a remote MySQL DB (which is on my server). I have a daemon script running on the server waiting for the semaphore status to change from "processed" to "transferred" which means new data came in.
We can then issue a:
root@stargate:/srv/mrtg/scripts# ./weather.sh tempoutside 16 0 format suitable to feed MRTG straight.
I know - a little bit overkill, but the fact that the weather-PI may not always be reachable and that the MRTG and Graphing syubsystem already existed, a good compromise.
|
|