[weewx-user] Re: Report engine stops without error mesage

2021-04-13 Thread Russell Cutcliffe

A slight modification to my issue.  

It turns out that the reporter actually runs again - at the top of the next 
hour, followed by the strange interceptor packet and second report.  Then 
nothing for another hour.

This leads to the graph only plotting in hourly intervals, which is a bit 
annoying.

sorry for the late add,
Russell
On Wednesday, April 14, 2021 at 2:43:25 PM UTC+10 Russell Cutcliffe wrote:

> Hi,
> I'm running version 4.5.1, with the Interceptor set in 'ecowitt-client'.
>
> I've had a long time issue with reports stopping, and have now caught one.
>
> The log file snippet is shown below, but I'm at a loss to explain what's 
> happening, as there's no error message, just a strange behavior.
>
> == weewx.log =
> Apr 14 13:00:50 pete weewx[126266] message repeated 2 times: [ DEBUG 
> user.interceptor: empty queue]
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: POST: 
> PASSKEY==EasyWeatherV1.5.6=2021-04-14+02:59:56=77.2=54=29.968=30.024=78.8=53=94=2.0=3.4=0.000=0.000=0.000=0.000=5.780=141.402=721.41=8=WS2900
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: raw data: 
> PASSKEY==EasyWeatherV1.5.6=2021-04-14+02:59:56=77.2=54=29.968=30.024=78.8=53=94=2.0=3.4=0.000=0.000=0.000=0.000=5.780=141.402=721.41=8=WS2900
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter PASSKEY=
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter stationtype=EasyWeatherV1.5.6
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter baromrelin=29.968
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter eventrainin=0.000
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter dailyrainin=0.000
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter weeklyrainin=0.000
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter monthlyrainin=5.780
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter model=WS2900
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: raw packet: 
> {'dateTime': 1618369196, 'usUnits': 1, 'temperature_in': 77.2, 
> 'humidity_in': 54.0, 'pressure': 30.024, 'temperature_out': 78.8, 
> 'humidity_out': 53.0, 'wind_dir': 94.0, 'wind_speed': 2.0, 'wind_gust': 
> 3.4, 'rain_rate': 0.0, 'rain_total': 141.402, 'solar_radiation': 721.41, 
> 'uv': 8.0, 'rain': 0.0}
> Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: mapped packet: 
> {'dateTime': 1618369196, 'usUnits': 1, 'pressure': 30.024, 'outHumidity': 
> 53.0, 'inHumidity': 54.0, 'outTemp': 78.8, 'inTemp': 77.2, 'windSpeed': 
> 2.0, 'windGust': 3.4, 'windDir': 94.0, 'radiation': 721.41, 'rain': 0.0, 
> 'rainRate': 0.0, 'UV': 8.0}
> Apr 14 13:01:02 pete weewx[126266] DEBUG user.interceptor: empty queue
> Apr 14 13:01:22 pete weewx[126266] message repeated 2 times: [ DEBUG 
> user.interceptor: empty queue]
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: POST: 
> PASSKEY==EasyWeatherV1.5.6=2021-04-14+03:00:56=77.2=54=29.968=30.024=78.8=53=139=1.6=2.2=0.000=0.000=0.000=0.000=5.780=141.402=715.79=8=WS2900
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: raw data: 
> PASSKEY==EasyWeatherV1.5.6=2021-04-14+03:00:56=77.2=54=29.968=30.024=78.8=53=139=1.6=2.2=0.000=0.000=0.000=0.000=5.780=141.402=715.79=8=WS2900
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter PASSKEY=
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter stationtype=EasyWeatherV1.5.6
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter baromrelin=29.968
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter eventrainin=0.000
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter dailyrainin=0.000
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter weeklyrainin=0.000
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter monthlyrainin=5.780
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
> parameter model=WS2900
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: raw packet: 
> {'dateTime': 1618369256, 'usUnits': 1, 'temperature_in': 77.2, 
> 'humidity_in': 54.0, 'pressure': 30.024, 'temperature_out': 78.8, 
> 'humidity_out': 53.0, 'wind_dir': 139.0, 'wind_speed': 1.6, 'wind_gust': 
> 2.2, 'rain_rate': 0.0, 'rain_total': 141.402, 'solar_radiation': 715.79, 
> 'uv': 8.0, 'rain': 0.0}
> Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: mapped packet: 
> {'dateTime': 1618369256, 'usUnits': 1, 'pressure': 30.024, 'outHumidity': 
> 53.0, 'inHumidity': 54.0, 'outTemp': 78.8, 'inTemp': 77.2, 'windSpeed': 
> 

[weewx-user] Report engine stops without error mesage

2021-04-13 Thread Russell Cutcliffe
Hi,
I'm running version 4.5.1, with the Interceptor set in 'ecowitt-client'.

I've had a long time issue with reports stopping, and have now caught one.

The log file snippet is shown below, but I'm at a loss to explain what's 
happening, as there's no error message, just a strange behavior.

== weewx.log =
Apr 14 13:00:50 pete weewx[126266] message repeated 2 times: [ DEBUG 
user.interceptor: empty queue]
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: POST: 
PASSKEY==EasyWeatherV1.5.6=2021-04-14+02:59:56=77.2=54=29.968=30.024=78.8=53=94=2.0=3.4=0.000=0.000=0.000=0.000=5.780=141.402=721.41=8=WS2900
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: raw data: 
PASSKEY==EasyWeatherV1.5.6=2021-04-14+02:59:56=77.2=54=29.968=30.024=78.8=53=94=2.0=3.4=0.000=0.000=0.000=0.000=5.780=141.402=721.41=8=WS2900
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter PASSKEY=
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter stationtype=EasyWeatherV1.5.6
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter baromrelin=29.968
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter eventrainin=0.000
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter dailyrainin=0.000
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter weeklyrainin=0.000
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter monthlyrainin=5.780
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter model=WS2900
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: raw packet: 
{'dateTime': 1618369196, 'usUnits': 1, 'temperature_in': 77.2, 
'humidity_in': 54.0, 'pressure': 30.024, 'temperature_out': 78.8, 
'humidity_out': 53.0, 'wind_dir': 94.0, 'wind_speed': 2.0, 'wind_gust': 
3.4, 'rain_rate': 0.0, 'rain_total': 141.402, 'solar_radiation': 721.41, 
'uv': 8.0, 'rain': 0.0}
Apr 14 13:00:52 pete weewx[126266] DEBUG user.interceptor: mapped packet: 
{'dateTime': 1618369196, 'usUnits': 1, 'pressure': 30.024, 'outHumidity': 
53.0, 'inHumidity': 54.0, 'outTemp': 78.8, 'inTemp': 77.2, 'windSpeed': 
2.0, 'windGust': 3.4, 'windDir': 94.0, 'radiation': 721.41, 'rain': 0.0, 
'rainRate': 0.0, 'UV': 8.0}
Apr 14 13:01:02 pete weewx[126266] DEBUG user.interceptor: empty queue
Apr 14 13:01:22 pete weewx[126266] message repeated 2 times: [ DEBUG 
user.interceptor: empty queue]
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: POST: 
PASSKEY==EasyWeatherV1.5.6=2021-04-14+03:00:56=77.2=54=29.968=30.024=78.8=53=139=1.6=2.2=0.000=0.000=0.000=0.000=5.780=141.402=715.79=8=WS2900
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: raw data: 
PASSKEY==EasyWeatherV1.5.6=2021-04-14+03:00:56=77.2=54=29.968=30.024=78.8=53=139=1.6=2.2=0.000=0.000=0.000=0.000=5.780=141.402=715.79=8=WS2900
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter PASSKEY=
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter stationtype=EasyWeatherV1.5.6
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter baromrelin=29.968
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter eventrainin=0.000
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter dailyrainin=0.000
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter weeklyrainin=0.000
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter monthlyrainin=5.780
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: ignored 
parameter model=WS2900
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: raw packet: 
{'dateTime': 1618369256, 'usUnits': 1, 'temperature_in': 77.2, 
'humidity_in': 54.0, 'pressure': 30.024, 'temperature_out': 78.8, 
'humidity_out': 53.0, 'wind_dir': 139.0, 'wind_speed': 1.6, 'wind_gust': 
2.2, 'rain_rate': 0.0, 'rain_total': 141.402, 'solar_radiation': 715.79, 
'uv': 8.0, 'rain': 0.0}
Apr 14 13:01:24 pete weewx[126266] DEBUG user.interceptor: mapped packet: 
{'dateTime': 1618369256, 'usUnits': 1, 'pressure': 30.024, 'outHumidity': 
53.0, 'inHumidity': 54.0, 'outTemp': 78.8, 'inTemp': 77.2, 'windSpeed': 
1.6, 'windGust': 2.2, 'windDir': 139.0, 'radiation': 715.79, 'rain': 0.0, 
'rainRate': 0.0, 'UV': 8.0}
Apr 14 13:01:24 pete weewx[126266] INFO weewx.manager: Added record 
2021-04-14 13:00:00 AEST (1618369200) to database 'weewx'
Apr 14 13:01:24 pete weewx[126266] INFO weewx.manager: Added record 
2021-04-14 13:00:00 AEST (1618369200) to daily summary in 'weewx'
Apr 14 13:01:24 pete weewx[126266] DEBUG weewx.reportengine: Running 
reports for latest time in the database.
Apr 14 13:01:24 pete weewx[126266] DEBUG weewx.reportengine: Running report 

Re: [weewx-user] $hour.pm2_5.has_data is always false

2021-04-13 Thread Tom Keffer
Queries for time spans that are multiples of a day or done on the daily
summary. Otherwise, on the main archive table. So $day uses the daily
summary, and $hour uses the main archive table.

$hour.outTemp.avg could give you N/A either because outTemp does not
appear in the schema, or because there are no data.

What do these give you?

\$hour.outTemp.has_data = $hour.outTemp.has_data
\$hour.outTemp.avg = $hour.outTemp.avg
\$hour.pm2_5.has_data = $hour.pm2_5.has_data
\$hour.pm2_5.avg = $hour.pm2_5.avg

-tk


On Tue, Apr 13, 2021 at 12:56 PM sbar...@gmail.com 
wrote:

> Hi,
>
> I tried to get $hour.outTemp.avg, and just got N/A
>
> but $day.pm2_5.avg does work and give me the average over the last 24h. So
> it seems my setup is only messing up the "hourly" summary. Any idea where I
> should look to try figure this one out?
>
> Regards,
>
> On Monday, April 12, 2021 at 11:52:53 PM UTC+2 tke...@gmail.com wrote:
>
>> Sorry again, but I am unable to reproduce this. It works fine on my test
>> setup.
>>
>> Do all variables exhibit this? For example, $hour.outTemp.has_data?
>>
>> On Mon, Apr 12, 2021 at 1:28 PM sbar...@gmail.com 
>> wrote:
>>
>>> Sure,
>>>
>>> Sorry for this.
>>>
>>> So I am using the archive_mysql binding. It holds the archive database
>>> filled by my driver loop (which is SDR).
>>> I have an additional SDS011 service that fills in the pm2_5 and pm10
>>> columns. This 2 columns have been added to the archive table.
>>>
>>> So despite the complicated conf, this is just one binding for my 'live
>>> data'.(Maybe I should clean this up.)
>>>
>>> On Monday, April 12, 2021 at 10:15:16 PM UTC+2 tke...@gmail.com wrote:
>>>
 That's a lot of bindings and databases. Which one are you using for
 your $hour.pm2_5.has_data query? In fact, maybe you should tell us the
 exact tag you are using.

 -tk

 On Mon, Apr 12, 2021 at 1:07 PM sbar...@gmail.com 
 wrote:

> Hi,
>
> Here are the requested sections :
>
> ##
>
> #   This section binds a data store to a database.
>
> [DataBindings]
>
> [[wx_binding]]
> # The database must match one of the sections in [Databases].
> # This is likely to be the only option you would want to
> change.
> database = archive_mysql
> # The name of the table within the database
> table_name = archive
> # The manager handles aggregation of data for historical
> summaries
> manager = weewx.wxmanager.WXDaySummaryManager
> # The schema defines the structure of the database.
> # It is *only* used when the database is created.
> schema = schemas.wview.schema
> [[wd_binding]]
> manager = weewx.manager.DaySummaryManager
> schema = user.wdschema.weewxwd_schema
> table_name = archive
> database = weewxwd_mysql
> [[forecast_binding]]
> database = forecast_mysql
> manager = weewx.manager.Manager
> schema = user.forecast.schema
> table_name = archive
> [[wdsupp_binding]]
> database = wd_supp_mysql
> table_name = supp
> manager = weewx.manager.Manager
> schema = user.wdschema.wdsupp_schema
> [[pm_binding]]
> database = archive_mysql
> table_name = archive
> manager = weewx.wxmanager.WXDaySummaryManager
> schema = user.sds011.schema
>
>
> ##
>
> #   This section defines various databases.
> [Databases]
>
> # A SQLite database is simply a single file
> [[archive_sqlite]]
> database_name = weewx.sdb
> database_type = SQLite
>
> # MySQL
> [[archive_mysql]]
> database_type = MySQL
> database_name = weewx
> host =
> user =
> password =
> [[weewxwd_mysql]]
> database_name = weewxwd
> database_type = MySQL
> host =
> user =
> password =
> [[weewxwd_sqlite]]
> database_name = weewxwd.sdb
> root = %(WEEWX_ROOT)s
> database_type = SQLite
> [[forecast_sqlite]]
> database_name = forecast.sdb
> database_type = SQLite
> [[forecast_mysql]]
> database_name = forecast
> database_type = MySQL
> host =
> user =
> password =
> [[wd_supp_sqlite]]
> database_type = SQLite
> database_name = wdsupp.sdb
> [[wd_supp_mysql]]
> database_name = weewxwd
> database_type = MySQL
> host =
> user =

[weewx-user] Re: Main loop exiting

2021-04-13 Thread vince
You are on a pi trying to install something as a non-privileged user into a 
directory owned as root.
Try "*sudo* wee_extension --install=/var/tmp/HP1000.tar.gz" and see if that 
works.

On Tuesday, April 13, 2021 at 12:08:53 PM UTC-7 ried...@gmail.com wrote:

> I have now tried to reinstall the HP driver because the driver is not in 
> the list. Unfortunately, I get an error message during the installation.
>
> xxx@raspberrypi:~# wee_extension --install=/var/tmp/HP1000.tar.gz
> Request to install '/var/tmp/HP1000.tar.gz'
> Extracting from tar archive /var/tmp/HP1000.tar.gz
> Traceback (most recent call last):
>   File "/usr/share/weewx/wee_extension", line 88, in 
> main()
>   File "/usr/share/weewx/wee_extension", line 80, in main
> ext.install_extension(options.install)
>   File "/usr/share/weewx/weecfg/extension.py", line 118, in 
> install_extension
> self.tmpdir, self.logger)
>   File "/usr/share/weewx/weecfg/__init__.py", line 1808, in extract_tar
> tar_archive = tarfile.open(filename, mode='r')
>   File "/usr/lib/python3.7/tarfile.py", line 1580, in open
> raise ReadError("file could not be opened successfully")
> tarfile.ReadError: file could not be opened successfully
>
> ried...@gmail.com schrieb am Dienstag, 13. April 2021 um 09:34:08 UTC+2:
>
>> Hello I have had a problem since updating to weewx 4.5.1. Weewx is no 
>> longer running. The following error appears in the log.
>>
>>
>> Apr 13 09:29:03 raspberrypi weewx[519] INFO weewx.engine: Main loop 
>> exiting. Shutting engine down.
>> Apr 13 09:29:03 raspberrypi weewx[519] CRITICAL __main__: Caught 
>> WeeWxIOError:
>> Apr 13 09:29:03 raspberrypi weewx[519] CRITICAL __main__:   
>> Waiting 60 seconds then retrying...
>>
>> I use the HP1000 driver from https://github.com/AussieSusan/HP1000 I 
>> hope someone can help me. 
>>
>>  Greetings André
>>
>

