[weewx-user] Re: Lightning Data Stored in weewx.sdb

2023-06-11 Thread Eric K
Hi Kevin,

In the graphs.conf file (Belchertown skin) I have this:

[[chart6]]
title = Lightning
[[[lightning_strike_count]]]
yAxis = 0
yAxis_min = 0
yAxis_tickInterval = 1
yAxis_label = "Number of Strikes"
stacking = normal
color = "orange"
lineWidth = 0
marker
enabled = true
radius = 4
states
[hover]
lineWidthPlus = 0
[[[lightning_distance]]]
yAxis = 1
yAxis_min = 0
yAxis_label = "Distance (miles)"
stacking = normal
color = "blue"
lineWidth = 0
marker
enabled = true
radius = 3
states
[hover]
lineWidthPlus = 0 


For the distance correction (conversion to miles) I have an entry in the 
StdCalibrate section of weewx.conf:
##

#   This section can adjust data using calibration expressions.

[StdCalibrate]

[[Corrections]]
# For each type, an arbitrary calibration expression can be given.
# It should be in the units defined in the StdConvert section.
# Example:  foo = foo + 0.2
outTemp = outTemp + 0.0
barometer = barometer + 1.025
radiation = luminosity * 0.00789 if luminosity > 0 else None
lightning_distance = lightning_distance / 1.609 if 
lightning_strike_count > 0 else None#convert distance to miles

##


On Sunday, June 11, 2023 at 3:36:30 PM UTC-5 Kevin Crivelli wrote:

Eric K, could you provide the chart.conf configuration for that chart and 
also what ended up being the correct way to add the correction in 
weewx.conf? Your chart is essentially what I am trying to accomplish

On Tuesday, May 25, 2021 at 12:36:09 PM UTC-4 Eric K wrote:

It's working as desired now!
Thanks for noticing the incorrect location of the [[Corrections]]

[image: lightning_distance working.JPG]

On Monday, May 24, 2021 at 7:39:25 AM UTC-5 gjr80 wrote:

I can't explain it, it would require some detailed knowledge of how the 
Acurite lightning sensor behaves. For example, the Ecowitt lightning sensor 
reports distance when strikes are detected and that distance value persists 
for some time before eventually reporting 0. If you had debug logging of 
the SDR output (as you have in the log extract above) going on for some 
time previous you could probably work through the log looking at the 
distance value being obtained by the SDR driver from the Acurite. One thing 
is certain though, the SDR driver was not applying the correction as the 
SDR driver contains no code to read those config settings. And if the 
correction was not under [StdCalibrate] [[Corrections]] then WeeWX wasn't 
applying the correction either.

Might just have to remain a mystery.

Gary

On Monday, 24 May 2021 at 07:33:56 UTC+10 Eric K wrote:

Thanks for the pointer.  
I also had a [[Corrections]] sections under [StdCalibrate].

I just moved the lightning_distance correction to the [StdCalibrate] 
section.
We'll see if that helps.

Isn't it odd that it worked, when the lightning_distance was something 
other than 10?


On Sunday, May 23, 2021 at 3:10:54 PM UTC-5 gjr80 wrote:

I think you might find the [[Corrections]] stanza belongs under 
[StdCalibrate]  rather 
than the SDR driver.

Gary
On Monday, 24 May 2021 at 02:32:14 UTC+10 Eric K wrote:

Here's a relevant section of the log which shows the Acurite Atlas 
lightning sensor sending the last distance (10) reading over and over.  
This is expected Acurite Atlas behavior, and the reason we have to put the 
"if > 0 else None" statement in our [[Corrections]] section.

Referring back to the 5.64705882352941 value seen in my database:
I wonder if weewx isn't expecting a decimal reading to be in 
lightning_distance?
And that sends it into confusion?

