Estaciones Meteoclimatic > Envío de datos a Meteoclimatic

Utilidad para subir datos a Meteoclimatic con Linux

<< < (12/43) > >>

jantoni:
Si, el tema de los permisos es uno de los escollos a "sufrir" por los usuarios de plataforma Microsoft.

Pero nada que no se soluciones en 20 o 30 años de práctica ;D ;D ;D ;D

burgati:
Hola, estoy intentando poner a funcionar la utilidad de subida de datos de linux pero no lo acabo de conseguir, creo que es por algún pequeño detalle de ubicacion de archivos o plantilla en los diferentes directorios...os paso como lo tengo configurado todo vía imagen para a ver si os da al ojo algo:

1º) he descargado la utilidad pra el envío de datos y los archivos les he descomprimido y llevado a /home/pi:

Sin título by david nuño, en Flickr

2º) he modificado con sudo nano meteoclimatic.ini, y lo he dejado pues con el codigo de mi estacion y mi sig, así:

[Global]
Stations=ESCYL0900000009001D
DigestKey=

[ESCYL0900000009001D]
Path=/var/www/weewx/meteoclimatic.htm
Password=b2...........................................e7
StationVendor=Davis
StationModel=Vantage Vue

3º) he hecho sudo nano meteoclimatic.sh y lo he dejado así, creo que igual que en el hilo:

#!/bin/bash
cd /root/meteoclimatic
#Si no quieres log
php meteoclimatic_http.php.old
#Si quieres log
#php meteoclimatic_http.php.old >> /var/log/meteoclimatic.log
exit

4º) sudo nano etc /contrab, me queda como sigue:

# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user   command
17 *   * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6   * * *   root   test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6   * * 7   root   test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6   1 * *   root   test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#

# Copia de seguridad de Weewx en disco de red
#57 23   * * *   root   /etc/weewx/backup

# Enví­a datos a Meteoclimatic cada 15 minutos, empezando en el minuto 2 de cada hora
2-59/15 *   * * *   root    /root/meteoclimatic/meteoclimatic.sh


Luego en /var/www/weewx/....... tengo la plantilla; y esta tal cual copiada de la pagina de meteoclimatic cambiando mi cod y mi sig:

*VER=DATA2
*COD=ESCYL0900000009001D
*SIG=b.....................................e7
*UPD=$current.dateTime.format("%d-%m-%Y %H:%M")
*TMP=$current.outTemp.formatted
*WND=$current.windSpeed.formatted
*AZI=$current.windDir.formatted
*BAR=$current.barometer.formatted
*HUM=$current.outHumidity.formatted
*SUN=$current.radiation.formatted
*UVI=$current.UV.formatted
*DHTM=$day.outTemp.max.formatted
*DLTM=$day.outTemp.min.formatted
*DHHM=$day.outHumidity.max.formatted
*DLHM=$day.outHumidity.min.formatted
*DHBR=$day.barometer.max.formatted
*DLBR=$day.barometer.min.formatted
*DGST=$day.windGust.max.formatted
*DSUN=$day.radiation.max.formatted
*DHUV=$day.UV.max.formatted
*DPCP=$day.rain.sum.formatted
*WRUN=
*MHTM=$month.outTemp.max.formatted
*MLTM=$month.outTemp.min.formatted
*MHHM=$month.outHumidity.max.formatted
*MLHM=$month.outHumidity.min.formatted
*MHBR=$month.barometer.max.formatted
*MLBR=$month.barometer.min.formatted
*MGST=$month.windGust.max.formatted
*MSUN=$month.radiation.max.formatted
*MHUV=$month.UV.max.formatted
*MPCP=$month.rain.sum.formatted
*YHTM=$year.outTemp.max.formatted
*YLTM=$year.outTemp.min.formatted
*YHHM=$year.outHumidity.max.formatted
*YLHM=$year.outHumidity.min.formatted
*YHBR=$year.barometer.max.formatted
*YLBR=$year.barometer.min.formatted
*YGST=$year.windGust.max.formatted
*YSUN=$year.radiation.max.formatted
*YHUV=$year.UV.max.formatted
*YPCP=$year.rain.sum.formatted
*EOT*


la plantilla esta debería estar ahí o en etc/weewx/skins/Standard ????


Por último dejo los últimos reportes del log de ayer noche:

