Page 1 of 4

WH57 / WH31L discussion

Posted: Wed 20 Jul 2022 8:35 am
by watsonm
With apologies to the design engineers, I appreciate that for "less than 50 bucks" the WH57/31 lightning detectors are not that sophisticated compared to say the blitzortung.org kit. However I am trying to understand a little more about what they are doing. I acquired mine last week and installed it in the top of my garage away from as many electrical gadgets as possible.

My weather station setup is now built around a raspberry Pi 4 that receives the 433Mhz signals using a globally available app call RTL_433 which decodes the radio signals to readable messages. I have written python code to work on these messages and send them on to CMX using the Ecowitt protocol. For the lightning detector I also save the data in a separate SQL database.

I understood the WH57 sends out status messages every 79 seconds and I thought that the lightning_num or strike_count would increment to indicate the number of strikes within that 79 seconds. However when yesterdays lightning storm went through I realized it actually transmits when it receives a strike since I noticed the count increments by 1 every time and also the time stamp I have shows variable intervals between each count increment. This is not an issue for my software but I was wondering if any other folk noticed this or can help with understanding the meaning of the top bits of the flags. I believe the bottom bits relate to battery voltage/status.

I also note on this short sample of hits that the distance is (not surprisingly) fairly useless when compared to watching the strikes on blitzortung.org . Had a few strikes showing as 1km when nothing happened overhead but this could be due to my settings. These are now set to the default having been up and down the ladder during the storm several time to try indoors and high sensitivity . I also have the negative terminal of the battery connected to the garage earth line as recommended by a radio Ham guy on another forum.

Re: WH57 / WH31L discussion

Posted: Wed 20 Jul 2022 9:28 am
by davepaterson
I have ordered the WH57. I know that any strikes are added to the today.ini but is there any other data entries that can be read without sql,json etc as I am stuck in yesteryear tech.? The old Basic I use was even before Visual (Atari pre 95). I don't have a web site so need data that can be opened, read and closed before the next update like the standard log file and today.ini

Re: WH57 / WH31L discussion

Posted: Wed 20 Jul 2022 2:29 pm
by mcrossley
I have ordered the WH57. I know that any strikes are added to the today.ini but is there any other data entries that can be read without sql,json etc as I am stuck in yesteryear tech.? The old Basic I use was even before Visual (Atari pre 95). I don't have a web site so need data that can be opened, read and closed before the next update like the standard log file and today.ini
You could read the values periodically from the local API as JSON..

Code: Select all

http://localhost:8998/api/tags/process.json?LightningDistance&LightningTime&LightningStrikesToday
or, you could use the custom format local API, that requires a HTTP POST rather than a simple GET though, but allows you to define the output as anything you want, not just JSON.

or, if you want to read from an intermediate file, you could create a simple text file with the web tags in it and get that processed as an Extra File by CMX.
eg.
Time=<#LightningTime>
Dist=<#LightningDistance>
Strikes=<#LightningStrikesToday>

Re: WH57 / WH31L discussion

Posted: Wed 20 Jul 2022 2:39 pm
by watsonm
Dave,
I presume you will be connecting your WH57 using one of the recognised gateways (HW1000 or GW1100) or possibly a weather station console. I have none of these so cannot say what is available or accesssable directly .
The items tranmitted out of the WH57 are :
  • battery_ok : status
  • state : reset, noise, interference, strike
  • flags :
  • strike_count : this increments up to 255 before rolling over
  • storm_dist_km : distance to front of lightning storm

(edit) Or do what Mark suggested !! :P

Re: WH57 / WH31L discussion

Posted: Wed 20 Jul 2022 6:51 pm
by davepaterson
Thanks for the info and yes I have a GW1100C with MX using the data. I think I am getting technically bewildered as what Mark has put down went straight over the hairy bit, so will just stick to reading the today.ini file. I have MX running 24/7 so an extra bit of (basic) programming should pick up any strikes if the LastStrike stamp has changed although will not count more than 1 in any minute.

Re: WH57 / WH31L discussion

Posted: Wed 20 Jul 2022 8:59 pm
by Mapantz
davepaterson wrote: Wed 20 Jul 2022 6:51 pm although will not count more than 1 in any minute.
If I am understanding what you meant, I'm pretty sure it does..

I have my lightning data update at the same speed as my realtime.txt - 5 seconds.

During my last big lightning event <#LightningStrikesToday> was updating many many times in 1 minute.

The 3 webtags Mark showed are being processed to an XML file, which uploads every 5 seconds.

The net result:
Screenshot 2022-07-20 215550.png
The card with "45 days ago" will show "10 seconds ago" and increase at increments of 5 seconds until the next strike registers. I've also made it so that the lightning icon flashes orange when a strike is detected, and like the Ecowitt console, it will continue to flash for 30 minutes after the last strike.

Re: WH57 / WH31L discussion

Posted: Wed 20 Jul 2022 9:37 pm
by davepaterson
Thanks again, will check :groan: out the web tags as Mark said and see what I can get. Old age comes with a lot of drawbacks :groan:

Re: WH57 / WH31L discussion

Posted: Thu 21 Jul 2022 9:11 pm
by davepaterson
Mark wrote 'if you want to read from an intermediate file, you could create a simple text file with the web tags in it and get that processed as an Extra File by CMX.' Think I am a stage below SIMPLE. Simple is only that if you know it. I have clicked list web tags in prog/general settings with the hope of something changing or an error message, but got nothing. A pointer to a post which gives how to setup the txt file is required.

Re: WH57 / WH31L discussion

Posted: Thu 21 Jul 2022 9:38 pm
by davepaterson
After posting I checked active and found a post for realtime.txt which pointed me in the right direction. Now got realtime.txt and also gauges updating

Re: WH57 / WH31L discussion

Posted: Tue 02 Aug 2022 9:10 am
by davepaterson
Still waiting for the WH57 (should be shortly).
Is there a header file for the realtime.txt so that I know what is recorded in the text file?

Re: WH57 / WH31L discussion

Posted: Tue 02 Aug 2022 9:15 am
by mcrossley
davepaterson wrote: Tue 02 Aug 2022 9:10 am Still waiting for the WH57 (should be shortly).
Is there a header file for the realtime.txt so that I know what is recorded in the text file?
'tis in the wiki: https://cumuluswiki.org/a/Realtime.txt

Re: WH57 / WH31L discussion

Posted: Tue 02 Aug 2022 7:20 pm
by davepaterson
Great, thanks Mark

Re: WH57 / WH31L discussion

Posted: Mon 15 Aug 2022 9:50 am
by davepaterson
My WH57 is here and last night so did the lightning (loud poss 6 miles away) but nothing registered on WsView or ecowitt
I suspected is was my location. Setting the sensor to high was my first step as I had left the switches at default setting. However if the view given on the back of the sensor and manual then all switches were in the up position. Can someone verify that the default switch position is down towards the batteries?

Re: WH57 / WH31L discussion

Posted: Mon 15 Aug 2022 10:27 am
by watsonm
Dave,
Can someone verify that the default switch position is down towards the batteries?
Yes it is.

Re: WH57 / WH31L discussion

Posted: Mon 15 Aug 2022 11:00 am
by davepaterson
Thanks Mike
Have set the WH57 to high and as the lightning has gone away I hope of at least a false reading so I know everything is OK