Re: [weewx-user] Re: Using Multiple MySQL databases

2022-09-14 Thread vince
On Wednesday, September 14, 2022 at 4:47:53 PM UTC-7 Seth Ratner wrote:

> But I also run various programs at home that reference the archive, and 
> they won't work when the WeeWx host has lost internet. 
>
So I need two copies of the archive available at all times, one for each 
> location. 
>

Still unclear why without knowing what you're running at the non-weewx 
site.   Can you run that on the weewx host and upload the results to home 
occasionally ?   Does the non-weewx site need to be totally up to date 
always ? Is your internet 'slow' in terms of bandwidth or just unstable ?

You're jumping to a solution but not really explaining the problem(s) and 
why you have a split setup.

-- 
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/90c586be-6aad-4a57-b559-d97811032a4cn%40googlegroups.com.


Re: [weewx-user] Re: Using Multiple MySQL databases

2022-09-14 Thread p q
https://stackoverflow.com/questions/16032825/method-to-replicate-sqlite-database-across-multiple-servers


On Wed, Sep 14, 2022 at 4:47 PM Seth Ratner  wrote:

> My Weewx is somewhere with a pretty terrible internet connection.
> Disconnects a lot. So I need a database on the WeeWx host, or I'd lose a
> ton of intervals. But I also run various programs at home that reference
> the archive, and they won't work when the WeeWx host has lost internet.
>
> So I need two copies of the archive available at all times, one for each
> location.
>
> I use mariabackup, however that doesn't clone the database so much as
> package it. It needs to be extracted to be used, and that would be
> impractical to do every 5-10 minutes. There might be a way to mirror a
> database (without querying the entire db each time), but I don't know it.
> I'm open to ideas, and I really appreciate everyone taking the time to
> respond.
>
> Thanks
>
> On Wed, Sep 14, 2022 at 6:01 PM vince  wrote:
>
>> On Wednesday, September 14, 2022 at 3:50:16 PM UTC-7 Seth Ratner wrote:
>>
>>> That's an option, though I would want the databases to be mirrored +/-
>>> one or two archive intervals, and that might get messy with mariabackup. I
>>> have some services that will run at another location (Home Server) using
>>> the archive data, but due to a bad internet connection I can't rely on
>>> accessing the database on the Weewx computer (Farm) directly.
>>>
>>>
>> Not understanding the 'why' at all on this one...but perhaps MQTT might
>> be one possibility.  Publish from the weewx site and subscribe on the other
>> site.
>>
>>
>>> Separately, could you point me to any documentation on the AQI and
>>> forecast databases in WeeWX? I'd like to go down that rabbithole a bit.
>>>
>>>
>> There are no such things in core weewx.  You have to pick your
>> extension(s) of choice and check out the code, or alternately spin up a
>> simulator VM and add them to a throwaway instance of weewx perhaps...
>>
>>
>> --
>> 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/PPGSbaoX_ns/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/92149663-4379-405c-b29f-f62efca19362n%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/CAHTssjNabT8X%2B304Nv9Dv1mGTbaArgnXRsiz%2B66CdjEZ%3DHMw5A%40mail.gmail.com
> 
> .
>


-- 
Peter Quinn
(415)794-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/CAA1SM228n_8F2Vw3XWdVJmh-j0hO%2BqGe1VXLi%3DBDjXRkkhGqKg%40mail.gmail.com.


Re: [weewx-user] Re: Using Multiple MySQL databases

2022-09-14 Thread Seth Ratner
My Weewx is somewhere with a pretty terrible internet connection.
Disconnects a lot. So I need a database on the WeeWx host, or I'd lose a
ton of intervals. But I also run various programs at home that reference
the archive, and they won't work when the WeeWx host has lost internet.

So I need two copies of the archive available at all times, one for each
location.

I use mariabackup, however that doesn't clone the database so much as
package it. It needs to be extracted to be used, and that would be
impractical to do every 5-10 minutes. There might be a way to mirror a
database (without querying the entire db each time), but I don't know it.
I'm open to ideas, and I really appreciate everyone taking the time to
respond.

Thanks

On Wed, Sep 14, 2022 at 6:01 PM vince  wrote:

> On Wednesday, September 14, 2022 at 3:50:16 PM UTC-7 Seth Ratner wrote:
>
>> That's an option, though I would want the databases to be mirrored +/-
>> one or two archive intervals, and that might get messy with mariabackup. I
>> have some services that will run at another location (Home Server) using
>> the archive data, but due to a bad internet connection I can't rely on
>> accessing the database on the Weewx computer (Farm) directly.
>>
>>
> Not understanding the 'why' at all on this one...but perhaps MQTT might be
> one possibility.  Publish from the weewx site and subscribe on the other
> site.
>
>
>> Separately, could you point me to any documentation on the AQI and
>> forecast databases in WeeWX? I'd like to go down that rabbithole a bit.
>>
>>
> There are no such things in core weewx.  You have to pick your
> extension(s) of choice and check out the code, or alternately spin up a
> simulator VM and add them to a throwaway instance of weewx perhaps...
>
>
> --
> 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/PPGSbaoX_ns/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/92149663-4379-405c-b29f-f62efca19362n%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/CAHTssjNabT8X%2B304Nv9Dv1mGTbaArgnXRsiz%2B66CdjEZ%3DHMw5A%40mail.gmail.com.


Re: [weewx-user] Re: Using Multiple MySQL databases

2022-09-14 Thread vince
On Wednesday, September 14, 2022 at 3:50:16 PM UTC-7 Seth Ratner wrote:

> That's an option, though I would want the databases to be mirrored +/- one 
> or two archive intervals, and that might get messy with mariabackup. I have 
> some services that will run at another location (Home Server) using the 
> archive data, but due to a bad internet connection I can't rely on 
> accessing the database on the Weewx computer (Farm) directly. 
>
>
Not understanding the 'why' at all on this one...but perhaps MQTT might be 
one possibility.  Publish from the weewx site and subscribe on the other 
site.
 

> Separately, could you point me to any documentation on the AQI and 
> forecast databases in WeeWX? I'd like to go down that rabbithole a bit.
>
>
There are no such things in core weewx.  You have to pick your extension(s) 
of choice and check out the code, or alternately spin up a simulator VM and 
add them to a throwaway instance of weewx perhaps...


-- 
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/92149663-4379-405c-b29f-f62efca19362n%40googlegroups.com.


Re: [weewx-user] Re: Using Multiple MySQL databases

2022-09-14 Thread Seth Ratner
That's an option, though I would want the databases to be mirrored +/- one 
or two archive intervals, and that might get messy with mariabackup. I have 
some services that will run at another location (Home Server) using the 
archive data, but due to a bad internet connection I can't rely on 
accessing the database on the Weewx computer (Farm) directly. 

I was thinking the local db would use SQLite which reduces the load on the 
Rasperry Pi Zero, and MySQL for the remote db. 

Perhaps there is a simple way to mirror the two separated databases?

Separately, could you point me to any documentation on the AQI and forecast 
databases in WeeWX? I'd like to go down that rabbithole a bit.

Cheers,
Seth
On Wednesday, September 14, 2022 at 5:16:02 PM UTC-5 do...@dougjenkins.com 
wrote:

> I am not understanding the use case. If you are running MySQL both locally 
> and remotely for the archive, why don't you just replicate the local MySQL 
> instance to the remote on a schedule?
>
> I run multiple weewx databases (aqi, forecast, archive) on mariadb and 
> just back it up daily to my NAS. If I needed a remote db, I would just 
> restore my backup on a separate instance.
>
> On Wed, Sep 14, 2022, 5:51 PM Seth Ratner  wrote:
>
>>
>> Looks like I can just add another binding in [DataBingings], but in 
>> [StdArchive] I'm not sure I can have two archive processes run.
>>
>> I think these sections are all fine.
>>
>> [DataBindings]
>> [[wx_binding]]
>> database = archive_mysql
>> table_name = archive
>> manager = weewx.manager.DaySummaryManager
>> schema = schemas.wview_extended.schema
>> [[backup_binding]]
>> database = archive_backup
>> table_name = archive
>> manager = weewx.manager.DaySummaryManager
>> schema = schemas.wview_extended.schema
>>
>> ##
>> [Databases]
>>
>> [[archive_sqlite]]
>> database_name = weewx.sdb
>> database_type = SQLite
>>
>> # MySQL
>> [[archive_mysql]]
>> database_name = weewx
>> database_type = MySQL
>>
>> [[archive_backup]]
>> database_name = weewx
>> database_type = MySQL2
>>
>> ##
>>
>> #   This section defines defaults for the different types of databases.
>>
>> [DatabaseTypes]
>>
>> [[SQLite]]
>> driver = weedb.sqlite
>> # Directory in which the database files are located
>> SQLITE_ROOT = /var/lib/weewx
>>
>> # Defaults for MySQL databases
>> [[MySQL]]
>> driver = weedb.mysql
>> host = localhost
>> user = weewx
>> password = gt9drSvlB3ImZGS
>>
>> [[MySQL2]]
>> driver = weedb.mysql
>> host = 192.168.30.110
>> user = weewx
>> password = test
>>
>>
>> But the [StdArchive] section only accepts one binding as far as I can 
>> tell:
>>
>>
>> [StdArchive]
>> archive_interval = 300
>> record_generation = software
>> loop_hilo = True
>> data_binding = wx_binding  *<-- This is where I think I would 
>> need to be able to list two bindings... right?*
>> log_success = True
>> log_failure = True
>> On Wednesday, September 14, 2022 at 4:38:38 PM UTC-5 Seth Ratner wrote:
>>
>>> Simple concept, but I'd like to use one local and one network db. 
>>> Poosible?
>>>
>>> Seems easy enough to add the second database to the config, but I don't 
>>> know if [DataBindings] can accept the second database. 
>>>
>>> Anyone tried this?
>>>
>>> Seth
>>>
>>>
>>> -- 
>> 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/34a25b20-3d32-485d-a1e8-e627dcb712a0n%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/809553d1-97ce-4e0e-bbfd-bdb875a7bf5cn%40googlegroups.com.