Jun  7 00:57:53 raspberrypi weewx[2147]: engine: Using configuration file /etc/weewx/weewx.conf
Jun  7 00:57:53 raspberrypi weewx[2147]: engine: Loading station type Simulator (weewx.drivers.simulator)
Jun  7 00:57:53 raspberrypi weewx[2147]: engine: StdConvert target unit is 0x10
Jun  7 00:57:53 raspberrypi weewx[2147]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware
Jun  7 00:57:53 raspberrypi weewx[2147]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Jun  7 00:57:53 raspberrypi weewx[2147]: engine: Archive will use data binding wx_binding
Jun  7 00:57:53 raspberrypi weewx[2147]: engine: Record generation will be attempted in 'hardware'
Jun  7 00:57:53 raspberrypi weewx[2147]: engine: Using archive interval of 300 seconds (specified in weewx configuration)
Jun  7 00:57:53 raspberrypi weewx[2147]: engine: Using binding 'wx_binding' to database 'weewx.sdb'
Jun  7 00:57:53 raspberrypi weewx[2147]: manager: Starting backfill of daily summaries
Jun  7 00:57:53 raspberrypi weewx[2147]: restx: StationRegistry: Registration not requested.
Jun  7 00:57:53 raspberrypi weewx[2147]: restx: Wunderground: Posting not enabled.
Jun  7 00:57:53 raspberrypi weewx[2147]: restx: PWSweather: Posting not enabled.
Jun  7 00:57:53 raspberrypi weewx[2147]: restx: CWOP: Posting not enabled.
Jun  7 00:57:53 raspberrypi weewx[2147]: restx: WOW: Posting not enabled.
Jun  7 00:57:53 raspberrypi weewx[2147]: restx: AWEKAS: Posting not enabled.
Jun  7 00:57:53 raspberrypi weewx[2147]: engine: Starting up weewx version 3.7.1
Jun  7 00:57:53 raspberrypi weewx[2147]: engine: Clock error is -0.26 seconds (positive is fast)
Jun  7 00:57:53 raspberrypi weewx[2147]: engine: Starting main packet loop.
Jun  7 01:00:15 raspberrypi weewx[2147]: engine: Caught unrecoverable exception in engine:
Jun  7 01:00:15 raspberrypi weewx[2147]:     ****  Unit system of incoming record (0x10) differs from 'archive' table in 'weewx.sdb' database (0x01)
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****  Traceback (most recent call last):
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/engine.py", line 871, in main
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      engine.run()
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/engine.py", line 201, in run
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/engine.py", line 223, in dispatchEvent
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      callback(event)
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/engine.py", line 569, in post_loop
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      self._software_catchup()
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/engine.py", line 633, in _software_catchup
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, record=record, origin='software'))
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/engine.py", line 223, in dispatchEvent
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      callback(event)
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/engine.py", line 588, in new_archive_record
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      dbmanager.addRecord(event.record, accumulator=self.old_accumulator)
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/manager.py", line 242, in addRecord
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      self._updateHiLo(accumulator, cursor)
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1200, in _updateHiLo
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      self._set_day_summary(_stats_dict, accumulator.timespan.stop, cursor)
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/manager.py", line 1515, in _set_day_summary
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      self._check_unit_system(day_accum.unit_system)
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****    File "/usr/share/weewx/weewx/manager.py", line 656, in _check_unit_system
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****      self.std_unit_system))
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****  UnitError: Unit system of incoming record (0x10) differs from 'archive' table in 'weewx.sdb' database (0x01)
Jun  7 01:00:16 raspberrypi weewx[2147]:     ****  Exiting.


A ver si me podéis echar un cable, gracias





jmviper:
Hola burgati

En meteoclimatic.ini debes de poner dónde tienes la plantilla meteoclimatic.htm. Si la ruta que le tienes puesta es como pones Path=/var/www/weewx/meteoclimatic.htm la plantilla la debes de tener en esa carpeta.

En segundo lugar si no se envía la plantilla se crea el log para ver qué es lo que puede fallar. Para ello edita el archivo meteoclimatic.sh para que quede así:

#!/bin/bash
cd /root/meteoclimatic
#Si no quieres log
#php meteoclimatic_http.php.old
#Si quieres log
php meteoclimatic_http.php.old >> /var/log/meteoclimatic.log
exit


o sea comentando la línea que ejecuta el script sin log y descomentando la que lo crea.

Entonces ya podrás ir a /var/log/meteoclimatic.log a ver qué es lo que puede fallar.

burgati:

--- Cita de: jmviper en 07 de Junio de 2017, 12:51:40 ---

#!/bin/bash
cd /root/meteoclimatic
#Si no quieres log
#php meteoclimatic_http.php.old
#Si quieres log
php meteoclimatic_http.php.old >> /var/log/meteoclimatic.log
exit


o sea comentando la línea que ejecuta el script sin log y descomentando la que lo crea.

Entonces ya podrás ir a /var/log/meteoclimatic.log a ver qué es lo que puede fallar.

--- Fin de la cita ---

hola.....pues a que te refieres en lo de comentar o descomentar, quitar la almuhadilla a algo????: en princio yo lo tenía puesto tal cual lo has puesto tu en este post:

f by david nuño, en Flickr

Soy nuevo en esto de linux y hay muchas cosas que se me escapan

jmviper:
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.

Navegación

[0] Índice de Mensajes

[#] Página Siguiente

[*] Página Anterior

Ir a la versión completa