djjudas21 / ecowitt-exporter

EcoWitt exporter for Prometheus
4 stars 3 forks source link

Add data from external lightning sensor WH57 #9

Closed pdostal closed 1 year ago

pdostal commented 1 year ago

Good evening,

thank you for your great software, I use Ecowitt just few hours but Prometheus integration would be showstopper for me. Besides WS69 outdoor unit and WN1980_C console I bought also WH57 lightning sensor. You can find the PDF manual here.

There is last lightning timestamp which I decided to ignore, numbers of lightnings per day and last lightning distance which in my case is in kilometers.

Please let me know if something is not up to your expectations and I will be happy to further tweak this pull request.

Once again thank you very much

Pavel

djjudas21 commented 1 year ago

Hey :slightly_smiling_face: This is excellent, thanks. Just a small tweak - please could you document DISTANCE_UNIT in README.md and include sample output of the new Prometheus metrics, and then I will be happy to accept the PR. I'll roll a new release of the Docker image and update the Helm chart, too.

I'd be interested to hear how you get on with the WH57 lightning sensor - I was considering buying one myself :zap:

pdostal commented 1 year ago

Done.

I will let you know after we have some thunderstorm.

djjudas21 commented 1 year ago

Thanks for your contribution. I've merged it and tagged release v0.4.0, plus an updated Helm chart

pdostal commented 1 year ago

Hello Jonathan,

here is my report:

the following graph shows # HELP lightning_num Lightning daily count for the last 30 days and we had thunderstorm at night from Aug 16 to Aug 17 and quicker Aug 26 evening: image

See also more detailed graphs for each event where left one is # HELP lightning_km Lightning distance and right one # HELP lightning_num Lightning daily count: image image

Please note that the sensor is placed inside in our family house in the upper floor but not even close to the window.

So as amateur I'm happy with the result!

djjudas21 commented 1 year ago

Thanks for sharing :smile: It's cool how you can detect lightning >30km away. And I had no idea there would be so many strikes in one storm. Do you know why the the distance seems to default to 20km when there is no activity?

pdostal commented 1 year ago

I don't. It can be of course workarounded in Grafana. I will try to experiment with it and report back if I have proper solution.