Re: [weewx-user] Re: Using Multiple MySQL databases

2022-09-14 Thread Doug Jenkins
I am not understanding the use case. If you are running MySQL both locally
and remotely for the archive, why don't you just replicate the local MySQL
instance to the remote on a schedule?

I run multiple weewx databases (aqi, forecast, archive) on mariadb and just
back it up daily to my NAS. If I needed a remote db, I would just restore
my backup on a separate instance.

On Wed, Sep 14, 2022, 5:51 PM Seth Ratner  wrote:

>
> Looks like I can just add another binding in [DataBingings], but in
> [StdArchive] I'm not sure I can have two archive processes run.
>
> I think these sections are all fine.
>
> [DataBindings]
> [[wx_binding]]
> database = archive_mysql
> table_name = archive
> manager = weewx.manager.DaySummaryManager
> schema = schemas.wview_extended.schema
> [[backup_binding]]
> database = archive_backup
> table_name = archive
> manager = weewx.manager.DaySummaryManager
> schema = schemas.wview_extended.schema
>
> ##
> [Databases]
>
> [[archive_sqlite]]
> database_name = weewx.sdb
> database_type = SQLite
>
> # MySQL
> [[archive_mysql]]
> database_name = weewx
> database_type = MySQL
>
> [[archive_backup]]
> database_name = weewx
> database_type = MySQL2
>
> ##
>
> #   This section defines defaults for the different types of databases.
>
> [DatabaseTypes]
>
> [[SQLite]]
> driver = weedb.sqlite
> # Directory in which the database files are located
> SQLITE_ROOT = /var/lib/weewx
>
> # Defaults for MySQL databases
> [[MySQL]]
> driver = weedb.mysql
> host = localhost
> user = weewx
> password = gt9drSvlB3ImZGS
>
> [[MySQL2]]
> driver = weedb.mysql
> host = 192.168.30.110
> user = weewx
> password = test
>
>
> But the [StdArchive] section only accepts one binding as far as I can tell:
>
>
> [StdArchive]
> archive_interval = 300
> record_generation = software
> loop_hilo = True
> data_binding = wx_binding  *<-- This is where I think I would
> need to be able to list two bindings... right?*
> log_success = True
> log_failure = True
> On Wednesday, September 14, 2022 at 4:38:38 PM UTC-5 Seth Ratner wrote:
>
>> Simple concept, but I'd like to use one local and one network db.
>> Poosible?
>>
>> Seems easy enough to add the second database to the config, but I don't
>> know if [DataBindings] can accept the second database.
>>
>> Anyone tried this?
>>
>> Seth
>>
>>
>> --
> 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/34a25b20-3d32-485d-a1e8-e627dcb712a0n%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/CACC0i0xp0UX-MKAoqwsqmrb1EBnTp%2BUx5gri3eXbSeL-8YLz8w%40mail.gmail.com.


[weewx-user] Re: Using Multiple MySQL databases

2022-09-14 Thread Seth Ratner

Looks like I can just add another binding in [DataBingings], but in 
[StdArchive] I'm not sure I can have two archive processes run.

I think these sections are all fine.

[DataBindings]
[[wx_binding]]
database = archive_mysql
table_name = archive
manager = weewx.manager.DaySummaryManager
schema = schemas.wview_extended.schema
[[backup_binding]]
database = archive_backup
table_name = archive
manager = weewx.manager.DaySummaryManager
schema = schemas.wview_extended.schema
##
[Databases]

