[weewx-user] Re: how to merge data from two weather stations. fedora

2022-04-24 Thread gjr80
Impossible to answer in a meaningful way without knowing what you are 
trying to do to what and in what way. Simple answer is that no, one of the 
binding does not need to be wx_binding; however, wx_binding is the default 
binding so if whatever you may be doing cannot find a binding to use it 
will try the default.

Gary

On Monday, 25 April 2022 at 14:13:49 UTC+10 william...@att.net wrote:

>   File "/usr/share/weewx/weewx/manager.py", line 701, in 
> get_manager_dict_from_config
> raise weewx.UnknownBinding("Unknown data binding '%s'" % e)
> weewx.UnknownBinding: Unknown data binding ''wx_binding''
>
> I am getting this error.  Does one of the bindings have to be called 
> wx_binding?
>
> On Sunday, April 24, 2022 at 3:38:08 PM UTC-7 gjr80 wrote:
>
>> If you have two weather stations and wish to run weewx-multi you will 
>> typically run two WeeWX instances not three. In terms of combined reporting 
>> there are two basic options; first have one of your instances generate the 
>> combined reports or second, as Matthew mentions in a post in the thread 
>> cited in your last post, use wee_reports 
>>  to generate 
>> your combined reports based on a third config file (note that this 'third 
>> config file' is not used with a WeeWX instance, rather it is used solely by 
>> wee_reports to generate the reports specified in it's [StdReport] stanza; 
>> most of the rest of the third config file (eg driver, services etc) can 
>> specify whatever you want, though data bindings/datbases etc will need to 
>> be correctly specified.)
>>
>> Generally speaking my preference is the former, no need for a third 
>> config file nor the mechanism (cron?) to run it, everything is taken care 
>> of by WeeWX.
>>
>> 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/9ac88b8f-8f16-4d0d-a369-0010a6c7feaan%40googlegroups.com.


[weewx-user] Re: how to merge data from two weather stations. fedora

2022-04-24 Thread William Garber
  File "/usr/share/weewx/weewx/manager.py", line 701, in 
get_manager_dict_from_config
raise weewx.UnknownBinding("Unknown data binding '%s'" % e)
weewx.UnknownBinding: Unknown data binding ''wx_binding''

I am getting this error.  Does one of the bindings have to be called 
wx_binding?

On Sunday, April 24, 2022 at 3:38:08 PM UTC-7 gjr80 wrote:

> If you have two weather stations and wish to run weewx-multi you will 
> typically run two WeeWX instances not three. In terms of combined reporting 
> there are two basic options; first have one of your instances generate the 
> combined reports or second, as Matthew mentions in a post in the thread 
> cited in your last post, use wee_reports 
>  to generate 
> your combined reports based on a third config file (note that this 'third 
> config file' is not used with a WeeWX instance, rather it is used solely by 
> wee_reports to generate the reports specified in it's [StdReport] stanza; 
> most of the rest of the third config file (eg driver, services etc) can 
> specify whatever you want, though data bindings/datbases etc will need to 
> be correctly specified.)
>
> Generally speaking my preference is the former, no need for a third config 
> file nor the mechanism (cron?) to run it, everything is taken care of by 
> WeeWX.
>
> 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/94a85f1f-67d6-43c3-aef5-81b80d59d995n%40googlegroups.com.


[weewx-user] Re: how to merge data from two weather stations. fedora

2022-04-24 Thread gjr80
If you have two weather stations and wish to run weewx-multi you will 
typically run two WeeWX instances not three. In terms of combined reporting 
there are two basic options; first have one of your instances generate the 
combined reports or second, as Matthew mentions in a post in the thread 
cited in your last post, use wee_reports 
 to generate your 
combined reports based on a third config file (note that this 'third config 
file' is not used with a WeeWX instance, rather it is used solely by 
wee_reports to generate the reports specified in it's [StdReport] stanza; 
most of the rest of the third config file (eg driver, services etc) can 
specify whatever you want, though data bindings/datbases etc will need to 
be correctly specified.)

Generally speaking my preference is the former, no need for a third config 
file nor the mechanism (cron?) to run it, everything is taken care of by 
WeeWX.

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/c9397967-2ca4-4229-b69b-32849b3b6c94n%40googlegroups.com.


[weewx-user] Re: how to merge data from two weather stations. fedora

2022-04-24 Thread William Garber
https://groups.google.com/g/weewx-user/c/FsKRIt8wG5IA very similar 
discussion but no specific answer I think.  In the "[Station] section what 
"station_type" would I choose?  In the "[Engine]" section could I just 
leave "archive_services = " blank?  I am afraid to try it.
On Sunday, April 24, 2022 at 2:19:34 PM UTC-7 William Garber wrote:

