and ich erstelle eine aktuelle Kopie der weewx_mysql mit
user.weewxwd3.WeeArchive,
#===============================================================================
# Class WeeArchive
#===============================================================================
class WeeArchive(weewx.engine.StdService):
""" Service to store Weewx-WEE specific archive data. """
def __init__(self, engine, config_dict):
super(WeeArchive, self).__init__(engine, config_dict)
# Extract our binding from the Weewx-WEE section of the config file. If
# it's missing, fill with a default
if 'WeewxArchive' in config_dict:
self.data_binding = config_dict['WeewxArchive'].get('data_binding',
'wee_binding')
else:
self.data_binding = 'wee_binding'
log.info("Weewx-Archive will use data binding %s", self.data_binding)
# setup our database if needed
self.setup_database(config_dict)
# bind ourselves to NEW_ARCHIVE_RECORD event
self.bind(weewx.NEW_ARCHIVE_RECORD, self.new_archive_record)
def new_archive_record(self, event):
"""Called when a new archive record has arrived. """
# get our manager
dbmanager = self.engine.db_binder.get_manager(self.data_binding)
# now put the record in the archive
dbmanager.addRecord(event.record)
def setup_database(self, config_dict):
"""Setup the main database archive"""
# This will create the database if it doesn't exist, then return an
# opened instance of the database manager.
dbmanager = self.engine.db_binder.get_manager(self.data_binding, initialize=
True) log.info("Weewx-Archive using binding '%s' to database '%s'", self.
data_binding, dbmanager.database_name)
Hartmut
<tr><td>VOC </td><td>$current.TVOC.ppb</td></tr> --> Ergebnis
VOC 12,653846 ohne ppb 19.07.2021 12:55:00
[email protected] schrieb am Montag, 19. Juli 2021 um 12:50:21 UTC+2:
> Hallo, es ist nicht die aller neuste Version von meiner Erweiterung von
> WEEWX,
>
> aber unter https://github.com/hes19073/hesweewx/blob/master/weewx.conf
>
> steht eine Version
>
> Das Ergebnis ist unter http://wetter.hes61.de/
>
> Es werden neben weewx_mysql noch 12 weitere Datentabellen von 3 RasPI und
> 2 BanaPI geliefert.
> mit einem PC Celeron 16MB-Ram und einem 1TB Raid 1 verarbeitet.
>
> Danke für das Verständnis und die sehr schnelle Antwort.
> Hartmut
>
> [email protected] schrieb am Montag, 19. Juli 2021 um 12:38:09 UTC+2:
>
>> [email protected] schrieb am Montag, 19. Juli 2021 um 12:32:51 UTC+2:
>>
>>> Hallo,
>>> und jetzt noch wenn es nicht zu vermessen,
>>> die Daten in eine eigene Datenbank.
>>> Hartmut
>>>
>>
>> Das muß mir mal einer erklären, wie es geht. Ich befürchte, WeeWX kann
>> nur in eine Datenbank schreiben, wenn ich das Kapitel [StdArchive] in
>> weewx.conf richtig interpretiere.
>>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/cc1b4d7b-873b-4811-8ffc-203a7bfc388fn%40googlegroups.com.