-- 
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/631f69ed-e959-4cc4-afb4-a6207ebe2b5en%40googlegroups.com.


Re: [weewx-user] $hour.pm2_5.has_data is always false

2021-04-13 Thread sbar...@gmail.com
Hi, 

I tried to get $hour.outTemp.avg, and just got N/A

but $day.pm2_5.avg does work and give me the average over the last 24h. So 
it seems my setup is only messing up the "hourly" summary. Any idea where I 
should look to try figure this one out?

Regards,

On Monday, April 12, 2021 at 11:52:53 PM UTC+2 tke...@gmail.com wrote:

> Sorry again, but I am unable to reproduce this. It works fine on my test 
> setup.
>
> Do all variables exhibit this? For example, $hour.outTemp.has_data?
>
> On Mon, Apr 12, 2021 at 1:28 PM sbar...@gmail.com  
> wrote:
>
>> Sure,
>>
>> Sorry for this.
>>
>> So I am using the archive_mysql binding. It holds the archive database 
>> filled by my driver loop (which is SDR).
>> I have an additional SDS011 service that fills in the pm2_5 and pm10 
>> columns. This 2 columns have been added to the archive table.
>>
>> So despite the complicated conf, this is just one binding for my 'live 
>> data'.(Maybe I should clean this up.)
>>
>> On Monday, April 12, 2021 at 10:15:16 PM UTC+2 tke...@gmail.com wrote:
>>
>>> That's a lot of bindings and databases. Which one are you using for 
>>> your $hour.pm2_5.has_data query? In fact, maybe you should tell us the 
>>> exact tag you are using.
>>>
>>> -tk
>>>
>>> On Mon, Apr 12, 2021 at 1:07 PM sbar...@gmail.com  
>>> wrote:
>>>
 Hi,

 Here are the requested sections : 

 ##

 #   This section binds a data store to a database.

 [DataBindings]
 
 [[wx_binding]]
 # The database must match one of the sections in [Databases].
 # This is likely to be the only option you would want to change.
 database = archive_mysql
 # The name of the table within the database
 table_name = archive
 # The manager handles aggregation of data for historical 
 summaries
 manager = weewx.wxmanager.WXDaySummaryManager
 # The schema defines the structure of the database.
 # It is *only* used when the database is created.
 schema = schemas.wview.schema
 [[wd_binding]]
 manager = weewx.manager.DaySummaryManager
 schema = user.wdschema.weewxwd_schema
 table_name = archive
 database = weewxwd_mysql
 [[forecast_binding]]
 database = forecast_mysql
 manager = weewx.manager.Manager
 schema = user.forecast.schema
 table_name = archive
 [[wdsupp_binding]]
 database = wd_supp_mysql
 table_name = supp
 manager = weewx.manager.Manager
 schema = user.wdschema.wdsupp_schema
 [[pm_binding]]
 database = archive_mysql
 table_name = archive
 manager = weewx.wxmanager.WXDaySummaryManager
 schema = user.sds011.schema


 ##

 #   This section defines various databases.
 [Databases]
 
 # A SQLite database is simply a single file
 [[archive_sqlite]]
 database_name = weewx.sdb
 database_type = SQLite
 
 # MySQL
 [[archive_mysql]]
 database_type = MySQL
 database_name = weewx
 host = 
 user = 
 password = 
 [[weewxwd_mysql]]
 database_name = weewxwd
 database_type = MySQL
 host = 
 user = 
 password = 
 [[weewxwd_sqlite]]
 database_name = weewxwd.sdb
 root = %(WEEWX_ROOT)s
 database_type = SQLite
 [[forecast_sqlite]]
 database_name = forecast.sdb
 database_type = SQLite
 [[forecast_mysql]]
 database_name = forecast
 database_type = MySQL
 host = 
 user = 
 password = 
 [[wd_supp_sqlite]]
 database_type = SQLite
 database_name = wdsupp.sdb
 [[wd_supp_mysql]]
 database_name = weewxwd
 database_type = MySQL
 host = 
 user = 
 password = 
 [[pm_sqlite]]
 database_name = pm.sdb
 database_type = SQLite


 ##

 #   This section defines defaults for the different types of databases.

 [DatabaseTypes]
 
 # Defaults for SQLite databases
 [[SQLite]]
 driver = weedb.sqlite
 # Directory in which the database files are located
 SQLITE_ROOT = %(WEEWX_ROOT)s/archive
 
 # Defaults for MySQL databases
 [[MySQL]]
 driver = weedb.mysql
 # The host where the database is 