> following https://groups.google.com/g/weewx-development/c/H14rxbBENp8
> According to Tom Keffer there are two strategies.
> I am doing the first one as documented here  
> https://github.com/weewx/weewx/wiki/weewx-multi
> I can not use the init.d script "weewx-multi" since I am using fedora 
> which does not  have "/lib/init/vars.sh" or "/lib/lsb/init-functions" since 
> it uses systemd (and systemctl).
> What I did is I just modified the standard "/etc/init.d/weewx" script to 
> "/etc/init.d/weewx_atlas"
> I just changed "NAME=weewx_atlas" for the first instance.  
> Then changed "NAME=weewx_wmod" for the second instance and 
> "NAME=weewx_merge" for the third instance of the weewx demon.
> Then I need three files /etc/weewx/weewx_atlas.conf and weewx_wmod.conf 
> and weewx_merge.conf.
> The database file names and HTML_ROOTs have to be unique in each.
> Other than that the main difference is the weewx_merge.conf has under 
> [DATA_BINDINGS] two sections [atlas_binding] with 
> "database=archive_sqlite_atlas"  and [wmod_binding] with 
> "database=archive_sqlite_wmod".  And under [Databases] two sections 
> [archive_squlite_wmod] with "database_name = weewx_wmod.sdb" and 
> [archive_sqlite_atlas] with "database_name = weewx_atlas.sdb".
> Everything else is same but ...
> [[SeasonsReport]]
> [[[ImageGenerator]]]
> day_images
> [daybarometer]
>  [[wmodBarometer]]
>data_type = barometer
>data_binding = wmod_binding
>label = WM barometer
>  [[atlasBarometer]]
>data_type = barometer
>data_binding = atlas_binding
> #  label = AT barometer   
>   
>label = AT barom
> and so on for all sensors
>
> So the question is how to prevent pipeline from attempting to do archive 
> operations and change the databases?  And what driver to use?  I do not 
> really need a driver.
>

-- 
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/f7429313-35ef-48b1-bce0-241218b4fa07n%40googlegroups.com.
# WEEWX CONFIGURATION FILE
#
# Copyright (c) 2009-2022 Tom Keffer 
# See the file LICENSE.txt for your rights.

##

# This section is for general configuration information.

# Set to 1 for extra debug info, otherwise comment it out or set to zero
# garberw fixme turned debugging on
debug = 0
# debug = 1

# Root directory of the weewx data file hierarchy for this station
WEEWX_ROOT = /

# Whether to log successful operations. May get overridden below.
# garberw
# log_success = True
log_success = True

# Whether to log unsuccessful operations. May get overridden below.
log_failure = True
# log_failure = False

# How long to wait before timing out a socket (FTP, HTTP) connection(note 
this is from version 4.6.1 may not apply here garberw)
socket_timeout = 20

# Do not modify this. It is used when installing and updating weewx.
version = 4.7.0

##

#   This section is for information about the station.

[Station]

# Description of the station location
# garberw
#location = "My Little Town, Oregon"
location = USA; CA; San Rafael; Lucas Valley; Creekside Dr.

# Latitude in decimal degrees. Negative for southern hemisphere
# garberw
# latitude = 0.00
latitude = 38.03511971394813
# Longitude in decimal degrees. Negative for western hemisphere.
# garberw
# longitude = 0.00
longitude = -122.5868406517824

# Altitude of the station, with the unit it is in. This is used only
# if the hardware cannot supply a value.
# garberw
# altitude = 700, foot# Choose 'foot' or 'meter' for unit
# garberw ground
# altitude = 192, foot# Choose 'foot' or 'meter' for unit
# garberw ground fixme add 13' or so for pole acurite atlas is on
# 63 meters
altitude = 207, foot# Choose 'foot' or 'meter' for unit

# Set to type of station hardware. There must be a corresponding stanza
# in this file, which includes a value for the 'driver' option.
# garberw
# station_type = Simulat

[weewx-user] how to merge data from two weather stations. fedora

