Re: [weewx-user] How to get the daily rain sum

2023-08-28 Thread Greg from Oz
I used since.py and time_since.py
Check my page:
https://weather.ubeaut.work/
If you check the week month year for the cumulative rain is that what you 
are looking for?


Today's Rain since 12am
$day.rain.sum
  
  
Today's Rain since 9am
$since($hour=9).rain.sum
  
  
  Last rain was:

$time_at('rain>0')$time_since('rain>0').long_form ago
  

search_list_extensions = 
user.aussearch.ausutils,user.historygenerator.MyXSearch,user.xstats.ExtendedStatistics,
*user.time_since.TimeSince,user.since.Since*

Here are the files for python3


On Tuesday, 29 August 2023 at 12:35:22 UTC+10 Glenn McKechnie wrote:

> Short answer, when using the inbuilt FORMAT strings - no.
> Long answer - see the templates - which are lacking instruction but
> follow standard weewx methods - I believe.
>
> Despite being the author / maintainer of weewx-mastodon I had to go
> back and check on the code.
>
> It gets its units directly from the raw data, the archive values.
>
> day.rain.sum is generated at a later stage of the weewx cycle by the
> StdReport engine.
>
> If however you use the template method, whereby you generate a
> StdReport in your skins DATA directory - eg:-
> skins/Seasons/DATA/mastodon.txt.tmpl then you should be able to do
> what you are asking.
>
> It's been a long while since I've looked at it, but I believe that will do 
> it .
> The README notes for 24th Jan 2023 v0.04 outline one hiccup when
> testing the templates but it should be straight forward.
> Use the default as is then start tweaking it.
>
>
> On 29/08/2023, Invisible Man  wrote:
> > I am using the Mastodon extension for
> > Weewx. https://github.com/glennmckechnie/weewx-mastodon.
> > I believe my question is however not strictly related to this extension,
> > see below.
> >
> > It is possible to format the message which is tooted regularly and 
> supply a
> >
> > specific format.
> > One of the default formats is:
> >
> > ```
> > format = '{station:%s} ' \
> > '\n Windspeed: {windSpeed:%.1f} ' \
> > '\n Winddir: {windDir:%03.0f} ' \
> > '\n Windgust: {windGust:%.1f} ' \
> > '\n outTemp: {outTemp:%.1f} ' \
> > '\n outHumidity: {outHumidity:%.2f} ' \
> > '\n Pressure: {barometer:%.3f} ' \
> > '\n Rain: {rain:%.3f} ' \
> > '\n Date Time: {dateTime:%d %b %Y %H:%M}'
> > ```
> >
> > The value of the rain does not work well for me, because, to my
> > understanding, it's the current rain, and I seldom have rain, so I rather
> > want to have at least the daily sum of rain. I thought I could perhaps
> > change the format to {day.rain.sum:%.3f}, but it is not understood...
> >
> > So, how can I get this daily sum?
> >
> > The code imports the following modules.
> >
> > ```python
> > import weewx
> > import weewx.restx
> > import weewx.units
> > from weeutil.weeutil import to_bool
> > ```
> >
> > -- Axelle.
> >
> > --
> > 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+...@googlegroups.com.
> > To view this discussion on the web visit
> > 
> https://groups.google.com/d/msgid/weewx-user/6d7873c7-f325-414a-9471-d9387b469802n%40googlegroups.com
> .
> >
>
>
> -- 
>
>
> Cheers
> Glenn
>
> rorpi - read only raspberry pi & various weewx addons
> https://github.com/glennmckechnie
>

-- 
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/a39212aa-8a49-4980-8e91-b4b3cf85125bn%40googlegroups.com.
<>


Re: [weewx-user] How to get the daily rain sum

2023-08-28 Thread Glenn McKechnie
Short answer, when using the inbuilt FORMAT strings - no.
Long answer - see the templates - which are lacking instruction but
follow standard weewx methods - I believe.

Despite being the author / maintainer of weewx-mastodon I had to go
back and check on the code.

It gets its units directly from the raw data, the archive values.

day.rain.sum is generated at a later stage of the weewx cycle by the
StdReport engine.

If however you use the template method, whereby you generate a
StdReport in your skins DATA directory - eg:-
skins/Seasons/DATA/mastodon.txt.tmpl then you should be able to do
what you are asking.

It's been a long while since I've looked at it, but I believe that will do it .
The README notes for 24th Jan 2023 v0.04 outline one hiccup when
testing the templates but it should be straight forward.
Use the default as is then start tweaking it.


