>From what you provide the Ecowitt gateway driver is performing as expected 
and I don't believe lightning_strike_count being None has anything to do 
with your Belchertown problem.

The Ecowitt gateway API provides lightning count as a cumulative value (and 
since WeeWX requires a per-period value), the driver calculates WeeWX field 
lightning_strike_count by taking the difference between successive 
cumulative lightning count values. When the driver is first started there 
is no previous value, and consequently the driver cannot calculate 
lightning_strike_count, so it returns the value None and that is what 
appears in the first loop packet (remember None means a sensor exists but 
WeeWX could not get valid data). This behaviour is identical to that for 
WeeWX field rain in almost all drivers. Subsequent loop packets include a 
numeric value, in your case 0, when the driver is run directly and again 
when WeeWX is run directly. In the archive records generated by WeeWX the 
initial loop packet None value has no effect and the archive record 
lightning_strike_count value is calculated (by WeeWX) as the sum of the 
loop packet values seen during the archive period (None values are 
effectively ignored). 

Whilst I don't use the Belchertown skin, as far as I can tell the 
Belchertown skin does not update plots with loop packet data, rather it 
updates plots with archive record data. Also, if you look at the error 
message in your first post, the error is generated when the Belchertown 
skin is obtaining archive record data; nothing to do (directly) with loop 
packet data. Both of these point to the issue being a mis-configuration in 
the Belchertown skin config file or the [StdReport] [[Belchertown]] stanza 
in weewx.conf. 

Gary
On Saturday, 20 May 2023 at 17:18:46 UTC+10 [email protected] wrote:

> Hi Gary,
>
> Thanks for your assistance, see comments below...
> On 20/5/23 07:42, gjr80 wrote:
>
> [snip]
>
>
> So, troubleshooting. The fact you are plotting lightning data leads me to 
> assume you do indeed have a WH57 lightning sensor linked to your Ecowitt 
> gateway device?
>
> Yes
>
> Do you see lightning data in the Ecowitt WSView Plus or WS View apps? 
>
> Yes
>
> Stop then restart WeeWX, let WeeWX run for at least two full archive 
> periods and then post a log extract showing the full WeeWX startup and the 
> reporting cycle for each archive period. Run WeeWX directly 
> <http://weewx.com/docs/usersguide.htm#Running_directly>, this will show 
> loop packet (LOOP:) and archive record (REC:) data on the console. Does 
> lightning_strike_count appear in the loop packets and archive records, 
> and what value do they show?
>
> weewx log output attached and in there I see 'lightning_strike_count': 
> '0', in LOOP and 'lightning_strike_count': '0.0', in REC
>
> But running the gw1000 driver via PYTHONPATH=/usr/share/weewx/ python3 -m 
> user.gw1000 --test-driver shows...
>
>  'lightning_strike_count': 'None'
>
> See logs attached for both.
>
> thanks
>
> Tim
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ffcc4813-cf07-401c-8470-594ea564231cn%40googlegroups.com.

Reply via email to