Autor Tema: Utilidad para subir datos a Meteoclimatic con Linux  (Leído 173892 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado burgati

  • Full Member
  • ***
  • Mensajes: 246
    • Ver Perfil
  • Estación: "Burgos-Plaza san Agustín- ESCYL0900000009001D"
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #60 en: 07 de Junio del 2017, 17:37:12 pm »
Las líneas comentadas son las que empiezan por la almohadilla #. Esas líneas no son ejecutadas.

Fíjate en lo que te he puesto, la línea php meteoclimatic_http.php.old >> /var/log/meteoclimatic.log no está comentada al principio y se ejecuta escribiendo en el log.

La anterior línea de #php meteoclimatic_http.php.old es la que está comentada para que no se ejecute ya que no crea el log.

ok...bueno pues lo dejé pues tal cual me lo pusiste:

tal cual by david nuño, en Flickr


Y el log de ahora, me temo que similar al que me salía anteriormente:

log1 by david nuño, en Flickr


pone no se qué de error en las unidades....no sé a que se referirá

Desconectado jmviper

  • Investigación
  • Hero Member
  • ******
  • Mensajes: 4.403
  • "Vortex Complex"
    • Ver Perfil
    • www.meteoarchena.es
  • Estación: Archena - ESMUR3000000030600B
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #61 en: 07 de Junio del 2017, 17:58:54 pm »
Estás mezclando cosas... una cosa es el log de subida de la plantilla que estará en /var/log/meteoclimatic.log y otra cosa el que pones de weewx.

Por lo que se ve weewx está intentando cargarse en modo Simulator. No tienes una Vue ?? Se te ha desconfigurado el archivo weewx.conf ??



Archena, Valle de Ricote (Murcia). 120 msnm. 19.622 hab.
Davis Vantage Pro2 Plus

www.meteoarchena.es

Desconectado burgati

  • Full Member
  • ***
  • Mensajes: 246
    • Ver Perfil
  • Estación: "Burgos-Plaza san Agustín- ESCYL0900000009001D"
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #62 en: 07 de Junio del 2017, 18:19:54 pm »
Estás mezclando cosas... una cosa es el log de subida de la plantilla que estará en /var/log/meteoclimatic.log y otra cosa el que pones de weewx.

Por lo que se ve weewx está intentando cargarse en modo Simulator. No tienes una Vue ?? Se te ha desconfigurado el archivo weewx.conf ??

vale...gracias por explicación.

A ver, entonces para empezar el archivo meteoclimatic.log no le tengo en esa ruta que me indicas:

ubicacion inexistente by david nuño, en Flickr


el único archivo con nombre meteoclimatic.log que tengo esta alojado en home/pi y es el que me descargué de la utilidad, dejo pantallazos con ubicacion y contenido de ese archivo:

meteoclimatic log ubicacion by david nuño, en Flickr


meteoclimatic log contrenido by david nuño, en Flickr


en cuanto al archivo weewx.conf, creo que está coirrecto:

[StdReport]
   
    # Where the skins reside, relative to WEEWX_ROOT
    SKIN_ROOT = /etc/weewx/skins
   
    # Where the generated reports should go, relative to WEEWX_ROOT
    HTML_ROOT = /var/www/html/weewx
   
    # The database binding indicates which data should be used in reports.
    data_binding = wx_binding
   
    # Each of the following subsections defines a report that will be run.
   
    [[StandardReport]]
        # See the customizing guide to change the units, plot types and line
        # colors, modify the fonts, display additional sensor data, and other
        # customizations. Many of those changes can be made here by overriding
        # parameters, or by modifying templates within the skin itself.
       
        # The StandardReport uses the 'Standard' skin, which contains the
        # images, templates and plots for the report.
        skin = Standard
        [[[Units]]]
            [[[[Groups]]]]
                group_altitude = meter
                group_speed2 = km_per_hour2
                group_pressure = hPa
                group_rain = mm
                group_rainrate = mm_per_hour
                group_temperature = degree_C
                group_degree_day = degree_C_day
                group_speed = km_per_hour
   
    [[FTP]]
        # FTP'ing the results to a webserver is treated as just another report,
        # albeit one with an unusual report generator!
        skin = Ftp
       
        # If you wish to use FTP, uncomment and fill out the next four lines.
        #user = replace with the ftp username
        #password = replace with the ftp password; put in quotes to guard against parsing errors.
        #server = replace with the ftp server name, e.g, www.threefools.org
        #path = replace with the ftp destination directory (e.g., /weather)
       
        # Set to True for an FTP over TLS (FTPS) connection. Not all servers
        # support this.
        secure_ftp = False
       
        # To upload files from something other than what HTML_ROOT is set
        # to above, specify a different HTML_ROOT here.
        #HTML_ROOT = /var/www/html/weewx
       
        # Most FTP servers use port 21
        port = 21
       
        # Set to 1 to use passive mode, zero for active mode
        passive = 1
   
    [[RSYNC]]
        # rsync'ing to a webserver is treated as just another report
        skin = Rsync
       
        # If you wish to use rsync, you must configure passwordless ssh using
        # public/private key authentication from the user account that weewx
        # runs as to the user account on the remote machine where the files
        # will be copied.
        #
        # The following three lines determine where files will be sent.
        #server = replace with the rsync server name, e.g, www.threefools.org
        #path = replace with the rsync destination directory (e.g., /weather)
        #user = replace with the rsync username
       
        # Rsync can be configured to remove files from the remote server if
        # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
        # make a mistake in the remote path, you could could unintentionally
        # cause unrelated files to be deleted. Set to 1 to enable remote file
        # deletion, zero to allow files to accumulate remotely.
        delete = 0

##############################################################################

#   This service acts as a filter, converting the unit system coming from
#   the hardware to a unit system in the database.

[StdConvert]
   
    # The target_unit affects only the unit system in the database. Once
    # chosen it cannot be changed without converting the entire database.
    # Modification of target_unit after starting weewx will result in
    # corrupt data - the database will contain a mix of US and METRIC data.
    #
    # The value of target_unit does not affect the unit system for
    # reporting - reports can display US, Metric, or any combination of units.
    #
    # In most cases, target_unit should be left as the default: US
    #
    # In particular, those migrating from a standard wview installation
    # should use US since that is what the wview database contains.
   
    # DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
    target_unit = METRIC    # Options are 'US', 'METRICWX', or 'METRIC'

##############################################################################

#   This section can adjust data using calibration expressions.

[StdCalibrate]
   
    [[Corrections]]
        # For each type, an arbitrary calibration expression can be given.
        # It should be in the units defined in the StdConvert section.
        # Example:
        foo = foo + 0.2

##############################################################################

#   This section is for quality control checks. If units are not specified,
#   values must be in the units defined in the StdConvert section.

[StdQC]
   
    [[MinMax]]
        barometer = 26, 32.5, inHg
        outTemp = -40, 120, degree_F
        inTemp = 10, 120, degree_F
        outHumidity = 0, 100
        inHumidity = 0, 100
        windSpeed = 0, 120, mile_per_hour
        pressure = 24, 34.5, inHg

##############################################################################

#   This section controls the origin of derived values.

[StdWXCalculate]
   
    [[Calculations]]
        # Derived quantities are calculated by this service. Possible values are:
        #  hardware        - use the value provided by hardware
        #  software        - use the value calculated by weewx
        #  prefer_hardware - use value provide by hardware if available,
        #                      otherwise use value calculated by weewx
       
        pressure = prefer_hardware
        barometer = prefer_hardware
        altimeter = prefer_hardware
        windchill = prefer_hardware
        heatindex = prefer_hardware
        dewpoint = prefer_hardware
        inDewpoint = prefer_hardware
        rainRate = prefer_hardware

##############################################################################

#   For hardware that supports it, this section controls how often the
#   onboard clock gets updated.

[StdTimeSynch]
   
    # How often to check the weather station clock for drift (in seconds)
    clock_check = 14400
   
    # How much it can drift before we will correct it (in seconds)
    max_drift = 5

##############################################################################

#   This section is for configuring the archive service.

[StdArchive]
   
    # If the station hardware supports data logging then the archive interval
    # will be downloaded from the station. Otherwise, specify it (in seconds).
    archive_interval = 300
   
    # If possible, new archive records are downloaded from the station
    # hardware. If the hardware does not support this, then new archive
    # records will be generated in software.
    # Set the following to "software" to force software record generation.
    record_generation = hardware
   
    # Whether to include LOOP data in hi/low statistics
    loop_hilo = True
   
    # The data binding used to save archive records
    data_binding = wx_binding

##############################################################################

#   This section binds a data store to a database.

[DataBindings]
   
    [[wx_binding]]
        # The database must match one of the sections in [Databases].
        # This is likely to be the only option you would want to change.
        database = archive_sqlite
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.wxmanager.WXDaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        schema = schemas.wview.schema

##############################################################################

#   This section defines various databases.

[Databases]
   
    # A SQLite database is simply a single file
    [[archive_sqlite]]
        database_type = SQLite
        database_name = weewx.sdb
   
    # MySQL
    [[archive_mysql]]
        database_type = MySQL
        database_name = weewx

##############################################################################

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

[DatabaseTypes]
   
    # Defaults for SQLite databases
    [[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
        # The host where the database is located
        host = localhost
        # The user name for logging in to the host
        user = weewx
        # The password for the user name. Put in quotes to guard against parsing errors.
        password = weewx

##############################################################################

#   This section configures the internal weewx engine.

[Engine]
   
    [[Services]]
        # This section specifies the services that should be run. They are
        # grouped by type, and the order of services within each group
        # determines the order in which the services will be run.
        prep_services = weewx.engine.StdTimeSynch
        data_services = ,
        process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate
        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
        report_services = weewx.engine.StdPrint, weewx.engine.StdReport


Desconectado jmviper

  • Investigación
  • Hero Member
  • ******
  • Mensajes: 4.403
  • "Vortex Complex"
    • Ver Perfil
    • www.meteoarchena.es
  • Estación: Archena - ESMUR3000000030600B
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #63 en: 07 de Junio del 2017, 18:27:07 pm »
Puedes poner la sección [Station] al principio del weewx.conf ?


Archena, Valle de Ricote (Murcia). 120 msnm. 19.622 hab.
Davis Vantage Pro2 Plus

www.meteoarchena.es

Desconectado burgati

  • Full Member
  • ***
  • Mensajes: 246
    • Ver Perfil
  • Estación: "Burgos-Plaza san Agustín- ESCYL0900000009001D"
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #64 en: 07 de Junio del 2017, 22:04:12 pm »
Puedes poner la sección [Station] al principio del weewx.conf ?


[Station]
   
    # Description of the station location
    location = "Madrid, España"
   
    # Latitude and longitude in decimal degrees
    latitude = 40.3562475
    longitude = -3.5201664
   
    # Altitude of the station, with unit it is in. This is downloaded from
    # from the station if the hardware supports it.
    altitude = 630, meter
   
    # Set to type of station hardware. There must be a corresponding stanza
    # in this file with a 'driver' parameter indicating the driver to be used.
    station_type = Simulator
   
    # If you have a website, you may specify an URL
    #station_url = http://www.example.com
   
    # The start of the rain year (1=January; 10=October, etc.). This is
    # downloaded from the station if the hardware supports it.
    rain_year_start = 1
   
    # Start of week (0=Monday, 6=Sunday)
    week_start = 0


está puesta la que me descargué no configurada con la mía.....estaría ahí el error o es intrascendente...

Desconectado jmviper

  • Investigación
  • Hero Member
  • ******
  • Mensajes: 4.403
  • "Vortex Complex"
    • Ver Perfil
    • www.meteoarchena.es
  • Estación: Archena - ESMUR3000000030600B
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #65 en: 07 de Junio del 2017, 22:18:13 pm »
Pues ahí tienes puesto station_type = Simulator y debe de poner station_type = Vantage

Tendrás que poner la configuración para la Davis o en modo Simulador no la va a leer. El modo simulador es mayormente para testear sensores.

Léete bien la configuración de weewx en la que está de ejemplo la Davis que puso jantoni en el foro:

http://forum.meteoclimatic.net/index.php/topic,42.msg163.html#msg163

O pon en esa sección la configuración que tenías anterior a la descargada como tú dices.


Archena, Valle de Ricote (Murcia). 120 msnm. 19.622 hab.
Davis Vantage Pro2 Plus

www.meteoarchena.es

Desconectado burgati

  • Full Member
  • ***
  • Mensajes: 246
    • Ver Perfil
  • Estación: "Burgos-Plaza san Agustín- ESCYL0900000009001D"
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #66 en: 08 de Junio del 2017, 00:37:49 am »
Pues ahí tienes puesto station_type = Simulator y debe de poner station_type = Vantage

Tendrás que poner la configuración para la Davis o en modo Simulador no la va a leer. El modo simulador es mayormente para testear sensores.

Léete bien la configuración de weewx en la que está de ejemplo la Davis que puso jantoni en el foro:

http://forum.meteoclimatic.net/index.php/topic,42.msg163.html#msg163

O pon en esa sección la configuración que tenías anterior a la descargada como tú dices.

Así es como lo tengo ahora:

#   This section is for information about the station.

[Station]
   
    # Description of the station location
    location = "Burgos, España"
   
    # Latitude and longitude in decimal degrees
    latitude = 40.3326550
    longitude = -3.6989043
   
    # Altitude of the station, with unit it is in. This is downloaded from
    # from the station if the hardware supports it.
    altitude = 890, meter
   
    # Set to type of station hardware. There must be a corresponding stanza
    # in this file with a 'driver' parameter indicating the driver to be used.
    station_type = Vantage
   
    # If you have a website, you may specify an URL
    #station_url = http://www.example.com
   
    # The start of the rain year (1=January; 10=October, etc.). This is
    # downloaded from the station if the hardware supports it.
    rain_year_start = 1
   
    # Start of week (0=Monday, 6=Sunday)
    week_start = 0




reinicio y el log me pone lo siguiente:

Jun  8 00:30:17 raspberrypi weewx[2137]: engine: Using configuration file /etc/weewx/weewx.conf
Jun  8 00:30:17 raspberrypi weewx[2137]: engine: Caught unrecoverable exception in engine:
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****  'Vantage'
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****  Traceback (most recent call last):
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****    File "/usr/share/weewx/weewx/engine.py", line 865, in main
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****      engine = engine_class(config_dict)
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****    File "/usr/share/weewx/weewx/engine.py", line 71, in __init__
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****      self.setupStation(config_dict)
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****    File "/usr/share/weewx/weewx/engine.py", line 89, in setupStation
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****      driver = config_dict[stationType]['driver']
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****    File "/usr/lib/python2.7/dist-packages/configobj.py", line 567, in __getitem__
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****      val = dict.__getitem__(self, key)
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****  KeyError: 'Vantage'
Jun  8 00:30:17 raspberrypi weewx[2137]:     ****  Exiting.



 :'(

Desconectado jmviper

  • Investigación
  • Hero Member
  • ******
  • Mensajes: 4.403
  • "Vortex Complex"
    • Ver Perfil
    • www.meteoarchena.es
  • Estación: Archena - ESMUR3000000030600B
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #67 en: 08 de Junio del 2017, 08:04:58 am »
No basta con poner station_type = Vantage debes de ponerle el driver a usar, la conexión serial el puerto etc etc en una sección llamada [Vantage]:

http://forum.meteoclimatic.net/index.php/topic,42.msg165.html#msg165

Para cambiar el driver se explica también en la wiki de weewx:

https://github.com/weewx/weewx/wiki/Change%20driver

No sé exactamente qué has hecho con el archivo weewx.conf pero parece que lo tienes desconfigurado.
Yo no tengo la weewx con la Davis sino en simulador con un sensirion sht35 y no te puedo decir exactamente cómo se configura con la Davis pero en los enlaces que he puesto anteriormente explica cómo hacerlo.

Si alguien que lo tenga con la Davis te puede echar una mano y si no te la echaré yo como buenamente pueda. Quedará en el foro para futuros casos parecidos.

Saludos

P.D. Lo mejor es que abrieses un nuevo hilo en el foro de weewx con tu problema.
« Última modificación: 08 de Junio del 2017, 08:06:54 am por jmviper »


Archena, Valle de Ricote (Murcia). 120 msnm. 19.622 hab.
Davis Vantage Pro2 Plus

www.meteoarchena.es

Desconectado burgati

  • Full Member
  • ***
  • Mensajes: 246
    • Ver Perfil
  • Estación: "Burgos-Plaza san Agustín- ESCYL0900000009001D"
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #68 en: 08 de Junio del 2017, 08:20:27 am »
No basta con poner station_type = Vantage debes de ponerle el driver a usar, la conexión serial el puerto etc etc en una sección llamada [Vantage]:

http://forum.meteoclimatic.net/index.php/topic,42.msg165.html#msg165

Para cambiar el driver se explica también en la wiki de weewx:

https://github.com/weewx/weewx/wiki/Change%20driver

No sé exactamente qué has hecho con el archivo weewx.conf pero parece que lo tienes desconfigurado.
Yo no tengo la weewx con la Davis sino en simulador con un sensirion sht35 y no te puedo decir exactamente cómo se configura con la Davis pero en los enlaces que he puesto anteriormente explica cómo hacerlo.

Si alguien que lo tenga con la Davis te puede echar una mano y si no te la echaré yo como buenamente pueda. Quedará en el foro para futuros casos parecidos.

Saludos

P.D. Lo mejor es que abrieses un nuevo hilo en el foro de weewx con tu problema.

esque directamente en weewx.conf me falta toda la sección [vantage].......una preguntilla, si empiezo a instalarlo todo desde cero, ¿no sería mas fácil?......

Desconectado jmviper

  • Investigación
  • Hero Member
  • ******
  • Mensajes: 4.403
  • "Vortex Complex"
    • Ver Perfil
    • www.meteoarchena.es
  • Estación: Archena - ESMUR3000000030600B
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #69 en: 08 de Junio del 2017, 08:35:55 am »
Es una posibilidad... yo de tí probaría a reconfigurar weewx primero parando weewx con sudo /etc/init.d/weewx stop y con sudo wee_config --reconfigure.



Archena, Valle de Ricote (Murcia). 120 msnm. 19.622 hab.
Davis Vantage Pro2 Plus

www.meteoarchena.es

Desconectado burgati

  • Full Member
  • ***
  • Mensajes: 246
    • Ver Perfil
  • Estación: "Burgos-Plaza san Agustín- ESCYL0900000009001D"
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #70 en: 08 de Junio del 2017, 08:42:42 am »
Es una posibilidad... yo de tí probaría a reconfigurar weewx primero parando weewx con sudo /etc/init.d/weewx stop y con sudo wee_config --reconfigure.

Muchas gracias jm , voy a probar a ver que pasa...logo te cuento


edito: Nada, me pone que la linea 409 tiene un error de sintaxis o no se qué........ empezaré de cero a ver que pasa porque esto es el cuento de nunca acabar.....muchas gracias por tu ayuda tan rápida. Salud
« Última modificación: 08 de Junio del 2017, 08:48:53 am por burgati »

Desconectado burgati

  • Full Member
  • ***
  • Mensajes: 246
    • Ver Perfil
  • Estación: "Burgos-Plaza san Agustín- ESCYL0900000009001D"
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #71 en: 15 de Julio del 2017, 09:38:18 am »
Ante la pérdida del antiguo foro, aquí os dejo la utilidad para subir datos a Meteoclimatic con Linux.

No es exactamente la original, ya que está modificada por mi.

Cuando podamos ir recuperando material del viejo, pondré el fichero original.

Donde está la utilidad se ha perdido???, creo que antes figuraba en el primer post

Desconectado Ubik

  • Administrator
  • Hero Member
  • ******
  • Mensajes: 1.995
    • Ver Perfil
  • Estación: Villavieja de Yeltes ESCYL3700000037260A
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #72 en: 15 de Julio del 2017, 15:37:46 pm »
Y ahí sigue, abajo del todo.
                         
Davis pro2+cumulus+W7+Lenovo
 
Web http://www.meteovillavieja.es

EA4TN

  • Visitante
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #73 en: 15 de Julio del 2017, 16:29:22 pm »
No, no.

No salen

Y si intentas adjuntar un fichero, tampoco sale la opción para ello

Desconectado Ubik

  • Administrator
  • Hero Member
  • ******
  • Mensajes: 1.995
    • Ver Perfil
  • Estación: Villavieja de Yeltes ESCYL3700000037260A
Re:Utilidad para subir datos a Meteoclimatic con Linux
« Respuesta #74 en: 15 de Julio del 2017, 21:22:59 pm »
Ok. revisamos de nuevo los permisos
                         
Davis pro2+cumulus+W7+Lenovo
 
Web http://www.meteovillavieja.es