On 29/08/2023, Invisible Man  wrote:
> I am using the Mastodon extension for
> Weewx. https://github.com/glennmckechnie/weewx-mastodon.
> I believe my question is however not strictly related to this extension,
> see below.
>
> It is possible to format the message which is tooted regularly and supply a
>
> specific format.
> One of the default formats is:
>
> ```
> format = '{station:%s} ' \
>  '\n Windspeed: {windSpeed:%.1f} ' \
>  '\n Winddir: {windDir:%03.0f} ' \
>  '\n Windgust: {windGust:%.1f} ' \
>  '\n outTemp: {outTemp:%.1f} ' \
>  '\n outHumidity: {outHumidity:%.2f} ' \
>  '\n Pressure: {barometer:%.3f} ' \
>  '\n Rain: {rain:%.3f} ' \
>  '\n Date Time: {dateTime:%d %b %Y %H:%M}'
> ```
>
> The value of the rain does not work well for me, because, to my
> understanding, it's the current rain, and I seldom have rain, so I rather
> want to have at least the daily sum of rain. I thought I could perhaps
> change the format to {day.rain.sum:%.3f}, but it is not understood...
>
> So, how can I get this daily sum?
>
> The code imports the following modules.
>
> ```python
> import weewx
> import weewx.restx
> import weewx.units
> from weeutil.weeutil import to_bool
> ```
>
> -- Axelle.
>
> --
> 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/6d7873c7-f325-414a-9471-d9387b469802n%40googlegroups.com.
>


-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAzicMF23ZNYq1cQrhBDaAZBwJtiBExKqszTp9n6N9gXHfA%40mail.gmail.com.


Re: [weewx-user] WeeWX in an RV?

2023-08-28 Thread vince
(sorry - ignore the earlier truncated post)

I cooked up a bash script that subscribes, calls a python script to 
reformat, then publishes.   The bash script sleeps a second between loops 
to not eat up your cpu.   You 'should' be able to change the variables in 
the bash script to match your configuration pretty easily...

This subscribes to ORIGINAL_TOPIC and publishes to FINAL_TOPIC in the bash 
script.
To test:

   - open a bash window and subscribe to the FINAL_TOPIC
   - open a second window and run the bash script which will 
   listen/reformat/publish
   - if you're not querying your gps currently, open a third window and 
   publish to the ORIGINAL_TOPIC ala

mosquitto_pub -h 192.168.1.171 -t RV/original -m 
'[{"dateTime":"1693128700.0","gpsLat":"52.152435"},{"dateTime":"1693128700.0","gpsLong":"9.929356"}]'

What you should see in window1 that is subscribing is output ala:
{"dateTime": "1693128700.0", "gpsLat": "52.152435", "gpsLong": "9.929356"}

That kind of data should be ok to subscribe to in weewx for your lat/lon 
data

# reformat_mqtt.bash 

#!/bin/bash
#
# ip address of MQTT broker
BROKER="192.168.1.171"

ORIGINAL_TOPIC="RV/original"
FINAL_TOPIC="RV/final"

while true; do

  # subscribe to a topic
  # run the python script to reformat to stdout
  # publish to a final topic

  mosquitto_sub -C 1 -h ${BROKER} -t ${ORIGINAL_TOPIC} \
| python3 reformat_mqtt.py \
| mosquitto_pub --stdin-line -h ${BROKER} -t ${FINAL_TOPIC}

  # sleep a bit to not eat up your cpu
  sleep 1

done


# reformat_mqtt.py -
#
# this reformats the GPS information
# to a more normal looking output
#

# it assumes your input data is always in the same order and always complete
# ala: 
[{"dateTime":"1693128700.0","gpsLat":"52.152435"},{"dateTime":"1693128700.0","gpsLong":"9.929356"}]

import json
import sys
for line in sys.stdin:
jsondata = json.loads(line)
reorganized_data = {}
reorganized_data['dateTime'] = jsondata[0]['dateTime']
reorganized_data['gpsLat']   = jsondata[0]['gpsLat']
reorganized_data['gpsLong']  = jsondata[1]['gpsLong']
print(json.dumps(reorganized_data))


On Monday, August 28, 2023 at 5:19:15 AM UTC-7 Stefan Gliessmann wrote:

> I asked in the community forum for my router and I was told that this is 
> the only way they can currently forward data via MQTT.
> A future firmware release shall allow more formatting.
>
> I might now play around with this 
> https://github.com/mrtncls/mqtt-translator to get the MQTT payload from 
> an array in one single statement ...
> Anybody used the MQTT Translator for this purpose?
>
> On Monday, August 28, 2023 at 11:01:41 AM UTC+2 Stefan Gliessmann wrote:
>
>> Which code do you refer to?
>> [image: Screenshot 2023-08-28 at 11.00.03.png]
>> This is what I specified in the GPS/Router to push via MQTT to my broker 
>> ...
>> On Sunday, August 27, 2023 at 8:39:40 PM UTC+2 vince wrote:
>>
>>> We'd have to see your code to see what you are publishing.
>>>
>>> Your MQTT log looks very odd and likely needs some tweaking
>>>
>>> MQTT: 
>>> [{"dateTime":"1693128700.0","gpsLat":"52.152435"},{"dateTime":"1693128700.0","gpsLong":"9.929356"}]
>>>  
>>>  
>>>
>>> I'd expect something like {"dateTime":"1233456", "gpsLat":"52.1234", 
>>> "gpsLong": "9.987"} for a more typical set of JSON to publish.   You want 
>>> one element (not in an array) with three items therein - dateTime/lat/lon.
>>>
>>>

-- 
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/85f68c80-1ef6-40f8-a95b-da98642ecca5n%40googlegroups.com.


Re: [weewx-user] WeeWX in an RV?

2023-08-28 Thread vince
I'm sure there's a pure python variant but I tend to go low-tech bash 
whenever possible.

The bash script - I called mine "reformat_mqtt.bash"

#!/bin/bash
#
# ip address of MQTT broker
BROKER="192.168.1.171"
ORIGINAL_TOPIC="RV/original"
FINAL_TOPIC="RV/final"

while true; do

  # subscribe to a topic
  # run the python script to reformat to stdout
  # publish to a final topic

  mosquitto_sub -C 1 -h ${BROKER} -t ${ORIGINAL_TOPIC} \
| python3 reformat_mqtt.py \
| mosquitto_pub --stdin-line -h ${BROKER} -t ${FINAL_TOPIC}

  # sleep a bit to not eat up your cpu
  sleep 1

done


And the 'reformat_mqtt.py' python script

#
# this reformats the GPS information
# to a more normal looking output
#

# it assumes your input data is always in the same order and always complete
# ala: 
[{"dateTime":"1693128700.0","gpsLat":"52.152435"},{"dateTime":"1693128700.0","gpsLong":"9.929356"}]

import json
import sys
for line in sys.stdin:
jsondata = json.loads(line)
reorganized_data = {}
reorganized_data['dateTime'] = jsondata[0]['dateTime']
reorganized_data['gpsLat']   = jsondata[0]['gpsLat']
reorganized_data['gpsLong']  = jsondata[1]['gpsLong']
print(json.dumps(reorganized_data))


Quick test.


   - in one bash window run 


   - * in a second bash window run 'mosquitto_pub -h 192.168.1.171 -t 
   RV/original -m 
   
'[{"dateTime":"1693128700.0","gpsLat":"52.152435"},{"dateTime":"1693128700.0","gpsLong":"9.929356"}]'
   


On Monday, August 28, 2023 at 5:19:15 AM UTC-7 Stefan Gliessmann wrote:

> I asked in the community forum for my router and I was told that this is 
> the only way they can currently forward data via MQTT.
> A future firmware release shall allow more formatting.
>
> I might now play around with this 
> https://github.com/mrtncls/mqtt-translator to get the MQTT payload from 
> an array in one single statement ...
> Anybody used the MQTT Translator for this purpose?
>
> On Monday, August 28, 2023 at 11:01:41 AM UTC+2 Stefan Gliessmann wrote:
>
>> Which code do you refer to?
>> [image: Screenshot 2023-08-28 at 11.00.03.png]
>> This is what I specified in the GPS/Router to push via MQTT to my broker 
>> ...
>> On Sunday, August 27, 2023 at 8:39:40 PM UTC+2 vince wrote:
>>
>>> We'd have to see your code to see what you are publishing.
>>>
>>> Your MQTT log looks very odd and likely needs some tweaking
>>>
>>> MQTT: 
>>> [{"dateTime":"1693128700.0","gpsLat":"52.152435"},{"dateTime":"1693128700.0","gpsLong":"9.929356"}]
>>>  
>>>  
>>>
>>> I'd expect something like {"dateTime":"1233456", "gpsLat":"52.1234", 
>>> "gpsLong": "9.987"} for a more typical set of JSON to publish.   You want 
>>> one element (not in an array) with three items therein - dateTime/lat/lon.
>>>
>>>

