Software > WeeWX
Descripción de weewx.conf
jantoni:
Esto es una introducción al fichero de configuración
En ningún momento pretende ser una guía eshaustiva
Si quieres profundizar acude al manual de usuario y al manual de personalización
Dado que he manifestado que no voy a crear más imágenes para WeeWX y Raspberry, empiezo a describir con todo el detalle que permiten lo poco que sé. WeeWX puede hacer mucho, pero muchísimo más de lo que yo he explicado hasta ahora.
Empezamos con la descripción del fichero de configuración general de WeeWX, es decir weewx.conf
Este fichero suele estar en el directorio /etc/weewx
jantoni:
Este es el encabezamiento del fichero.
Por lo general, no se toca, salvo que tengamos problemas.
--- Código: ---# $Id: weewx.conf 2901 2015-02-05 21:15:03Z tkeffer $
#
# WEEWX CONFIGURATION FILE
#
# Copyright (c) 2009-2014 Tom Keffer <tkeffer@gmail.com>
# See the file LICENSE.txt for your full rights.
##############################################################################
# This section is for general configuration information
# Set to 1 for extra debug info, otherwise comment it out or set to zero.
debug = 0
# Root directory of the weewx data file hierarchy for this station.
WEEWX_ROOT = /
# How long to wait before timing out a socket (FTP, HTTP) connection:
socket_timeout = 20
# Do not modify this - it is used by setup.py when installing and updating.
version = 3.1.0
##############################################################################
--- Fin del código ---
debug = 0 El nivel de información y errores en el log es el estándar.
debug = 1 La cantidad de información de los procesos y los errores será intensiva. Ojo, los ficheros de log pueden adquirir tamaños considerables
El resto de valores no deben tocarse, salvo que realmente sepas lo que estás haciendo.
Esta es la sección más corta de todas[/list]
jantoni:
A continuación vamos a ver la sección donde decimos a Weewx que tipo de estación meteorológica va a manejar y algunos datos importantes.
Esta sección es sencilla y cortita.
--- Código: ---##############################################################################
[Station]
# This section is for information about your station
# Description of the station location.
location = Rivas-Vaciamadrid
# 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 = Vantage
# If you have a website, you may specify an URL
station_url = http://www.jantoni.es/weewx2
# 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
##############################################################################
--- Fin del código ---
location = Rivas-Vaciamadrid Evidentemente es la descripción de donde está ubicada la estación
latitude = 40.3562475 La latitud de la ubicación en grados decimales.
longitude = -3.5201664 La longitud de la ubicación en grados decimales. Este es positivo, Oeste es negativo
altitude = 630, meter Indicamos la altura DE LA CONSOLA y la unidad de medida (meter o feet) en metros o pies
station_type = Vantage Indicamos que clase de estación usamos dentro de las admitidas por Weewx. El nombre debe coincidir con alguna de ellas.
jantoni:
Esta es la sección de configuración de las estaciones Davis Vantage Pro2 y Davis Vantage Vue.
Esta sección es común para ambas y configura tanto los Weatherlink serie, los Weatherlink usb y los Weatherlink IP
--- Código: ---[Vantage]
# This section is for a Davis VantagePro2, VantageVue or WeatherLinkIP
# Connection type: serial or ethernet
# serial (the classic VantagePro)
# ethernet (the WeatherLinkIP)
type = serial
# If the connection type is serial, a port must be specified:
# Debian, Ubuntu, Redhat, Fedora, and SuSE:
# /dev/ttyUSB0 is a common USB port name
# /dev/ttyS0 is a common serial port name
# BSD:
# /dev/cuaU0 is a common serial port name
port = /dev/ttyAMA0
# port = /dev/ttyUSB0
# If the connection type is ethernet, an IP Address/hostname is required:
host = 1.2.3.4
######################################################
# The rest of this section rarely needs any attention.
# You can safely leave it "as is."
######################################################
# Serial baud rate (usually 19200)
baudrate = 19200
# TCP port (when using the WeatherLinkIP)
tcp_port = 22222
# TCP send delay (when using the WeatherLinkIP):
tcp_send_delay = 1
# The id of your ISS station (usually 1)
iss_id = 1
# How long to wait for a response from the station before giving up (in
# seconds; must be greater than 2)
timeout = 5
# How long to wait before trying again (in seconds)
wait_before_retry = 1.2
# How many times to try before giving up:
max_tries = 4
# The driver to use:
driver = weewx.drivers.vantage
--- Fin del código ---
type = serial Pondremos serial para los WL serie y los WL USB, ya que este último, en realidad es solo un conversor.
type = ethernet Para los Weathelink IP
port = /dev/ttyUSB0 Esto será en la inmensa mayoría de los casos. En algunas ocasiones podrá ser otro número distinto de cero, porque nuestro ordenador detecte otro puerto Serie-USB.
Si usáis un ordenador que disponga de puerto RS232 y lo utilizáis para el WeatherLink Serie, debéis indicar el puerto. Por lo general será el /dev/ttyS0, /dev/ttyS1, etc, etc
Veis que en mi fichero aparece /dev/ttyAMA0. Ese es el puerto serie estándar de Raspberry PI (en los contactos del GPIO) que podrán usar directamente aquellos que tengan una consola Davis con firmware previo al 3.0, es decir, funciona sin datalogger.
Si tenéis dudas sobre cual es el puerto que tenéis que poner, podéis usar este comando:
--- Código: ---dmesg | grep tty*
--- Fin del código ---
Os aparecerán, además del ttyAMA0, que siempre está presente, los adaptadores serie que tengáis conectados, incluido el datalogger, con su numeración. Si el ordenador tiene puertos RS232 estándar, también aparecerán identificados.
host = 1.2.3.4 Aquí indicamos la dirección IP del Weatherlink-IP
Si la consola está en una ubicación remota, debéis poner la dirección IP pública de la ubicación donde esté instalada y abrir el puerto correspondiente del router remoto.
Como indica el fichero original de configuración, el resto de parámetros se cambia muy raras veces, y es mejor no tocarlos salvo que sepas lo que haces.
Quizás el único parámetro sea:
iss_id = 1 que identifica que ISS debe leer la consola. Salvo que tengáis varias Davis en la misma ubicación, lo normal es que siempre sea 1.
jantoni:
La siguiente sección que explicamos es la que controla las Oregon WMR88, WMR88A, WMR100, WMR100N,WMR180, WMR180A y WMRS200. OJO, OJO OJO......NO WMR200
--- Código: ---[WMR100]
# This section is for the Oregon Scientific WMR100
# The station model, e.g., WMR100, WMR100N, WMRS200
model = WMR100
# How long a wind record can be used to calculate wind chill (in seconds)
stale_wind = 30
# The driver to use:
driver = weewx.drivers.wmr100
--- Fin del código ---
Esta sección no se tocará prácticamente NUNCA, salvo el modelo de estación
model = WMR100 Es un texto. No tiene ninguna verificación. Unicamente se pone para identificar el tipo de estación en las páginas web generadas.
Navegación
[#] Página Siguiente
Ir a la versión completa