[weewx-user] Wind dir, rain fields in new station

2021-04-13 Thread michael
Hi,

New to weewx; I've added support in the SDR driver for my station 
(WeatherSense Wireless WeatherRack2 reporting as "Cotech-36795") - it 
mostly works great.

2 Questions:

1)
As I am in the southern hemisphere and this station has a solar panel on 
it, I have mounted the station facing north to make best use of it. This 
means my wind readings are off by 180 degrees. I have it working by just 
taking 180 off the value that I get from the station in the driver. This 
works, but isn't the correct way to handle this. How can I do this, in 
weewx.conf?

What I'm doing today (in the SDR driver):
pkt['wind_dir'] = Packet.get_int(obj, 'wind_dir_deg') - 180

2)
Another problem I have is with rain_total. I have it mapped in the driver 
like so:
pkt['rain_total'] = Packet.get_float(obj, 'rain_mm')

This does seem to only increment when rain happens, but the number is huge 
eg "rain_mm": 47.400, when it should be ~ 1mm. Any thoughts on what might 
be happening here? And how I might know what time period this total is for? 
Then how to set that up in the config..

Many thanks,
Michael






-- 
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/ffdfdaa1-7ef2-460b-a21f-adef57c6f7dcn%40googlegroups.com.


[weewx-user] Re: Main loop exiting