-- 
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/be2d0234-e45a-4ba4-b7a2-81713ff753fan%40googlegroups.com.


Re: [weewx-user] Specific Report Generation Periods

2023-08-28 Thread carter.hu...@gmail.com
Never mind I figured it out. Thanks for the help!

[CheetahGenerator]

# Add since.py module
search_list_extensions = user.since.Since 

On Monday, August 28, 2023 at 12:15:52 PM UTC-7 carter.hu...@gmail.com 
wrote:

> Thanks. How do I install the since.py module into weewx?
>
> On Sunday, August 27, 2023 at 3:25:20 AM UTC-7 John Smith wrote:
>
>> $since($hour=9,$today=False).rain.sum.formatted
>>
>> On Sun, 27 Aug 2023 at 03:45, carter.hu...@gmail.com <
>> carter.hu...@gmail.com> wrote:
>>
>>> Yup, that is what I'm looking for. Can $since($hour=7) be used since the 
>>> previous day though?
>>>
>>> On Friday, August 25, 2023 at 4:31:41 PM UTC-7 Tom Keffer wrote:
>>>
 Is this what you're thinking? https://github.com/weewx/weewx/issues/91

 On Fri, Aug 25, 2023 at 9:58 AM carter.hu...@gmail.com <
 carter.hu...@gmail.com> wrote:

> Hi,
>
> I'm wondering if there is a way to have a report have a specific end 
> time. For example, I'd like to create a 24 hour data summary ending at 7 
> am 
> LT each day, rather than each day from midnight to midnight.
>
> I figured using a span and setting a specific report generation time 
> would work, but that wouldn't back-fill any missing reports.
>
> Any ideas?
>
> -- 
> 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+...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/a5be1096-8846-46d5-8694-378c3f2dbd79n%40googlegroups.com
>  
> 
> .
>
 -- 
>>> 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+...@googlegroups.com.
>>>
>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/bd0d1761-8c7a-433d-b4cb-ab6f9a97bdb4n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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/b677691d-7d8b-416e-a97f-4a7b3189e0b6n%40googlegroups.com.


[weewx-user] How to get the daily rain sum

2023-08-28 Thread Invisible Man
I am using the Mastodon extension for 
Weewx. https://github.com/glennmckechnie/weewx-mastodon.
I believe my question is however not strictly related to this extension, 
see below.

It is possible to format the message which is tooted regularly and supply a 
specific format.
One of the default formats is:

```
format = '{station:%s} ' \
 '\n Windspeed: {windSpeed:%.1f} ' \
 '\n Winddir: {windDir:%03.0f} ' \
 '\n Windgust: {windGust:%.1f} ' \
 '\n outTemp: {outTemp:%.1f} ' \
 '\n outHumidity: {outHumidity:%.2f} ' \
 '\n Pressure: {barometer:%.3f} ' \
 '\n Rain: {rain:%.3f} ' \
 '\n Date Time: {dateTime:%d %b %Y %H:%M}'
```

The value of the rain does not work well for me, because, to my 
understanding, it's the current rain, and I seldom have rain, so I rather 
want to have at least the daily sum of rain. I thought I could perhaps 
change the format to {day.rain.sum:%.3f}, but it is not understood...

So, how can I get this daily sum?

The code imports the following modules.

```python
import weewx
import weewx.restx
import weewx.units
from weeutil.weeutil import to_bool
```

-- Axelle.

-- 
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/6d7873c7-f325-414a-9471-d9387b469802n%40googlegroups.com.


Re: [weewx-user] Specific Report Generation Periods

2023-08-28 Thread carter.hu...@gmail.com
Thanks. How do I install the since.py module into weewx?

On Sunday, August 27, 2023 at 3:25:20 AM UTC-7 John Smith wrote:

> $since($hour=9,$today=False).rain.sum.formatted
>
> On Sun, 27 Aug 2023 at 03:45, carter.hu...@gmail.com <
> carter.hu...@gmail.com> wrote:
>
>> Yup, that is what I'm looking for. Can $since($hour=7) be used since the 
>> previous day though?
>>
>> On Friday, August 25, 2023 at 4:31:41 PM UTC-7 Tom Keffer wrote:
>>
>>> Is this what you're thinking? https://github.com/weewx/weewx/issues/91
>>>
>>> On Fri, Aug 25, 2023 at 9:58 AM carter.hu...@gmail.com <
>>> carter.hu...@gmail.com> wrote:
>>>
 Hi,

 I'm wondering if there is a way to have a report have a specific end 
 time. For example, I'd like to create a 24 hour data summary ending at 7 
 am 
 LT each day, rather than each day from midnight to midnight.

 I figured using a span and setting a specific report generation time 
 would work, but that wouldn't back-fill any missing reports.

 Any ideas?

 -- 
 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+...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/weewx-user/a5be1096-8846-46d5-8694-378c3f2dbd79n%40googlegroups.com
  
 
 .

>>> -- 
>> 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+...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/bd0d1761-8c7a-433d-b4cb-ab6f9a97bdb4n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/22fbcfc8-fbd4-46c4-b880-afe0c72e3819n%40googlegroups.com.


Re: [weewx-user] Trying to configure the logging to be non-privileged

2023-08-28 Thread ba...@kdbarto.org
https://stackoverflow.com/questions/44649449/brew-installation-of-python-3-6-1-ssl-certificate-verify-failed-certificate/44649450#44649450

After installing the certificates as noted here, PWS is updating, WU 
forecasts are working, etc. etc.

This may be something to add to the documentation for Mac users when 
installing python.
Along with the logging changes from the 
wiki, 
https://github.com/weewx/weewx/wiki/WeeWX-v4-and-logging#logging-to-rotating-files
 
everything works as a non-privileged user.

My path to a new Mac (12.6.6) with a fully updated Weewx (4.10.2) and the 
forecast extension update is complete.

Thanks for all the assistance, and the work of those who make this the best 
weather system in the world.

David


On Monday, August 28, 2023 at 11:54:01 AM UTC-7 vince wrote:

> For (2) I'd open the URLs weewx uses in a browser and click the 'lock' 
> icon and see what a browser says.  Works in either Safari or Chrome.
>
> PWS uploads use https://www.pwsweather.com/pwsupdate/pwsupdate.php
> WU uses 
> https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php
> (look in restx.py for them)
>
> For forecast, you'd need to look in that extension's code to see what it's 
> using.
>
>

-- 
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/0d3f8c7e-c5bd-4935-a30b-31d274f5e81an%40googlegroups.com.


Re: [weewx-user] Trying to configure the logging to be non-privileged

2023-08-28 Thread vince
For (2) I'd open the URLs weewx uses in a browser and click the 'lock' icon 
and see what a browser says.  Works in either Safari or Chrome.

PWS uploads use https://www.pwsweather.com/pwsupdate/pwsupdate.php
WU 
uses 
https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php
(look in restx.py for them)

For forecast, you'd need to look in that extension's code to see what it's 
using.

-- 
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/7f5c4251-b1c7-43f1-ae01-63f73b1e9cd1n%40googlegroups.com.


Re: [weewx-user] Trying to configure the logging to be non-privileged

2023-08-28 Thread David Barto

> On Aug 27, 2023, at 3:51 PM, Tom Keffer  wrote:
> 
> Which version of WeeWX? It's possible your version of WeeWX does not have a 
> rotating logger defined for the Mac.
> 
> Try following the instructions in the wiki article Logging to rotating files 
> .
>  
> 
> 

Version 4.10.2, and the link you provided works perfectly. Now running and 
logging to non-root directory.

Yet even with the upgrade to 4.10.2 and to macOS Monterey (12.6.7) I’ve still 
got the stupid certificate error for posting to PWSweather and getting 
Forecasts from the NWS and WU:

2023-08-28 10:13:16  weewx[31551] DEBUG weewx.restx: PWSWeather: Failed upload 
attempt 1: 
2023-08-28 10:13:16  weewx[31551] ERROR user.forecast: WUThread: WU: failed 
attempt 1 to download forecast: 
2023-08-28 10:13:16  weewx[31551] DEBUG weewx.restx: StationRegistry: Failed 
upload attempt 1: HTTP Error 429: TOO MANY REQUESTS
2023-08-28 10:13:16  weewx[31551] ERROR user.forecast: NWSThread: NWS: failed 
attempt 1 to download NWS forecast: 
2023-08-28 10:13:16  weewx[31551] ERROR user.forecast: WUThread: WU: failed 
attempt 2 to download forecast: 
2

