16
WeeWX / Re:Añadir sensor de rayos
« en: 17 de Junio del 2022, 10:28:33 am »
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
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