2021-04-13 Thread ried...@gmail.com
I have now tried to reinstall the HP driver because the driver is not in 
the list. Unfortunately, I get an error message during the installation.

xxx@raspberrypi:~# wee_extension --install=/var/tmp/HP1000.tar.gz
Request to install '/var/tmp/HP1000.tar.gz'
Extracting from tar archive /var/tmp/HP1000.tar.gz
Traceback (most recent call last):
  File "/usr/share/weewx/wee_extension", line 88, in 
main()
  File "/usr/share/weewx/wee_extension", line 80, in main
ext.install_extension(options.install)
  File "/usr/share/weewx/weecfg/extension.py", line 118, in 
install_extension
self.tmpdir, self.logger)
  File "/usr/share/weewx/weecfg/__init__.py", line 1808, in extract_tar
tar_archive = tarfile.open(filename, mode='r')
  File "/usr/lib/python3.7/tarfile.py", line 1580, in open
raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

ried...@gmail.com schrieb am Dienstag, 13. April 2021 um 09:34:08 UTC+2:

> Hello I have had a problem since updating to weewx 4.5.1. Weewx is no 
> longer running. The following error appears in the log.
>
>
> Apr 13 09:29:03 raspberrypi weewx[519] INFO weewx.engine: Main loop 
> exiting. Shutting engine down.
> Apr 13 09:29:03 raspberrypi weewx[519] CRITICAL __main__: Caught 
> WeeWxIOError:
> Apr 13 09:29:03 raspberrypi weewx[519] CRITICAL __main__:   
> Waiting 60 seconds then retrying...
>
> I use the HP1000 driver from https://github.com/AussieSusan/HP1000 I hope 
> someone can help me. 
>
>  Greetings André
>

