Seite 1 von 1

Datenbank erweitern / add_ecowitt_data_v5.sh

Verfasst: 20 Jun 2025 12:46
von JoachimF
add_ecowitt_data_v5.sh

Code: Alles auswählen

#!/bin/bash
weectl database add-column co2_Temp --type=REAL -y
weectl database add-column co2_Hum --type=REAL -y
weectl database add-column co2_Batt --type=REAL -y
....

Code: Alles auswählen

If you don't work with the standard configuration (/etc/weewx/weewx.conf), you have to adjust the --config=/etc/weewx/weewx.conf entry accordingly.
Wie soll ich mir das vorstellen?

weectl database add-column co2_Temp --type=REAL -y
in
weectl database --config=/etc/weewx/weewx.conf add-column co2_Temp --type=REAL -y
und alle Zeile des Scripts so abändern?

Re: Datenbank erweitern / add_ecowitt_data_v5.sh

Verfasst: 20 Jun 2025 18:19
von Werner
Bei einer Standardinstallation "/etc/weewx/weewx.conf" ist es nicht notwendig
den --conf Parameter mit zu nutzen
Wenn jedoch die Weewx-Instanz z.B. /etc/weewx./weewx1.conf verwendet, ist dieser Parameter zwingend notwendig.

z.B. mit dieser Befehlszeile wird vpd unter Verwendung weewx6.conf zu desen dort verwendeten Datenbank hinzugefügt:

Code: Alles auswählen

weectl database add-column vpd --type=REAL --config=/etc/weewx/weewx6.conf -y
alle Zeile des Scripts so abändern?
In Deinem Fall nicht notwendig! Aber die Verwendung sollte möglich sein.