2022-04-24 Thread William Garber
following https://groups.google.com/g/weewx-development/c/H14rxbBENp8
According to Tom Keffer there are two strategies.
I am doing the first one as documented here  
https://github.com/weewx/weewx/wiki/weewx-multi
I can not use the init.d script "weewx-multi" since I am using fedora which 
does not  have "/lib/init/vars.sh" or "/lib/lsb/init-functions" since it 
uses systemd (and systemctl).
What I did is I just modified the standard "/etc/init.d/weewx" script to 
"/etc/init.d/weewx_atlas"
I just changed "NAME=weewx_atlas" for the first instance.  
Then changed "NAME=weewx_wmod" for the second instance and 
"NAME=weewx_merge" for the third instance of the weewx demon.
Then I need three files /etc/weewx/weewx_atlas.conf and weewx_wmod.conf and 
weewx_merge.conf.
The database file names and HTML_ROOTs have to be unique in each.
Other than that the main difference is the weewx_merge.conf has under 
[DATA_BINDINGS] two sections [atlas_binding] with 
"database=archive_sqlite_atlas"  and [wmod_binding] with 
"database=archive_sqlite_wmod".  And under [Databases] two sections 
[archive_squlite_wmod] with "database_name = weewx_wmod.sdb" and 
[archive_sqlite_atlas] with "database_name = weewx_atlas.sdb".
Everything else is same but ...
[[SeasonsReport]]
[[[ImageGenerator]]]
day_images
[daybarometer]
 [[wmodBarometer]]
   data_type = barometer
   data_binding = wmod_binding
   label = WM barometer
 [[atlasBarometer]]
   data_type = barometer
   data_binding = atlas_binding
#  label = AT barometer 

   label = AT barom
and so on for all sensors

So the question is how to prevent pipeline from attempting to do archive 
operations and change the databases?  And what driver to use?  I do not 
really need a driver.

-- 
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/8a55655d-bbbd-42b8-a865-d6042f29fb2an%40googlegroups.com.
# WEEWX CONFIGURATION FILE
#
# Copyright (c) 2009-2022 Tom Keffer 
# See the file LICENSE.txt for your rights.

##

# This section is for general configuration information.

# Set to 1 for extra debug info, otherwise comment it out or set to zero
# garberw fixme turned debugging on
debug = 0
# debug = 1

# Root directory of the weewx data file hierarchy for this station
WEEWX_ROOT = /

# Whether to log successful operations. May get overridden below.
# garberw
# log_success = True
log_success = True

# Whether to log unsuccessful operations. May get overridden below.
log_failure = True
# log_failure = False

# How long to wait before timing out a socket (FTP, HTTP) connection(note 
this is from version 4.6.1 may not apply here garberw)
socket_timeout = 20

# Do not modify this. It is used when installing and updating weewx.
version = 4.7.0

##

#   This section is for information about the station.

[Station]

# Description of the station location
# garberw
#location = "My Little Town, Oregon"
location = USA; CA; San Rafael; Lucas Valley; Creekside Dr.

# Latitude in decimal degrees. Negative for southern hemisphere
# garberw
# latitude = 0.00
latitude = 38.03511971394813
# Longitude in decimal degrees. Negative for western hemisphere.
# garberw
# longitude = 0.00
longitude = -122.5868406517824

# Altitude of the station, with the unit it is in. This is used only
# if the hardware cannot supply a value.
# garberw
# altitude = 700, foot# Choose 'foot' or 'meter' for unit
# garberw ground
# altitude = 192, foot# Choose 'foot' or 'meter' for unit
# garberw ground fixme add 13' or so for pole acurite atlas is on
# 63 meters
altitude = 207, foot# Choose 'foot' or 'meter' for unit

# Set to type of station hardware. There must be a corresponding stanza
# in this file, which includes a value for the 'driver' option.
# garberw
# station_type = Simulator
station_type = WeatherModbus

# If you have a website, you may specify an URL. This is required if you
# intend to register your station.
#station_url = http://www.example.com

# The start of the rain year (1=January; 10=October, etc.). This is
# downloaded from the station if the hardware supports it.
rain_year_start = 1

# Start of week (0=Monday, 6=Sunday)
# garberw
# week_start = 6

Re: [weewx-user] Re: Merge database failed

2022-04-24 Thread vince
I have no idea where sunshine_hours comes from.  Did you add it to your old 
weewx schema ?   If so you'd need to similarly add it to the new schema 
probably before doing your conversion and see if wee_database is smart 
enough to do the right thing.

(untested - but give it a try.  This is why you always work off copies of 
your data..).

On Sunday, April 24, 2022 at 12:29:04 PM UTC-7 Meteo Oberwallis wrote:

> Hello Vince Many thanks for your response. I moved my old weewx.sdb to the 
> new weewx version and then created it in the new format with "wee_database 
> weewx.conf --reconfigure". Unfortunately, the "sunshine_hours" was deleted 
> in the process. Can I somehow transfer these to the new scheme? Greeting
>