-- 
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/92217d56-d84b-47a5-b73f-3d94320e808bn%40googlegroups.com.


Re: [weewx-user] I'm ready to try something different with the webpage

2021-04-13 Thread NightTripper
Either dead or missing parts.


On Tuesday, April 13, 2021 at 5:28:53 AM UTC-5 daniel@gmail.com wrote:

> I am in a same boat, looking to be a bit more adventurous with the web 
> page.
>
> So many of the links on the showcase page appear to be dead now though.
>
> On Sunday, April 11, 2021 at 6:18:44 AM UTC+10 peterq...@gmail.com wrote:
>
>> Have you looked through the showcase? https://weewx.com/showcase.html
>>
>>
>>
>> On Sat, Apr 10, 2021 at 12:13 PM NightTripper  wrote:
>>
>>> I think I'm ready to try something different with the stock webpages.  
>>> What is a nice eye candy page that you would recommend for a learner?
>>>
>>> Night
>>>
>>> -- 
>>> 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/579dba2b-90a9-4613-8827-fa7e9289cf4an%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>
>>
>> -- 
>> Peter Quinn
>> (415)794-2264 <(415)%20794-2264>
>>
>

-- 
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/af5bc976-98a7-47a3-82a7-f057d2be19d0n%40googlegroups.com.


Re: [weewx-user] Skin with webcam?

2021-04-13 Thread Michael Sanphillipo
Do you edit the index file or create a index_hook_after_station_info.inc 
file and put the camera link in here? If you create a file do you just add 
a direct link or is there more to it? I realize that I have to edit the 
skin.conf to turn on the hook.

Thanks!

On Tuesday, April 13, 2021 at 8:15:00 AM UTC-4 Mitchell Tuckness wrote:

> I am going to have to see if I can increase my outgoing internet speed it 
> looks like. I can stream to youtube using Blue Iris, which I use to push 
> the weather to most services. But for some reason, I can’t keep the live 
> youtube stream connected for very long. I have 10MB fiber out, but 
> according to youtube, that’s the minimum, and when youtube drops the 
> stream, it doesn’t reconnect youtube automatically until you initiate it. 
> Well, all I can assume is it is a bandwidth problem. Or maybe I can figure 
> out how to stream it directly from Blue Iris.
>
>  
>
>  
>
>  
>
> *From:* weewx...@googlegroups.com  *On Behalf 
> Of *DaveStLou
> *Sent:* Friday, April 2, 2021 5:57 AM
> *To:* weewx-user 
> *Subject:* Re: [weewx-user] Skin with webcam?
>
>  
>
> I 'm no expert by any means. I usually just try things I find here: 
> w3school's 
> HTML Tutorial . I'm sure there's room 
> for improvement.
>
>  
>
> With that intro, I've attached the index_hook_after_station_info.inc I 
> created which includes the link to YouTube livestream and the embeded 
> EarthCam content.
>
>  
>
> On Friday, April 2, 2021 at 5:54:58 AM UTC-5 moth...@gmail.com wrote:
>
> I am also interested in how you did this. Thanks.
>
> Op donderdag 1 april 2021 om 14:02:24 UTC+2 schreef Mitchell Tuckness:
>
> I don't suppose you would be interested in sharing the code you used to 
> modify the Belchertown to look so nice. I am horrible on HTML, but I am 
> pretty good at modifying, or write a guide on how you modified it. Looks 
> great, would like to get mine like that!
>
> On Thursday, March 25, 2021 at 7:47:31 AM UTC-6 DaveStLou wrote:
>
> Like In77, I use Belchertown skin. I added my webcam in 
> "index_hook_after_station_info" section so it appears below the station 
> information: OakvilleWx.com
>
> On Thursday, March 25, 2021 at 1:39:44 AM UTC-5 ln77 wrote:
>
> Belchertown isn’t exactly pre-loaded, but it is well integrated and the 
> install is straightforward.  It has a radar feed. It doesn’t have the 
> webcam built in, but It has several places to insert user-defined content 
> and it would be easy to put a webcam in one of them.  I hacked it a little 
> to put the webcam in place of the current-conditions icon: 
> http://www.2pi.org/wx/
>
>
>   -Les
>
>  
>
>
>
> On 24 Mar 2021, at 20:53, 'super zee' via weewx-user <
> weewx...@googlegroups.com> wrote:
>
>  
>
> Brand new here and still learning.  Got Weewx loaded and it's uploading to 
> CWOP and my web page.  Is there a skin preloaded with WeeWX that can 
> accommodate a web cam and live radar feed?  
>
>  
>
> Thanks for the help!
>
> Chris 
>
> KAZTEMPE47
>
>  
>
> -- 
> 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/58b570f6-ba28-4b46-bbdf-dcc9447d36a5n%40googlegroups.com
>  
> 
> .
>
>  
>
> -- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/weewx-user/y-RQmnoqcqQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> weewx-user+...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/f3d8e269-1b62-4274-9fce-677aedcdfbf2n%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/2c869fb4-f65e-4609-8be4-fc2e5307d0edn%40googlegroups.com.


RE: [weewx-user] Skin with webcam?