May 23 10:56:24 Ubuntu20-WEEWX weewx[14069] DEBUG user.sdr: lines=['{"time" 
: "2021-05-23 15:56:20", "model" : "Acurite-Atlas", "id" : 17, "channel" : 
"A", "sequence_num" : 0, "battery_ok" : 1, "message_type" : 38, 
"wind_avg_mi_h" : 4.000, "wind_dir_deg" : 190.000, "rain_in" : 2.040, 
"strike_count" : 45, "strike_distance" : 10, "exception" : 0, "raw_msg" : 
"c011668205f9cc8baab8"}\n', '{"time" : "2021-05-23 15:56:20", "model" : 
"Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 1, 
"battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 4.000, 
"wind_dir_deg" : 190.000, "rain_in" : 2.040, "strike_count" : 45, 
"strike_distance" : 10, "exception" : 0, "raw_msg" : 
"c411668205f9cc8baabc"}\n', '{"time" : "2021-05-23 15:56:20", "model" : 

[weewx-user] Re: Lightning Data Stored in weewx.sdb

2023-06-11 Thread Kevin Crivelli
Eric K, could you provide the chart.conf configuration for that chart and 
also what ended up being the correct way to add the correction in 
weewx.conf? Your chart is essentially what I am trying to accomplish

On Tuesday, May 25, 2021 at 12:36:09 PM UTC-4 Eric K wrote:

> It's working as desired now!
> Thanks for noticing the incorrect location of the [[Corrections]]
>
> [image: lightning_distance working.JPG]
>
> On Monday, May 24, 2021 at 7:39:25 AM UTC-5 gjr80 wrote:
>
>> I can't explain it, it would require some detailed knowledge of how the 
>> Acurite lightning sensor behaves. For example, the Ecowitt lightning sensor 
>> reports distance when strikes are detected and that distance value persists 
>> for some time before eventually reporting 0. If you had debug logging of 
>> the SDR output (as you have in the log extract above) going on for some 
>> time previous you could probably work through the log looking at the 
>> distance value being obtained by the SDR driver from the Acurite. One thing 
>> is certain though, the SDR driver was not applying the correction as the 
>> SDR driver contains no code to read those config settings. And if the 
>> correction was not under [StdCalibrate] [[Corrections]] then WeeWX wasn't 
>> applying the correction either.
>>
>> Might just have to remain a mystery.
>>
>> Gary
>>
>> On Monday, 24 May 2021 at 07:33:56 UTC+10 Eric K wrote:
>>
>>> Thanks for the pointer.  
>>> I also had a [[Corrections]] sections under [StdCalibrate].
>>>
>>> I just moved the lightning_distance correction to the [StdCalibrate] 
>>> section.
>>> We'll see if that helps.
>>>
>>> Isn't it odd that it worked, when the lightning_distance was something 
>>> other than 10?
>>>
>>>
>>> On Sunday, May 23, 2021 at 3:10:54 PM UTC-5 gjr80 wrote:
>>>
 I think you might find the [[Corrections]] stanza belongs under 
 [StdCalibrate]  
 rather than the SDR driver.

 Gary
 On Monday, 24 May 2021 at 02:32:14 UTC+10 Eric K wrote:

> Here's a relevant section of the log which shows the Acurite Atlas 
> lightning sensor sending the last distance (10) reading over and over.  
> This is expected Acurite Atlas behavior, and the reason we have to put 
> the "if > 0 else None" statement in our [[Corrections]] section.
>
> Referring back to the 5.64705882352941 value seen in my database:
> I wonder if weewx isn't expecting a decimal reading to be in 
> lightning_distance?
> And that sends it into confusion?
>
> May 23 10:56:24 Ubuntu20-WEEWX weewx[14069] DEBUG user.sdr: 
> lines=['{"time" : "2021-05-23 15:56:20", "model" : "Acurite-Atlas", "id" 
> : 
> 17, "channel" : "A", "sequence_num" : 0, "battery_ok" : 1, "message_type" 
> : 
> 38, "wind_avg_mi_h" : 4.000, "wind_dir_deg" : 190.000, "rain_in" : 2.040, 
> "strike_count" : 45, "strike_distance" : 10, "exception" : 0, "raw_msg" : 
> "c011668205f9cc8baab8"}\n', '{"time" : "2021-05-23 15:56:20", "model" : 
> "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 1, 
> "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 4.000, 
> "wind_dir_deg" : 190.000, "rain_in" : 2.040, "strike_count" : 45, 
> "strike_distance" : 10, "exception" : 0, "raw_msg" : 
> "c411668205f9cc8baabc"}\n', '{"time" : "2021-05-23 15:56:20", "model" : 
> "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 2, 
> "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 4.000, 
> "wind_dir_deg" : 190.000, "rain_in" : 2.040, "strike_count" : 45, 
> "strike_distance" : 10, "exception" : 0, "raw_msg" : 
> "c811668205f9cc8baac0"}\n']
> May 23 10:56:24 Ubuntu20-WEEWX weewx[14069] DEBUG user.sdr: 
> packet={'windSpeed': 4.0, 'windDir': 190.0, 'Atlas_rain_total': 2.04, 
> 'Atlas_strike_count': 45, 'lightning_distance': 10, 'windBatteryStatus': 
> 0, 
> 'dateTime': 1621785380, 'usUnits': 1}
> May 23 10:56:24 Ubuntu20-WEEWX weewx[14069] DEBUG user.MQTTSubscribe: 
> (Service) data-> final packet is 2021-05-23 10:56:20 CDT (1621785380): 
> Atlas_rain_total: 2.04, Atlas_strike_count: 45, dateTime: 1621785380, 
> lightning_distance: 10, lightning_strike_count: 0, rain: 0.0, usUnits: 1, 
> windBatteryStatus: 0, windDir: 190.0, windSpeed: 4.0
> May 23 10:56:24 Ubuntu20-WEEWX weewx[14069] DEBUG user.sdr: 
> packet={'windSpeed': 4.0, 'windDir': 190.0, 'Atlas_rain_total': 2.04, 
> 'Atlas_strike_count': 45, 'lightning_distance': 10, 'windBatteryStatus': 
> 0, 
> 'dateTime': 1621785380, 'usUnits': 1}
> May 23 10:56:24 Ubuntu20-WEEWX weewx[14069] DEBUG user.MQTTSubscribe: 
> (Service) data-> final packet is 2021-05-23 10:56:20 CDT (1621785380): 
> Atlas_rain_total: 2.04, Atlas_strike_count: 45, dateTime: 1621785380, 
> lightning_distance: 10, lightning_strike_count: 0, rain: 0.0, usUnits: 1, 
> windBatteryStatus: 0, 

Re: [weewx-user] Weewx keeps restarting

2023-06-11 Thread Graham Eddy
disable everythng back to bare bones, then add them back again one at a time
⊣GE⊢

> On 12 Jun 2023, at 12:22 am, Mark Fraser  wrote:
> 
> Any ideas how to debug this?

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/B500FCF8-B986-423B-AB19-44B5DFF11BD7%40geddy.au.


[weewx-user] Weewx keeps restarting

2023-06-11 Thread Mark Fraser
Since this afternoon when weewx generates the charts every 5 minutes, it 
crashes.


Jun 11 12:00:26 weather-new weewx[14402] DEBUG user.forecast: 
MainThread: WU: not yet time to do the forecast
Jun 11 12:00:26 weather-new weewx[14402] DEBUG user.forecast: 
ZambrettiThread: Zambretti: terminating thread
Jun 11 12:00:26 weather-new weewx[14402] DEBUG weewx.restx: 
WeatherCloud: wait interval (300 < 600) has not passed for record 
2023-06-11 $
Jun 11 12:00:26 weather-new weewx[14402] DEBUG weewx.reportengine: 
Running reports for latest time in the database.
Jun 11 12:00:26 weather-new weewx[14402] DEBUG weewx.reportengine: 
Running report 'SeasonsReport'
Jun 11 12:00:26 weather-new weewx[14402] INFO weewx.restx: MQTT: 
Published record 2023-06-11 12:00:00 BST (1686481200)
Jun 11 12:00:26 weather-new weewx[14402] DEBUG weewx.reportengine: Found 
configuration file /etc/weewx/skins/Seasons/skin.conf for report$
Jun 11 12:00:26 weather-new weewx[14402] INFO weewx.restx: OWM: 
Published record 2023-06-11 12:00:00 BST (1686481200)
Jun 11 12:00:26 weather-new weewx[14402] DEBUG weewx.cheetahgenerator: 
Using search list ['user.forecast.ForecastVariables', 'weewx.cheet$
Jun 11 12:00:26 weather-new weewx[14402] INFO weewx.restx: Windy: 
Published record 2023-06-11 12:00:00 BST (1686481200)
Jun 11 12:00:26 weather-new weewx[14402] DEBUG weewx.manager: Daily 
summary version is 4.0
Jun 11 12:00:26 weather-new weewx[14402] INFO weewx.restx: PWSWeather: 
Published record 2023-06-11 12:00:00 BST (1686481200)
Jun 11 12:00:26 weather-new weewx[14402] INFO weewx.restx: 
Wunderground-PWS: Published record 2023-06-11 12:00:00 BST (1686481200)
Jun 11 12:00:26 weather-new weewx[14402] INFO weewx.restx: WOW: 
Published record 2023-06-11 12:00:00 BST (1686481200)
Jun 11 12:00:31 weather-new weewx[14402] DEBUG weewx.cheetahgenerator: 
Skip 'celestial.html': last_mod=1686479142.7327938 age=2089.208773$
Jun 11 12:00:32 weather-new weewx[14402] INFO weewx.cheetahgenerator: 
Generated 10 files for report SeasonsReport in 5.71 seconds
Jun 11 12:00:32 weather-new weewx[14402] DEBUG weewx.manager: Daily 
summary version is 4.0
Jun 11 12:00:32 weather-new systemd[1]: weewx.service: Main process 
exited, code=killed, status=11/SEGV
Jun 11 12:00:32 weather-new systemd[1]: weewx.service: Failed with 
result 'signal'.
Jun 11 12:00:52 weather-new systemd[1]: weewx.service: Service 
RestartSec=20s expired, scheduling restart.
Jun 11 12:00:52 weather-new systemd[1]: weewx.service: Scheduled restart 
job, restart counter is at 1.


Any ideas how to debug this?

--
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/3f535cbe-7652-483a-c93b-279540e98bf0%40gmail.com.