It doesn’t tell me the certificate that is out of date however.

So two things:

1 - the document http://weewx.com/docs.html/latest/macos.htm needs to be 
updated to redirect the logging information to the wiki article 
https://github.com/weewx/weewx/wiki/WeeWX-v4-and-logging#logging-to-rotating-files

2 - How would I figure out which certificate is out of date and needs update 
for the forecast and PWS updates?

David

Do the right thing. It will gratify some people and astonish the rest.
--Mark Twain.
David Barto
ba...@kdbarto.org





-- 
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/19587CAD-2FBE-4310-898F-B81D2452F456%40kdbarto.org.


[weewx-user] Generate detailed NOAA reports for some date range

2023-08-28 Thread kac...@gmail.com
I'm using Weewx with Belchertown skin. It generates monthly NOAA report 
(one record for every day). Some weeks ago we have floods and geographics 
institut wishes to get more detailed NOAA reports for that data range. 

Any suggestion how to get it? 
If this is not possible, I will open the database and export records for 
that data range (and manually change units for almost all columns). 

Thanks. 

-- 
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/e0dad957-b365-4436-a060-4f2baacbb510n%40googlegroups.com.


Re: [weewx-user] Re: Belchertown lightning graph

2023-08-28 Thread Dan Roman
Hi Mark,

Coincidentally I was just working on this last week.  I have not been able
to get lightning working completely still. In my configuration
lightning_strikes and avg_distance still display as Invalid Observations in
Belchertown.  I was able to get the following observations added but have
to wait for a thunderstorm to see if it works.  I added a second lightning
entry lightning_strike_count to my sensor map to experiment with because I
think my entries in [Accumulator] are causing problems.
Lightning Strikes 0
Lightning Distance N/A


I have been playing with the graphs too.  I am able to get a graph to
display by distance but trying to get more than just that on the graph
broke things.  I wanted to try a column chart for the number of strikes,
but could not figure it out.  For my Tempest I am using the Weatherflow UDP
and this is my sensor map, pretty standard...

[[sensor_map]]
# This section is for handling data for the Tempest Weather Station
outTemp = air_temperature.ST-00102080.obs_st
outHumidity = relative_humidity.ST-00102080.obs_st
pressure = station_pressure.ST-00102080.obs_st
lightning_strikes = lightning_strike_count.ST-00102080.obs_st
avg_distance = lightning_strike_avg_distance.ST-00102080.obs_st
outTempBatteryStatus = battery.ST-00102080.obs_st
windSpeed = wind_speed.ST-00102080.rapid_wind
windDir = wind_direction.ST-00102080.rapid_wind
luminosity = illuminance.ST-00102080.obs_st
UV = uv.ST-00102080.obs_st
rain = rain_accumulated.ST-00102080.obs_st
#windBatteryStatus = battery.ST-00102080.obs_st
radiation = solar_radiation.ST-00102080.obs_st
lightning_distance = distance.ST-00102080.evt_strike
#lightningYYY = energy.ST-00102080.evt_strike
lightning_strike_count = lightning_strike_count.ST-00102080.obs_st

The last entry I added as a duplicate to experiment with.

And I have this correction...

[StdCalibrate]
[[Corrections]]
lightning_distance = lightning_distance if lightning_strike_count >
0 else None

And this for accumulator...

[Accumulator]
[[lightning_strikes]]
extractor = sum
[[lightning_distance]]
extractor = min
[[avg_distance]]
extractor = avg

I have not been able to get all the lightning info I want to display with
either the Seasons or Belchertown skins.

I played around with Seasons to see if I could get things working there
since I was having trouble in Belchertown.  I put the same observations in
Seasons as Belchertown and get the same results.  I tried this in skin.conf
for graphs too, but they don't look right, may need to accumulate some data:

[[[daylightning]]]
yscale = None, None, 1
plot_type = bar
lightning_strikes
aggregate_type = sum
aggregate_interval = hour
label = Lightning (hourly total)

[[[daylightningdistance]]]
   yscale = None, None, 1
plot_type = bar
lightning_distance
aggregate_type = min
aggregate_interval = hour
label = Lightning (closest hourly)

And in Belchertown these entries in graph.conf throw errors (I have them
commented for now):