2021-04-13 Thread purchase
I am going to have to see if I can increase my outgoing internet speed it looks 
like. I can stream to youtube using Blue Iris, which I use to push the weather 
to most services. But for some reason, I can’t keep the live youtube stream 
connected for very long. I have 10MB fiber out, but according to youtube, 
that’s the minimum, and when youtube drops the stream, it doesn’t reconnect 
youtube automatically until you initiate it. Well, all I can assume is it is a 
bandwidth problem. Or maybe I can figure out how to stream it directly from 
Blue Iris.

 

 

 

From: weewx-user@googlegroups.com  On Behalf Of 
DaveStLou
Sent: Friday, April 2, 2021 5:57 AM
To: weewx-user 
Subject: Re: [weewx-user] Skin with webcam?

 

I 'm no expert by any means. I usually just try things I find here: w3school's 
HTML Tutorial  . I'm sure there's room for 
improvement.

 

With that intro, I've attached the index_hook_after_station_info.inc I created 
which includes the link to YouTube livestream and the embeded EarthCam content.

 

On Friday, April 2, 2021 at 5:54:58 AM UTC-5 moth...@gmail.com 
  wrote:

I am also interested in how you did this. Thanks.

Op donderdag 1 april 2021 om 14:02:24 UTC+2 schreef Mitchell Tuckness:

I don't suppose you would be interested in sharing the code you used to modify 
the Belchertown to look so nice. I am horrible on HTML, but I am pretty good at 
modifying, or write a guide on how you modified it. Looks great, would like to 
get mine like that!

On Thursday, March 25, 2021 at 7:47:31 AM UTC-6 DaveStLou wrote:

Like In77, I use Belchertown skin. I added my webcam in 
"index_hook_after_station_info" section so it appears below the station 
information: OakvilleWx.com  

On Thursday, March 25, 2021 at 1:39:44 AM UTC-5 ln77 wrote:

Belchertown isn’t exactly pre-loaded, but it is well integrated and the install 
is straightforward.  It has a radar feed. It doesn’t have the webcam built in, 
but It has several places to insert user-defined content and it would be easy 
to put a webcam in one of them.  I hacked it a little to put the webcam in 
place of the current-conditions icon: http://www.2pi.org/wx/


  -Les

 





On 24 Mar 2021, at 20:53, 'super zee' via weewx-user mailto:weewx...@googlegroups.com> > wrote:

 

Brand new here and still learning.  Got Weewx loaded and it's uploading to CWOP 
and my web page.  Is there a skin preloaded with WeeWX that can accommodate a 
web cam and live radar feed?  

 

Thanks for the help!

Chris 

KAZTEMPE47

 

-- 
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/58b570f6-ba28-4b46-bbdf-dcc9447d36a5n%40googlegroups.com
 

 .

 

-- 
You received this message because you are subscribed to a topic in the Google 
Groups "weewx-user" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/weewx-user/y-RQmnoqcqQ/unsubscribe.
To unsubscribe from this group and all its topics, 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/f3d8e269-1b62-4274-9fce-677aedcdfbf2n%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/17b701d7305e%249d8cfa00%24d8a6ee00%24%40maladomini.com.


RE: [weewx-user] Skin with webcam?

2021-04-13 Thread purchase
Thanks, I am going to check this out. I just got MQTT over SSL working, wow, 
that was tough.

 

From: weewx-user@googlegroups.com  On Behalf Of 
DaveStLou
Sent: Friday, April 2, 2021 5:57 AM
To: weewx-user 
Subject: Re: [weewx-user] Skin with webcam?

 

I 'm no expert by any means. I usually just try things I find here: w3school's 
HTML Tutorial  . I'm sure there's room for 
improvement.

 

With that intro, I've attached the index_hook_after_station_info.inc I created 
which includes the link to YouTube livestream and the embeded EarthCam content.

 

On Friday, April 2, 2021 at 5:54:58 AM UTC-5 moth...@gmail.com 
  wrote:

I am also interested in how you did this. Thanks.

Op donderdag 1 april 2021 om 14:02:24 UTC+2 schreef Mitchell Tuckness:

I don't suppose you would be interested in sharing the code you used to modify 
the Belchertown to look so nice. I am horrible on HTML, but I am pretty good at 
modifying, or write a guide on how you modified it. Looks great, would like to 
get mine like that!

On Thursday, March 25, 2021 at 7:47:31 AM UTC-6 DaveStLou wrote:

Like In77, I use Belchertown skin. I added my webcam in 
"index_hook_after_station_info" section so it appears below the station 
information: OakvilleWx.com  

On Thursday, March 25, 2021 at 1:39:44 AM UTC-5 ln77 wrote:

Belchertown isn’t exactly pre-loaded, but it is well integrated and the install 
is straightforward.  It has a radar feed. It doesn’t have the webcam built in, 
but It has several places to insert user-defined content and it would be easy 
to put a webcam in one of them.  I hacked it a little to put the webcam in 
place of the current-conditions icon: http://www.2pi.org/wx/


  -Les

 





On 24 Mar 2021, at 20:53, 'super zee' via weewx-user mailto:weewx...@googlegroups.com> > wrote:

 

Brand new here and still learning.  Got Weewx loaded and it's uploading to CWOP 
and my web page.  Is there a skin preloaded with WeeWX that can accommodate a 
web cam and live radar feed?  

 

Thanks for the help!

Chris 

KAZTEMPE47

 

-- 
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/58b570f6-ba28-4b46-bbdf-dcc9447d36a5n%40googlegroups.com
 

 .

 

-- 
You received this message because you are subscribed to a topic in the Google 
Groups "weewx-user" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/weewx-user/y-RQmnoqcqQ/unsubscribe.
To unsubscribe from this group and all its topics, 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/f3d8e269-1b62-4274-9fce-677aedcdfbf2n%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/17b001d7305d%2409616ab0%241c244010%24%40maladomini.com.


Re: [weewx-user] I'm ready to try something different with the webpage