-- 
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/50c962f4-7a0e-4475-badc-1e15cfc72befn%40googlegroups.com.


Re: [weewx-user] Re: Merge database failed

2022-04-24 Thread Schnidrig Stefan
Hello Vince Many thanks for your response. I moved my old weewx.sdb to the new weewx version and then created it in the new format with "wee_database weewx.conf --reconfigure". Unfortunately, the "sunshine_hours" was deleted in the process. Can I somehow transfer these to the new scheme? Greeting



-- 
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/98443152-C44D-644F-A2E3-497322D3C5B7%40hxcore.ol.


Re: [weewx-user] WeeWX V4.8.0 available

2022-04-24 Thread matthew wall
the suse and rhel/centos repos have been updated with 4.8.0-2.  this fixes 
the systemd unit file for weewx. the raw rpms are now available in the 
download area.

-- 
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/a6623d9b-4b00-45d9-8376-94b8c26b3990n%40googlegroups.com.


[weewx-user] Re: Merge database failed

2022-04-24 Thread vince
v4 shipped with the wview_extended schema as the default, which has 114 
fields.   You need to convert your old db to the extended schema, then redo 
your dump and import commands (which look good).

See 
if 
https://github.com/weewx/weewx/wiki/Switching-to-the-new-wview_extended-schema 
helps any.

The important step is the "wee_database weewx.conf --reconfigure" command 
in the wiki page.  You can likely just run that command versus a 'copy' of 
your v3 database if you run it on your v4 system which already has a 
weewx.conf file set to the newer/bigger schema.

Always work off a copy of your databases just in case.  The procedure can 
take a while on a slow system like a pi if you have many years of data, as 
can the --rebuild-daily you need to do at the end after you merge the two 
archive tables.

On Sunday, April 24, 2022 at 8:09:19 AM UTC-7 Meteo Oberwallis wrote:

> Hello, everyone.
> I wanted to merge my old weewx.sbd (Version 3.9.2) with the new version of 
> weewx 4.8.0. I did this via:
> Dump the db1.sdb database to a file:
>
> $sqlite3 /path/to/db1.sdb
> sqlite> .output /var/tmp/db1.dump
> sqlite> .dump
> sqlite> .quit
>
> Now import the dumped data into the final database weewx.sdb:
>
> $ sqlite3 /home/weewx/archive/weewx.sdb
> sqlite> .read /var/tmp/db1.dump
> sqlite> .quit
>
> now I get the following error:
>
> Error: near line 333827: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333828: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333829: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333830: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333831: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333832: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333833: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333834: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333835: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333836: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333837: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333838: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333839: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333840: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333841: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333842: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333843: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333844: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333845: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333846: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333847: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333848: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333849: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333850: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333851: table archive has 114 columns but 53 values 
> ​​were supplied
> Error: near line 333852: table archive has 114 columns but 53 values 
> ​​were supplied
>
> Why could that be. The database was previously with
> [data bindings]
> 
> [[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_sqlite
> # 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
> schema = user.radiationhours.schema_with_sunshine_hours
>
> thank you for your help

-- 
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/87e44d79-ab1b-4dd9-a79c-16165823bb4an%40googlegroups.com.


[weewx-user] Merge database failed

2022-04-24 Thread Meteo Oberwallis
Hello, everyone.
I wanted to merge my old weewx.sbd (Version 3.9.2) with the new version of 
weewx 4.8.0. I did this via:
Dump the db1.sdb database to a file:

$sqlite3 /path/to/db1.sdb
sqlite> .output /var/tmp/db1.dump
sqlite> .dump
sqlite> .quit

Now import the dumped data into the final database weewx.sdb:

$ sqlite3 /home/weewx/archive/weewx.sdb
sqlite> .read /var/tmp/db1.dump
sqlite> .quit

now I get the following error:

Error: near line 333827: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333828: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333829: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333830: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333831: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333832: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333833: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333834: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333835: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333836: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333837: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333838: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333839: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333840: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333841: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333842: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333843: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333844: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333845: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333846: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333847: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333848: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333849: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333850: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333851: table archive has 114 columns but 53 values ​​were 
supplied
Error: near line 333852: table archive has 114 columns but 53 values ​​were 
supplied

Why could that be. The database was previously with
[data bindings]

[[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_sqlite
# 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
schema = user.radiationhours.schema_with_sunshine_hours

thank you for your help

-- 
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/af520b1a-83b8-4fa1-9073-6ad50a3da507n%40googlegroups.com.