Software > WeeWX
Añadir sensor de rayos
jantoni:
Luego puedes jugar lo que quieras.
Por ejemplo, para no cargar el sistema, puedes hacer que el weewx que controla la GW1000 meta datos en la base de datos, pero que no genere ningún informe, ni página web ni nada. Solo irá recogiendo datos.
Y al weewx “principal” además de sus informes habituales, le programas que lea la base de datos del GW1000 y use los datos de los rayos.
Así lo estuve haciendo yo un tiempo con el detector de partículas PM2.5
ELX_CARRUS:
Buenos dias Jantoni, lo voy a intentar, la idea sería crear un usuario casa que seria el actual con el mismo nombre para las BD y el [StdReport]
HTML_ROOT = public_html/casa
...
y hacer uno nuevo que se llamaria rayos con una BD que se llamaria:
[Databases]
[[archive_sqlite]]
database_name = rayos.sdb
database_type = SQLite
[[archive_mysql]]
database_name = rayos
database_type = MySQL
Con el copiar:
For package installs:
sudo cp /etc/weewx/weewx.conf /etc/weewx/casa.conf
sudo cp /etc/weewx/weewx.conf /etc/weewx/rayos.conf
crearía dos ficheros literales del weewx.conf uno para cada instancia (casa.conf) y (rayos.conf)
después instalar el weewx multi con todo esto:
wget -P /var/tmp https://raw.githubusercontent.com/weewx/weewx/master/util/init.d/weewx-multi
sudo cp /var/tmp/weewx-multi /etc/init.d/weewx
sudo update-rc.d weewx defaults
echo 'WEEWX_INSTANCES="casa rayos"' | sudo tee /etc/default/weewx-multi
echo 'WEEWX_CFGDIR=/etc/weewx' | sudo tee -a /etc/default/weewx-multi
echo 'WEEWX_BINDIR=/usr/share/weewx' | sudo tee -a /etc/default/weewx-multi
dejaría el rayos sin ftp, sin generar web, y eliminaría todo lo referente a casa (davis-purpleair, etc)
La única duda por el momento es como reconfiguro el driver yo lo hago con el comando:
sudo wee_extension --reconfigure para asignar el driver correcto a cada instancia de weewx, pero no sé cómo diferenciarlas si fuese en dos máquinas distintas no está fácil, pero desde un terminal común como cambio el driver a cada instancia por separado?
Muchas gracias.
ELX_CARRUS:
Hola de nuevo, he conseguido que weewx reconozca el GW1000 como servicio adicional, además del WLL.
Lo he hecho de la siguiente forma:
Installation as a WeeWX service
(de la wiki)
Install WeeWX and configure it to use either the simulator or another driver of your choice.
Install the Ecowitt Gateway driver extension using the wee_extension utility as per Installation as a WeeWX driver at step 2 above.
Edit weewx.conf and under the [Engine] [[Services]] stanza add an entry user.gw1000.GatewayService to the data_services option. It should look something like:
[Engine]
[[Services]]
....
data_services = user.gw1000.GatewayService
y esto es como queda en weewx.conf este apartado:
Engine]
# The following section specifies which services should be run and in what order.
[[Services]]
prep_services = weewx.engine.StdTimeSynch
data_services = user.gw1000.GatewayService,
process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate, user.purpleair.PurpleAirMonitor, user.crt.CumulusRealTime, use>
xtype_services = weewx.wxxtypes.StdWXXTypes, weewx.wxxtypes.StdPressureCooker, weewx.wxxtypes.StdRainRater, weewx.wxxtypes.StdDelta
archive_services = weewx.engine.StdArchive
restful_services = weewx.restx.StdStationRegistry, weewx.restx.StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS, user.windguru.W>
report_services = weewx.engine.StdPrint, weewx.engine.StdReport
[PurpleAirMonitor]
data_binding = purpleair_binding
hostname = 192.168.1.22
port = 80
ademas se crea una configuracion para acumulator:
[Accumulator]
[[rainRate]]
extractor = max
# Start Ecowitt Gateway driver extractors
[[lightning_distance]]
extractor = last
[[lightning_strike_count]]
extractor = sum
[[lightningcount]]
extractor = last
[[lightning_last_det_time]]
extractor = last
[[wh57_bat]]
extractor = last
[[wh57_sig]]
extractor = last
Se guarda y se reinicia weewx y no da ningun error y aparentemente todo funciona.
extracto del log:
Jun 17 10:14:18 debian systemd[1]: Starting LSB: weewx weather system...
Jun 17 10:14:18 debian weewx[25440] INFO __main__: Initializing weewx version 4.8.0
Jun 17 10:14:18 debian weewx[25440] INFO __main__: Using Python 3.9.2 (default, Feb 28 2021, 17:03:44) #012[GCC 10.2.1 20210110]
Jun 17 10:14:18 debian weewx[25440] INFO __main__: Platform Linux-5.10.0-14-amd64-x86_64-with-glibc2.31
Jun 17 10:14:18 debian weewx[25440] INFO __main__: Locale is 'ca_ES.UTF-8'
Jun 17 10:14:18 debian weewx[25440] INFO __main__: Using configuration file /etc/weewx/weewx.conf
Jun 17 10:14:18 debian weewx[25440] INFO __main__: Debug is 0
Jun 17 10:14:18 debian weewx[25440] INFO __main__: PID file is /var/run/weewx.pid
Jun 17 10:14:18 debian weewx[25443] INFO weewx.engine: Loading station type WLLDriver (user.WLLDriver)
Jun 17 10:14:18 debian weewx[25429]: Starting weewx weather system: weewx.
Jun 17 10:14:18 debian systemd[1]: Started LSB: weewx weather system.
Jun 17 10:14:18 debian weewx[25443] INFO user.WLLDriver: Driver name is WLLDriver
Jun 17 10:14:18 debian weewx[25443] INFO user.WLLDriver: Driver version is 2020.12-1
Jun 17 10:14:18 debian weewx[25443] INFO user.WLLDriver: Polling interval set to 5
Jun 17 10:14:18 debian weewx[25443] INFO user.gw1000: GatewayService: version is 0.5.0b5
Jun 17 10:14:18 debian weewx[25443] INFO user.gw1000: GatewayService: GW1100 address is 192.168.1.94:45000
Jun 17 10:14:18 debian weewx[25443] INFO user.gw1000: GatewayService: poll interval is 20 seconds
Jun 17 10:14:18 debian weewx[25443] INFO user.gw1000: GatewayService: max age of API data to be used is 60 seconds
Jun 17 10:14:18 debian weewx[25443] INFO user.gw1000: Gw1000Service: lost contact will be logged every 21600 seconds
Jun 17 10:14:18 debian weewx[25443] INFO weewx.engine: StdConvert target unit is 0x1
Jun 17 10:14:18 debian weewx[25443] INFO weewx.wxservices: StdWXCalculate will use data binding wx_binding
Jun 17 10:14:18 debian weewx[25443] INFO user.purpleair: service version is 0.4
Jun 17 10:14:18 debian weewx[25443] INFO user.crt: service version is 0.21
Jun 17 10:14:18 debian weewx[25443] INFO user.crt: realtime txt output goes to /var/tmp/realtime.txt
Jun 17 10:14:18 debian weewx[25443] INFO user.crt: 'None' values will be displayed as NULL
Jun 17 10:14:18 debian weewx[25443] INFO user.crt: units will be displayed as METRIC
Jun 17 10:14:18 debian weewx[25443] INFO user.crt: zambretti forecast: False
Jun 17 10:14:18 debian weewx[25443] INFO user.crt: binding is loop
Jun 17 10:14:18 debian weewx[25443] INFO user.cwxn: service version is 0.5
Jun 17 10:14:18 debian weewx[25443] INFO user.cwxn: binding is loop
Jun 17 10:14:18 debian weewx[25443] INFO user.cwxn: output goes to /var/tmp/wxnow.txt
Jun 17 10:14:18 debian weewx[25443] INFO weewx.engine: Archive will use data binding wx_binding
Jun 17 10:14:18 debian weewx[25443] INFO weewx.engine: Record generation will be attempted in 'hardware'
Jun 17 10:14:18 debian weewx[25443] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
Jun 17 10:14:18 debian weewx[25443] INFO weewx.restx: StationRegistry: Registration not requested.
Jun 17 10:14:18 debian weewx[25443] INFO weewx.restx: Wunderground-PWS: Data for station IELCHE29 will be posted
Jun 17 10:14:18 debian weewx[25443] INFO weewx.restx: PWSWeather: Data for station IELXMETEO will be posted
Jun 17 10:14:18 debian weewx[25443] INFO weewx.restx: CWOP: Data for station FW8678 will be posted
Jun 17 10:14:18 debian weewx[25443] INFO weewx.restx: WOW: Posting not enabled.
Jun 17 10:14:18 debian weewx[25443] INFO weewx.restx: AWEKAS: Data will be uploaded for user ElxCarrus
Jun 17 10:14:18 debian weewx[25443] INFO user.windguru: service version is 0.2
Jun 17 10:14:18 debian weewx[25443] INFO user.windguru: Data will be uploaded for meteoelx
Jun 17 10:14:18 debian weewx[25443] INFO user.meteoservices: restx: Meteoservices: service version is 3.2
Jun 17 10:14:18 debian weewx[25443] INFO user.meteoservices: restx: Meteoservices: Data will be uploaded for station id X05CL23AKB
Jun 17 10:14:18 debian weewx[25443] INFO weewx.engine: 'pyephem' detected, extended almanac data is available
Jun 17 10:14:18 debian weewx[25443] INFO __main__: Starting up weewx version 4.8.0
Jun 17 10:14:18 debian weewx[25443] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Jun 17 10:14:18 debian weewx[25443] INFO weewx.manager: Starting backfill of daily summaries
Jun 17 10:14:18 debian weewx[25443] INFO weewx.manager: Daily summaries up to date
Jun 17 10:14:18 debian weewx[25443] INFO weewx.engine: Starting main packet loop.
Y asi queda ¿Creeis que funcionara?
muchas gracias
Bruno
jantoni:
Pues.....ni idea *+* *+* *+* *+* *+* *+*
Pero lo vamos a saber en breve, gracias a tu experiencia.
Y recuerda hacer copia de todo......y redundante.....copia de las configuraciones y hasta una copia de la tarjeta SD *-* *-* *-* *-*
ELX_CARRUS:
De momento la BD weewx.sdb está rellenando los datos con 00 cuando antes era NULL, lógico porque no hay rayos a la vista, pero todo sigue funcionando. A la plantilla de belchertown le he puesto un gráfico al final para que registre algo. Si funciona ya completare todas las plantillas, lo importante es que se están grabando los datos en la base datos.
Ha creado dos etiquetas:
[lightning_strike_count] y [lightning_distance]
A ver si funciona.
Lo tengo montado en https://meteoelx.com
Gracias
Bruno
Navegación
[#] Página Siguiente
[*] Página Anterior
Ir a la versión completa