2021-04-13 Thread Daniel McIlroy
I am in a same boat, looking to be a bit more adventurous with the web page.

So many of the links on the showcase page appear to be dead now though.

On Sunday, April 11, 2021 at 6:18:44 AM UTC+10 peterq...@gmail.com wrote:

> Have you looked through the showcase? https://weewx.com/showcase.html
>
>
>
> On Sat, Apr 10, 2021 at 12:13 PM NightTripper  wrote:
>
>> I think I'm ready to try something different with the stock webpages.  
>> What is a nice eye candy page that you would recommend for a learner?
>>
>> Night
>>
>> -- 
>> 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/579dba2b-90a9-4613-8827-fa7e9289cf4an%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> Peter Quinn
> (415)794-2264 <(415)%20794-2264>
>

-- 
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/00314d9a-c2f6-4358-b342-d31369543829n%40googlegroups.com.


Re: [weewx-user] WH57(lighning detection) and GW1000 send daily summary on every records

2021-04-13 Thread gjr80
On Tuesday, 13 April 2021 at 18:14:35 UTC+10 lang@googlemail.com wrote:

> There is a good, brief description of the options to be found at 
> https://www.wxforum.net/index.php?topic=34857.msg355511#msg355511
>

Please keep in mind that my post linked above was made over two years ago 
when WeeWX v.3.8.1 was the current release; v4.5.1 is the current release 
and things have changed. In particular the process for adding (and 
removing) columns (observations) from an existing archive/database has been 
greatly simplified. I suggest that if you want to add to or change the 
database you refer to the Customizing the database 
 section of the 
Customization 
Guide  - it contains the most up to 
date information.

Gary

-- 
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/81bf77c0-9c93-41b3-a13b-1ca0e8757042n%40googlegroups.com.


Re: [weewx-user] WH57(lighning detection) and GW1000 send daily summary on every records