[[archive_sqlite]]
database_name = weewx.sdb
database_type = SQLite

# MySQL
[[archive_mysql]]
database_name = weewx
database_type = MySQL

[[archive_backup]]
database_name = weewx
database_type = MySQL2
##

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

[DatabaseTypes]

[[SQLite]]
driver = weedb.sqlite
# Directory in which the database files are located
SQLITE_ROOT = /var/lib/weewx

# Defaults for MySQL databases
[[MySQL]]
driver = weedb.mysql
host = localhost
user = weewx
password = gt9drSvlB3ImZGS

[[MySQL2]]
driver = weedb.mysql
host = 192.168.30.110
user = weewx
password = test


But the [StdArchive] section only accepts one binding as far as I can tell:


[StdArchive]
archive_interval = 300
record_generation = software
loop_hilo = True
data_binding = wx_binding  *<-- This is where I think I would need 
to be able to list two bindings... right?*
log_success = True
log_failure = True
On Wednesday, September 14, 2022 at 4:38:38 PM UTC-5 Seth Ratner wrote:

> Simple concept, but I'd like to use one local and one network db. Poosible?
>
> Seems easy enough to add the second database to the config, but I don't 
> know if [DataBindings] can accept the second database. 
>
> Anyone tried this?
>
> Seth
>
>
>

-- 
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/34a25b20-3d32-485d-a1e8-e627dcb712a0n%40googlegroups.com.


[weewx-user] Using Multiple MySQL databases

2022-09-14 Thread Seth Ratner
Simple concept, but I'd like to use one local and one network db. Poosible?

Seems easy enough to add the second database to the config, but I don't 
know if [DataBindings] can accept the second database. 

Anyone tried this?

Seth


-- 
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/d2637e6a-f4d1-41e4-89e7-b6865ca9d3fen%40googlegroups.com.


[weewx-user] Re: Weewx and API Integration

2022-09-14 Thread 'Sebastian Eckelmann' via weewx-user
Thank you for the help, data is now being fetched, unfortunately the data 
is displayed incorrectly. It's probably just a small thing that I'm 
currently overlooking. Maybe someone else has a tip for me. Thanks

ton...@gmail.com schrieb am Mittwoch, 14. September 2022 um 14:28:30 UTC+2:

> AWEKAS API is described at 
> https://www.awekas.at/board/index.php?attachment/4815-awekas-station-api-v1-3-pdf/
>
> Op dinsdag 13 september 2022 om 22:35:06 UTC+2 schreef gjr80:
>
>> Hi,
>>
>> I am not aware of any utility that exists that can import Awekas data 
>> into WeeWX. The WeeWX utility wee_import 
>>  has the ability 
>> to import data via the WeatherUnderground API but not Awakes. That being 
>> said, the modular nature of wee_import means it would be relatively 
>> straightforward for you to adapt wee_import to import data from Awekas by 
>> writing a new Awekas capable front end. This would depend of course on the 
>> capabilities of the Awekas API.
>>
>> Gary
>> On Wednesday, 14 September 2022 at 05:17:47 UTC+10 
>> sebastian...@googlemail.com wrote:
>>
>>> Good evening, I use the weather station from Bresser 7 in 1 Clearview 
>>> and send the data to Awekas. Now I would like to download the data to Weewx 
>>> via API. Is there a possibility? Many 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/ff16b081-46de-44cd-abfc-791c1a55b1ecn%40googlegroups.com.


[weewx-user] Re: Weewx and API Integration

2022-09-14 Thread Ton vanN
AWEKAS API is described at 
https://www.awekas.at/board/index.php?attachment/4815-awekas-station-api-v1-3-pdf/

Op dinsdag 13 september 2022 om 22:35:06 UTC+2 schreef gjr80:

> Hi,
>
> I am not aware of any utility that exists that can import Awekas data into 
> WeeWX. The WeeWX utility wee_import 
>  has the ability 
> to import data via the WeatherUnderground API but not Awakes. That being 
> said, the modular nature of wee_import means it would be relatively 
> straightforward for you to adapt wee_import to import data from Awekas by 
> writing a new Awekas capable front end. This would depend of course on the 
> capabilities of the Awekas API.
>
> Gary
> On Wednesday, 14 September 2022 at 05:17:47 UTC+10 
> sebastian...@googlemail.com wrote:
>
>> Good evening, I use the weather station from Bresser 7 in 1 Clearview and 
>> send the data to Awekas. Now I would like to download the data to Weewx via 
>> API. Is there a possibility? Many 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/5744b25f-2d3a-421c-8fe7-aaa727299600n%40googlegroups.com.