#[[Lightning_chart]]
#title = Lightning count
#time_length = 10800
#aggregate_interval = 300
#gapsize = 108000
#type = column
#
#[[[lightning_strikes]]]
#name = Lightning Count
#zIndex = 1
# aggregate_type = sum

Throws this error:
weewx.UnknownType: 'lightning_strikes' or 'sum'
Warning: Error trying to use database binding wx_binding to graph
observation lightning_strikes. Error was: 'lightning_strikes' or 'sum'.

#[[LightningInfo]]
#title = Lightning
#[[[lightning_strikes]]]
#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

This throws:
weewx.UnknownType: lightning_strikes
Warning: Error trying to use database binding wx_binding to graph
observation lightning_strikes. Error was: lightning_strikes.

Not sure if my weewx.conf entry under [Accumulator] is causing the problem?

I also tried Kevin's graphs that he provided on June 20th but haven't
gotten them to work either, which is why I added the lightning_strike_count
to my sensor list. Get errors:
TypeError: unsupported operand type(s) for %: 'NoneType' and 'int'
Warning: Error trying to use database binding wx_binding to graph
observation lightning_strike_count. Error was: unsupported operand type(s)
for %: 'NoneType' 

Re: [weewx-user] WeeWX in an RV?

2023-08-28 Thread Stefan Gliessmann
I asked in the community forum for my router and I was told that this is 
the only way they can currently forward data via MQTT.
A future firmware release shall allow more formatting.

I might now play around with 
this https://github.com/mrtncls/mqtt-translator to get the MQTT payload 
from an array in one single statement ...
Anybody used the MQTT Translator for this purpose?

On Monday, August 28, 2023 at 11:01:41 AM UTC+2 Stefan Gliessmann wrote:

> Which code do you refer to?
> [image: Screenshot 2023-08-28 at 11.00.03.png]
> This is what I specified in the GPS/Router to push via MQTT to my broker 
> ...
> On Sunday, August 27, 2023 at 8:39:40 PM UTC+2 vince wrote:
>
>> We'd have to see your code to see what you are publishing.
>>
>> Your MQTT log looks very odd and likely needs some tweaking
>>
>> MQTT: 
>> [{"dateTime":"1693128700.0","gpsLat":"52.152435"},{"dateTime":"1693128700.0","gpsLong":"9.929356"}]
>>  
>>  
>>
>> I'd expect something like {"dateTime":"1233456", "gpsLat":"52.1234", 
>> "gpsLong": "9.987"} for a more typical set of JSON to publish.   You want 
>> one element (not in an array) with three items therein - dateTime/lat/lon.
>>
>>

-- 
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/245ee62b-70f4-495f-8b43-f9dbf8adc180n%40googlegroups.com.


Re: [weewx-user] WeeWX in an RV?

2023-08-28 Thread Stefan Gliessmann
Which code do you refer to?
[image: Screenshot 2023-08-28 at 11.00.03.png]
This is what I specified in the GPS/Router to push via MQTT to my broker ...
On Sunday, August 27, 2023 at 8:39:40 PM UTC+2 vince wrote:

> We'd have to see your code to see what you are publishing.
>
> Your MQTT log looks very odd and likely needs some tweaking
>
> MQTT: 
> [{"dateTime":"1693128700.0","gpsLat":"52.152435"},{"dateTime":"1693128700.0","gpsLong":"9.929356"}]
>  
>  
>
> I'd expect something like {"dateTime":"1233456", "gpsLat":"52.1234", 
> "gpsLong": "9.987"} for a more typical set of JSON to publish.   You want 
> one element (not in an array) with three items therein - dateTime/lat/lon.
>
>

-- 
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/3128c8e4-fe9e-4b0a-a43e-e40c59c2f0e5n%40googlegroups.com.


[weewx-user] Need a dummy driver or a way to start weewx without a driver

2023-08-28 Thread Staffan Ottosson
Hi !

I have a ws2910 and like to post ecowitt data to weewx using to way 
explained in Adding a Ecowitt Data Source to WeeWX (cougar.eu.com) 

. 
Reading posted data from a webserver.

My problem is that i need to have a Driver specified in weewx.conf, if not 
weewx fail to start.

Just now I'm testing with Simulator as driver but I will not have that data 
into may database.

A dummy driver or a way to start weewx without a driver  will solve my 
issue.

Do you  have any hints or tips about this ?

/Staffan


-- 
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/42b86b09-fb24-4b96-8300-21de4b52c665n%40googlegroups.com.