2021-04-13 Thread Rainer Lang
While the GW1000 API driver provides you all the fields you can see in 
the field map (--> wiki, https://github.com/gjr80/weewx-gw1000/wiki), 
weewx archives/stores/writes to the database only the fields which are 
contained in its database schema.


If you started with weewx 4.x.x that's most likely the wview_extended 
schema (what you have you can see in your weewx.conf

in [DataBindings]     [[wx_binding]].
It resides (under Debian/Raspbian) at /usr/share/weewx/schemas as 
wview_extended.py


If your schema is still the old wview schema because you created your 
database with weewx V3.x.x or earlier, you will have to change that (see 
wiki [https://github.com/weewx/weewx/wiki] and customization guide 
[http://www.weewx.com/docs/customizing.htm]).


If the driver provides fields for processing which are not in the 
database schema, they will not be archived.


There a several ways how to change that:
- repurposing existing but not used fields
- extending you database schema ... (also wview_extended can be further 
extended )


There is a good, brief description of the options to be found at
https://www.wxforum.net/index.php?topic=34857.msg355511#msg355511

I personally went for the re-purposing method (even though I acknowledge 
that extending the DB schema is more elegant)
to accommodate my WH41, WH51 and WH45 data in the database. But the same 
applies for the battery status data etc.



e
On 12.04.2021 22:40, Johann Destombes wrote:
Thanks, I just install gw1000 driver and it's works great, I just need 
a storm to see if everything is well record.


When I read the GW1000driver wiki I understand that the driver record 
somewhere more extended data like wh57 battery level or timestamp of 
last lightning strike .
In my case Weewx record archive data in a mysql database but I was not 
able to find where these data are stored. Are they somewhere in the 
archive database or are they just loop data ?


Le dimanche 11 avril 2021 à 23:17:37 UTC+2, lang@googlemail.com a 
écrit :


we recommend NOT to use the intereptor driver for a GW1000/WH2650
console but to use the meanwhile existing
GW1000 API driver instead - otherwise you tend to run into
multiple issues (and unnecessarily use the
console's "Customized"server option which exists only once) due to
the many extra sensors being released.

The GW1000 API driver covers all existing FineOffset/Ecowitt
(clone) sensors and is very stable.
Gary did an excellent job here.
https://github.com/gjr80/weewx-gw1000


On 11.04.2021 15:36, Johann Destombes wrote:

Yes I'm agree. This is the driver part of my weewx.conf:
/
/
/###
[Interceptor]
    driver = user.interceptor
    device_type = ecowitt-client
    port = 8000

    [[sensor_map_extensions]]
    lightning_strike_count = lightning_num
    lightning_distance = lightning
 ### /

I followed this link:
https://github.com/matthewwall/weewx-interceptor/issues/69
 to
modifie interceptor.py.
So this is the ecowitt-client part of my interceptor.py:

Row 2306 to 2459.
/...
class EcowittClient(Consumer):
    """Use the ecowitt protocol (not WU protocol) to capture data"""

    def __init__(self, **stn_dict):
    super(EcowittClient, self).__init__(
    EcowittClient.Parser(),
handler=EcowittClient.Handler, **stn_dict)

    class Handler(Consumer.Handler):

    def get_response(self):
    return
'{"errcode":"0","errmsg":"ok","UTC_offset":"-18000"}'

    class Parser(Consumer.Parser):

    # map labels to observation names
    LABEL_MAP = {
    'baromabsin': 'pressure',
    'humidity': 'humidity_out',
    'humidityin': 'humidity_in',
    'tempf': 'temperature_out',
    'tempinf': 'temperature_in',
    'temp1f': 'temperature_1',
    'temp2f': 'temperature_2',
    'temp3f': 'temperature_3',
    'temp4f': 'temperature_4',
    'temp5f': 'temperature_5',
    'temp6f': 'temperature_6',
    'temp7f': 'temperature_7',
    'temp8f': 'temperature_8',
    'humidity1': 'humidity_1',
    'humidity2': 'humidity_2',
    'humidity3': 'humidity_3',
    'humidity4': 'humidity_4',
    'humidity5': 'humidity_5',
    'humidity6': 'humidity_6',
    'humidity7': 'humidity_7',
    'humidity8': 'humidity_8',
    'batt1': 'battery_1',
    'batt2': 'battery_2',
    'batt3': 'battery_3',
    'batt4': 'battery_4',
    'batt5': 'battery_5',
    'batt6': 

[weewx-user] Main loop exiting

2021-04-13 Thread ried...@gmail.com
Hello I have had a problem since updating to weewx 4.5.1. Weewx is no 
longer running. The following error appears in the log.


Apr 13 09:29:03 raspberrypi weewx[519] INFO weewx.engine: Main loop 
exiting. Shutting engine down.
Apr 13 09:29:03 raspberrypi weewx[519] CRITICAL __main__: Caught 
WeeWxIOError:
Apr 13 09:29:03 raspberrypi weewx[519] CRITICAL __main__:   Waiting 
60 seconds then retrying...

I use the HP1000 driver from https://github.com/AussieSusan/HP1000 I hope 
someone can help me. 

 Greetings André

-- 
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/b1a214d3-c34d-4bcd-8c13-e9793e4f7e71n%40googlegroups.com.


Re: [weewx-user] Re: set 'group_time' to 'unix_epoch_ms' causes crash in weewx.almanac

2021-04-13 Thread gjr80
More or less. Even more simply, think of WeeWX (and python) as using 
timestamps the ‘units’ of which are seconds since epoch. V4.5.0 introduced 
a new ‘unit’ of time in the report space that is milliseconds since epoch. 
When the report space wants to deal with any other part of WeeWX (and 
python) it needs to speak in seconds since epoch. Before that v4.5.0 that 
was implicit as there was only one unit of time, post v4.5.0 it needs to be 
explicit.

Gary

On Tuesday, 13 April 2021 at 15:28:25 UTC+10 graha...@gmail.com wrote:

> i am using https://github.com/chaunceygardiner/weewx-forecast v.b12, 
> which, as you say, calls almanac
>
> i think i understand. deep in weewx (call it weewx ‘kernel’), monotonic 
> time is a fundamental always measured in time_t. in the upper levels of 
> weewx, in the world of weewx units, time is an observable property with 
> transformable units. almanac is really part of the ‘kernel’, which works in 
> time_t only, so any time values from the units space must be converted to 
> time_t before being presented to almanac i.e. it is actually a bug in 
> forecast, in this case [and might imply some tweaking needed in the almanac 
> interface within cheetah]
>
> On 13 Apr 2021, at 1:52 pm, gjr80  wrote:
>
> To understand why you are seeing this behaviour you need to understand how
>  Almanac objects are created and how they are created within a Cheetah 
> template/WeeWX report. 
>
> An Almanac object needs, among other things, a unix epoch timestamp when 
> it is created. If the Almanac constructor does not include a timestamp 
> the current system time is used. The key point here is that the timestamp 
> is a unix epoch timestamp, ie seconds since midnight GMT/UTC 1 January 
> 1970. When you use an $almanac.xxx tag in a CheetahGenerator template the 
> CheetahGenerator obtains an Almanac object (to provide all of the 
> $almanac.xxx tags) and uses the report generator timestamp (a unix epoch 
> timestamp) to initialise the underlying Almanac object. You have not 
> shown us the code in your GE skin, but for the purposes of the exercise I 
> will assume it is similar to some of the existing forecast extension and 
> clones code. The forecast variable available in the forecast skin has an 
> almanac property (which works just like the $almanac tag) that can be 
> used to obtain various tags, commonly sun/moon rise/set etc. The forecast 
> extension also operates across a number of days and almanac properties for 
> each day are obtained by initialising the almanac with a timestamp for each 
> day (period), for example (my indentation):
>
> #for $period in $periods 
>#set $img = '' 
>#set $alm = $forecast.almanac(ts=$period.event_ts.raw+10) 
>#if $alm.hasExtras 
>  #set $moonrise_ts = $alm.moon.rise.raw #set $moonset_ts = 
> $alm.moon.set.raw
>
> Here the almanac is initialised not with the current epoch timestamp or 
> generator timestamp but with a tag ($period.event_ts.raw) that is going 
> to be in the group_time units that apply to the skin. When group_time is 
> set to unix_epoch you get seconds since epoch, if you use unix_epoch_ms you 
> get milliseconds since unix epoch or 1000 time the former. This is what 
> causes the overflow and this is why changing group_time causes the error 
> to appear/disappear.
>
> Is it a bug, maybe, but I don't think it is. class Almanac needs a 
> timestamp, the class says it needs to be initialised with a unix epoch 
> timestamp but that is not what it is being given. If you ask WeeWX to 
> convert degree C to hPa is it a bug if WeeWX throws an error?
>
> Solutions? class Almanac could be made handle a timestamp in unix epoch 
> seconds or milliseconds as it is generally pretty easy to tell the 
> difference, though not for all date-times. Not sure on Tom's view on that 
> though, does feel a little hackish to me. Alternatively, templates/SLEs etc 
> could just force any timestamps being passed to $almanac() (or in this 
> case $forecast.almanac()) be be in unix_epoch seconds, just like we force 
> units in some formulae to degree C or m/s etc. So in this case something 
> like (untested):
>
> #for $period in $periods 
>#set $img = '' 
>#set $alm = $forecast.almanac(ts=$period.event_ts.unix_epoch.raw+10) 
>#if $alm.hasExtras 
>  #set $moonrise_ts = $alm.moon.rise.raw #set $moonset_ts = 
> $alm.moon.set.raw
>
> should work.
>
> Gary
>
>
>

-- 
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/8dd1b742-8236-4db4-ab19-dc162acc213bn%40googlegroups.com.