sudo touch /boot/ssh
sudo nano /boot/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=ES
network={
ssid="ssiddelwifi"
psk="password de nuestro wifi"
key_mgmt=WPA-PSK
}
sudo cat /boot/wpa_supplicant.conf
uname -a
pi@raspberrypi:/etc/wpa_supplicant $ uname -a
Linux raspberrypi 5.10.17+ #1403 Mon Feb 22 11:26:13 GMT 2021 armv6l GNU/Linux
pi@raspberrypi:/etc/wpa_supplicant $
sudo poweroff
cd /boot
sudo ./install.sh
sudo reboot
ifconfig
pi@raspberrypi:/etc/wpa_supplicant $ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:5e:29:6e txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 6 bytes 570 (570.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 570 (570.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.120 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::6abd:ea0f:f3e4:20f0 prefixlen 64 scopeid 0x20<link>
ether e8:de:27:20:f1:63 txqueuelen 1000 (Ethernet)
RX packets 33574 bytes 18287494 (17.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1927 bytes 231114 (225.6 KiB)
TX errors 0 dropped 3 overruns 0 carrier 0 collisions 0
sudo raspi-config
sudo apt update
# Required
sudo apt install python3-configobj
sudo apt install python3-pil
sudo apt install python3-serial
sudo apt install python3-usb
sudo apt install python3-pip
# This works for most installations...
sudo apt install python3-cheetah
# ... if not, try this:
sudo pip3 install Cheetah3
# Optional: for extended almanac information
sudo apt install python3-ephem
# Required if you are using MySQL (MariaDB):
sudo apt install mariadb-client
sudo apt install python3-mysqldb
sudo apt update
sudo apt --yes upgrade
sudo apt install --yes python3-configobj python3-pil python3-serial python3-usb python3-pip python3-cheetah python3-ephem
sudo apt install --yes apache2 php7.3
sudo apt --yes install xrdp ntp libimagequant0 libjbig0 liblcms2-2 libtiff5 libwebp6 libwebpdemux2 libwebpmux3 python3-dev python3-olefile python3-six sqlite ftp rsync
sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime && sudo dpkg-reconfigure -f noninteractive tzdata
sudo ln -fs /usr/share/zoneinfo/Europe/Madrid /etc/localtime && sudo dpkg-reconfigure -f noninteractive tzdata
sudo ln -fs /usr/share/zoneinfo/Europe/Lisbon /etc/localtime && sudo dpkg-reconfigure -f noninteractive tzdata
echo "tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=20m 0 0" | sudo tee -a /etc/fstab
echo "tmpfs /var/log/apache2 tmpfs defaults,noatime,nosuid,mode=0755,size=20m 0 0" | sudo tee -a /etc/fstab
sudo sed -i 's/noatime/noatime,nodiratime/g' "/etc/fstab"
sudo swapoff --all
sudo apt-get purge --yes fake-hwclock dphys-swapfile >> /dev/null
sudo sed -i 's/# es_ES.UTF-8/es_ES.UTF-8/g' /etc/locale.gen
sudo /usr/sbin/locale-gen
echo -e "LANG=\"es_ES.UTF-8\"\nLANGUAGE=\"es_ES.UTF-8\"\nLC_ALL=\"es_ES.UTF-8\"" | sudo tee -a /etc/environment > /dev/null
cd
wget https://weewx.com/downloads/weewx-4.5.1.tar.gz
wget https://raw.githubusercontent.com/jantoni/meteowee/master/star_meteoclimatic/meteoclimatic.py
cd
tar xvfz weewx-4.5.1.tar.gz
cd weewx-4.5.1
python3 ./setup.py build
sudo python3 ./setup.py install
Enter a brief description of the station, such as its location. For example:
Santa's Workshop, North Pole
description [My Little Town, Oregon]:
sudo /home/weewx/bin/weewxd
pi@raspberrypi:~ $ sudo /home/weewx/bin/weewxd
LOOP: 2021-04-05 08:35:31 UTC (1617611731) altimeter: 33.45987854396733, appTemp: 28.46010918752483, barometer: 31.099999998967093, cloudbase: 3294.8532073708884, consBatteryVoltage: 13.10144387794729, dateTime: 1617611731, dewpoint: 27.203560993945757, heatindex: 32.67858297022247, heatingVoltage: 12.0, humidex: 32.67858297022247, inDewpoint: 31.079533828013187, inHumidity: 29.999999958683617, inTemp: 63.00000002065819, inTempBatteryStatus: 0, maxSolarRad: 454.0272154296771, outHumidity: 79.99999996901272, outTemp: 32.67858297022247, outTempBatteryStatus: 0, pressure: 31.099999998967093, radiation: 393.9111639217769, rain: 0, rainBatteryStatus: 0, rainRate: 0.0, referenceVoltage: 12.0, rxCheckPercent: 43.72395975692641, supplyVoltage: 12.0, txBatteryStatus: 0, usUnits: 1, UV: 5.514756294904877, windBatteryStatus: 0, windchill: 32.67858297022247, windDir: 359.9999998140763, windGust: 6.197456769996279e-09, windGustDir: 359.9999998140763, windSpeed: 5.164547900449179e-09
LOOP: 2021-04-05 08:35:34 UTC (1617611734) altimeter: 33.459878535199515, appTemp: 28.45807365032865, barometer: 31.099999990703814, cloudbase: 3294.842737254356, consBatteryVoltage: 10.803391738510452, dateTime: 1617611734, dewpoint: 27.20178958368346, heatindex: 32.67676549144743, heatingVoltage: 11.947692905885257, humidex: 32.67676549144743, inDewpoint: 31.07953369929752, inHumidity: 29.999999628152565, inTemp: 63.00000018592372, inTempBatteryStatus: 0, maxSolarRad: 454.2003857745868, outHumidity: 79.99999972111442, outTemp: 32.67676549144743, outTempBatteryStatus: 0, pressure: 31.099999990703814, radiation: 394.05330091118185, rain: 0, rainBatteryStatus: 0, rainRate: 0.0, referenceVoltage: 12.575158678066588, rxCheckPercent: 48.22530832250196, supplyVoltage: 11.251614145652537, txBatteryStatus: 0, usUnits: 1, UV: 5.516746212756546, windBatteryStatus: 0, windchill: 32.67676549144743, windDir: 359.9999983266865, windGust: 5.577711537085861e-08, windGustDir: 359.9999983266865, windSpeed: 4.648092932768577e-08
LOOP: 2021-04-05 08:35:36 UTC (1617611736) altimeter: 33.45987851766391, appTemp: 28.45603873598603, barometer: 31.099999974177262, cloudbase: 3294.8322875435697, consBatteryVoltage: 13.039198294052465, dateTime: 1617611736, dewpoint: 27.20001865622259, heatindex: 32.6749485852591, heatingVoltage: 12.932092027833903, humidex: 32.6749485852591, inDewpoint: 31.079533441866158, inHumidity: 29.99999896709047, inTemp: 63.00000051645476, inTempBatteryStatus: 0, maxSolarRad: 454.3158490755287, outHumidity: 79.99999922531785, outTemp: 32.6749485852591, outTempBatteryStatus: 0, pressure: 31.099999974177262, radiation: 394.2665232004942, rain: 0, rainBatteryStatus: 0, rainRate: 0.0, referenceVoltage: 11.665753934582595, rxCheckPercent: 48.22530832250196, supplyVoltage: 12.0, txBatteryStatus: 0, usUnits: 1, UV: 5.519731324806919, windBatteryStatus: 0, windchill: 32.6749485852591, windDir: 359.99999535190705, windGust: 1.5493643079622643e-07, windGustDir: 359.99999535190705, windSpeed: 1.2911369218215896e-07
cd /home/weewx
sudo cp util/init.d/weewx.debian /etc/init.d/weewx
sudo chmod +x /etc/init.d/weewx
sudo update-rc.d weewx defaults 98
sudo /etc/init.d/weewx start
pi@raspberrypi:/home/weewx $ ps aux | grep weewx
root 18393 3.3 3.2 34432 15860 ? Sl 08:43 0:01 /usr/bin/python3 /home/weewx/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /home/weewx/weewx.conf
pi 18415 0.0 0.4 7340 2044 pts/0 S+ 08:44 0:00 grep --color=auto weewx
sudo /etc/init.d/weewx stop
ps aux | grep weewx
pi@raspberrypi:/home/weewx $ ps aux | grep weewx
pi 18468 0.0 0.4 7340 1968 pts/0 S+ 08:49 0:00 grep --color=auto weewx
pi@raspberrypi:/home/weewx $
echo ":programname,startswith,\"weewx\"" /var/log/weewx.log | sudo tee -a /etc/rsyslog.d/99-weewx.conf > /dev/null
echo ":programname,startswith,\"weewx\"" \~\ | sudo tee -a /etc/rsyslog.d/99-weewx.conf > /dev/null
echo -e "/var/log/weewx.log {\n $WEELOGPER\n missingok\n rotate $WEELOGMAX\n compress\n delaycompress\n notifempty\n sharedscripts\n postrotate\n /etc/init.d/rsyslog stop\n /etc/init.d/rsyslog start\n endscript\n}" | sudo tee -a /etc/logrotate.d/weewx > /dev/null
sudo service rsyslog restart
sudo sed -i 's/week_start = 6/week_start = 0/g' "/home/weewx/weewx.conf"
sudo sed -i 's/group_speed = meter_per_second/group_speed = km_per_hour/g' "/home/weewx/weewx.conf"
sudo sed -i 's/group_speed2 = meter_per_second2/group_speed2 = km_per_hour2/g' "/home/weewx/weewx.conf"
sudo sed -i 's/group_pressure = mbar/group_pressure = hPa/g' "/home/weewx/weewx.conf"
sudo sed -i 's/group_rain = cm/group_rain = mm/g' "/home/weewx/weewx.conf"
sudo sed -i 's/group_rainrate = cm_per_hour/group_rainrate = mm_per_hour/g' "/home/weewx/weewx.conf"
sudo sed -i 's/day = %X/day = %H:%M/g' "/home/weewx/weewx.conf"
sudo sed -i 's/week = %X (%A)/week = %H:%M on %A/g' "/home/weewx/weewx.conf"
sudo sed -i 's/month = %x %X/month = %d-%b-%Y %H:%M/g' "/home/weewx/weewx.conf"
sudo sed -i 's/year = %x %X/year = %d-%b-%Y %H:%M/g' "/home/weewx/weewx.conf"
sudo sed -i 's/rainyear = %x %X/rainyear = %d-%b-%Y %H:%M/g' "/home/weewx/weewx.conf"
sudo sed -i 's/current = %x %X/current = %d-%b-%Y %H:%M/g' "/home/weewx/weewx.conf"
sudo sed -i 's/ephem_day = %X/ephem_day = %H:%M/g' "/home/weewx/weewx.conf"
sudo sed -i 's/ephem_year = %x %X/ephem_year = %d-%b-%Y %H:%M/g' "/home/weewx/weewx.conf"
sudo /etc/init.d/weewx start
sudo service weewx start
sudo ln -s /home/weewx/public_html /var/www/html/weewx
sudo systemctl start weewx
sudo service weewx stop
sudo rm -f /home/weewx/archive/weewx.sdb
sudo wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.3.1/gw1000-0.3.1.tar.gz
sudo /home/weewx/bin/wee_extension --install=/var/tmp/gw1000-0.3.1.tar.gz
sudo sed -i 's/record_generation = hardware/record_generation = software/g' "/home/weewx/weewx.conf"
PYTHONPATH=/home/weewx/bin python3 -m user.gw1000 --test-driver
pi@raspberrypi:/home/weewx $ PYTHONPATH=/home/weewx/bin python3 -m user.gw1000 --test-driver
Using configuration file /home/weewx/weewx.conf
Interrogating GW1000 at 192.168.0.104:45000
2021-04-05 17:05:27 UTC (1617642327): UV: 1, dateTime: 1617642327, dayRain: 0.0, daymaxwind: 5.1, extraHumid1: 49, extraTemp1: 18.6, inHumidity: 51, inTemp: 21.8, luminosity: 18026.0, monthRain: 28.2, outHumidity: 29, outTemp: 22.0, pm2_5: 12.0, pm2_51_24h_avg: 34.9, pressure: 940.5, rain: None, rainRate: 0.0, relbarometer: 1014.5, stormRain: 0.0, usUnits: 17, uvradiation: 28.0, weekRain: 0.0, wh25_batt: 0, wh25_sig: 4, wh31_ch1_batt: 0, wh31_ch1_sig: 4, wh41_ch1_batt: 5, wh41_ch1_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 162, windGust: 2.6, windSpeed: 2.0, yearRain: 87.9
2021-04-05 17:05:47 UTC (1617642347): UV: 1, dateTime: 1617642347, dayRain: 0.0, daymaxwind: 5.1, extraHumid1: 49, extraTemp1: 18.6, inHumidity: 51, inTemp: 21.8, luminosity: 18243.0, monthRain: 28.2, outHumidity: 28, outTemp: 21.8, pm2_5: 12.0, pm2_51_24h_avg: 34.9, pressure: 940.8, rain: 0.0, rainRate: 0.0, relbarometer: 1014.8, stormRain: 0.0, usUnits: 17, uvradiation: 28.9, weekRain: 0.0, wh25_batt: 0, wh25_sig: 4, wh31_ch1_batt: 0, wh31_ch1_sig: 4, wh41_ch1_batt: 5, wh41_ch1_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 192, windGust: 1.5, windSpeed: 1.2, yearRain: 87.9
sudo /home/weewx/bin/wee_config --reconfigure --driver=user.gw1000
cd && sudo wget https://github.com/poblabs/weewx-belchertown/releases/download/weewx-belchertown-1.2/weewx-belchertown-release-1.2.tar.gz
sudo /home/weewx/bin/wee_extension --install weewx-belchertown-release-1.2.tar.gz
sudo nano /home/weewx/weewx.conf
[[SeasonsReport]]
# The SeasonsReport uses the 'Seasons' skin, which contains the
# images, templates and plots for the report.
skin = Seasons
enable = true
[[SeasonsReport]]
# The SeasonsReport uses the 'Seasons' skin, which contains the
# images, templates and plots for the report.
skin = Seasons
enable = false
[[Belchertown]]
skin = Belchertown
HTML_ROOT = public_html/belchertown
[[Belchertown]]
skin = Belchertown
# HTML_ROOT = public_html/belchertown
enable = true
sudo service weewx stop
sudo rm -r /home/weewx/public_html/*
sudo service weewx start
sudo nano /home/weewx/skins/Belchertown/meteoclimatic.html.tmpl
*VER=DATA2
*COD=
*SIG=
*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*
sudo nano /home/weewx/skins/Belchertown/skin.conf
[[ToDate]]
# Reports that show statistics "to date", such as day-to-date,
# week-to-date, month-to-date, etc.
[[[weewx_data]]]
template = json/weewx_data.json.tmpl
[[ToDate]]
# Reports that show statistics "to date", such as day-to-date,
# week-to-date, month-to-date, etc.
[[[Meteoclimatic]]]
template = meteoclimatic.html.tmpl
[[[weewx_data]]]
template = json/weewx_data.json.tmpl
cd
wget https://raw.githubusercontent.com/jantoni/meteowee/master/star_meteoclimatic/meteoclimatic.ini
wget https://raw.githubusercontent.com/jantoni/meteowee/master/star_meteoclimatic/meteoclimatic.py
sudo cp meteoclimatic.ini /home/weewx
sudo cp meteoclimatic.py /home/weewx
cd /home/weewx
sudo nano meteoclimatic.ini
Log=0
Path=/home/weewx/public_html/meteoclimatic.html
Password=
sudo chmod +x /home/weewx/meteoclimatic.py
sudo nano /etc/crontab
# /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
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
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$
#
# Envía datos a Meteoclimatic cada 5 minutos, empezando en el minuto 1 de cada hora
1-59/5 * * * * root /home/weewx/meteoclimatic.py
Buenos días....
Ayer vencí a la pereza y me pongo con un proyecto que tengo en mente desde hace tiempo.
Se trata de configurar una Raspi, desde cero, con un pincho WIFI USB para que sea totalmente autónoma, Weewx y dos estaciones:
- Davis Vantage Vue
- Fine Offset GW1000/WH2650
Me diréis que esto ya lo hemos tratado anteriormente. Sí, pero hay ciertas connotaciones interesantes:
- Vamos a utilizar el pincho Wifi más vendido del mercado, el TP-LINK TL-WN725N, que funciona de maravilla, pero es puñetero de iniciar por un tema de drivers
- Vamos a utilizar dos estaciones de forma simultánea con Weewx y vamos a generar informes y gráficos, tanto de cada una de las estaciones, como mezclando datos de una y otra.
- Vamos a utilizar el procedimiento de instalación setup.py. Este procedimiento no es habitual en estas tierras, y tiene muchas ventajas sobre el procedimiento de instalación con paquete Debian. El inconveniente es que nuestro querido script meteowee no va a funcionar, y habrá que reescribirlo más adelante.
- Instalaremos el skin Belchertown, pero básico. Es decir, sin informes de terremotos ni el estado actual del cielo ni previsiones, porque fallan más que aciertan. En su lugar instalaremos el meteograma de yr.no
Configuramos una estación Fine Offset con la pasarela GW1000
Recordad que el procedimiento es el mismo para una pasarela WH2650
Accedemos a https://github.com/gjr80/weewx-gw1000 para ver cual es la última versión del driver.
En el momento de escribir esto, es la 0.3.1
Descargamos el driver:Código: [Seleccionar]sudo wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.3.1/gw1000-0.3.1.tar.gz
Presta especial atención a la versión del driver para su descarga.
Ejecutamos wee_extension para instalar el driverCódigo: [Seleccionar]sudo /home/weewx/bin/wee_extension --install=/var/tmp/gw1000-0.3.1.tar.gz
Modificamos el fichero de configuración para que la generación de archivos se haga por software y no por hardwareCódigo: [Seleccionar]sudo sed -i 's/record_generation = hardware/record_generation = software/g' "/home/weewx/weewx.conf"
Y, a continuación, probamos que el driver se comunica con la GW1000:Código: [Seleccionar]PYTHONPATH=/home/weewx/bin python3 -m user.gw1000 --test-driver
Si todo funciona bien (a mi, a la primera), tendremos un resultado como este:Citarpi@raspberrypi:/home/weewx $ PYTHONPATH=/home/weewx/bin python3 -m user.gw1000 --test-driver
Using configuration file /home/weewx/weewx.conf
Interrogating GW1000 at 192.168.0.104:45000
2021-04-05 17:05:27 UTC (1617642327): UV: 1, dateTime: 1617642327, dayRain: 0.0, daymaxwind: 5.1, extraHumid1: 49, extraTemp1: 18.6, inHumidity: 51, inTemp: 21.8, luminosity: 18026.0, monthRain: 28.2, outHumidity: 29, outTemp: 22.0, pm2_5: 12.0, pm2_51_24h_avg: 34.9, pressure: 940.5, rain: None, rainRate: 0.0, relbarometer: 1014.5, stormRain: 0.0, usUnits: 17, uvradiation: 28.0, weekRain: 0.0, wh25_batt: 0, wh25_sig: 4, wh31_ch1_batt: 0, wh31_ch1_sig: 4, wh41_ch1_batt: 5, wh41_ch1_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 162, windGust: 2.6, windSpeed: 2.0, yearRain: 87.9
2021-04-05 17:05:47 UTC (1617642347): UV: 1, dateTime: 1617642347, dayRain: 0.0, daymaxwind: 5.1, extraHumid1: 49, extraTemp1: 18.6, inHumidity: 51, inTemp: 21.8, luminosity: 18243.0, monthRain: 28.2, outHumidity: 28, outTemp: 21.8, pm2_5: 12.0, pm2_51_24h_avg: 34.9, pressure: 940.8, rain: 0.0, rainRate: 0.0, relbarometer: 1014.8, stormRain: 0.0, usUnits: 17, uvradiation: 28.9, weekRain: 0.0, wh25_batt: 0, wh25_sig: 4, wh31_ch1_batt: 0, wh31_ch1_sig: 4, wh41_ch1_batt: 5, wh41_ch1_sig: 4, wh65_batt: 0, wh65_sig: 4, windDir: 192, windGust: 1.5, windSpeed: 1.2, yearRain: 87.9
Y ejecutamos wee_config para configurar el driver:Código: [Seleccionar]sudo /home/weewx/bin/wee_config --reconfigure --driver=user.gw1000
Nos volverá a preguntar por la ubicación, el nombre de la estación, etc, etc......Tan solo tenéis que dar a la opción que os sale por defecto y nos respetará todos los cambios que habíamos hecho hasta ahora.
Tan solo tendremos que contestar a las preguntas sobre la dirección IP de la GW1000.
Si solo tenéis un GW1000 o un WH2650, podéis decir "auto" en lugar de la IP. Si tenéis dos dispositivos, conviene que le indiquéis la dirección IP de la pasarela que queráis usar.
Cuando os pregunte por el puerto de red, dejad el que viene por defecto, que es el 45000
A continuación os pregunta por la frecuencia con la que debe interrogar al GW1000 para que le mande los datos. Salvo que tengáis un anemómetro ultrasónico WS80, podéis dejar 20 segundos, ya que el bloque de sensores envía datos de viento cada 16 segundos, con lo que la posibilidad de perder rachas de viento se minimiza. Con el WS80 podéis poner menos tiempo, 5 segundos por ejemplo.
Y a la siguiente pregunta, responded también con la opción por defecto (es sobre los intentos que hará Weewx para acceder a la GW1000 en el arranque.). Por defecto es "1"
Ya tenemos Weewx funcionando con nuestra GW1000 o GW2650
En este momento, ya tenemos Weewx completamente operativo
Pero nos sigue quedando trabajo. Lo siguiente será enviar datos a Meteoclimatic.
cd && sudo wget https://github.com/poblabs/weewx-belchertown/releases/download/weewx-belchertown-1.2/weewx-belchertown-release-1.2.tar.gz
sudo /home/weewx/bin/wee_config --reconfigure --driver=user.gw1000
pero me dice lo siguiente:Request to install 'weewx-belchertown-release-1.2.tar.gz'
Traceback (most recent call last):
File "/usr/share/weewx/wee_extension", line 88, in <module>
main()
File "/usr/share/weewx/wee_extension", line 80, in main
ext.install_extension(options.install)
File "/usr/share/weewx/weecfg/extension.py", line 134, in install_extension
raise InstallError("Extension '%s' not found." % extension_path)
weecfg.extension.InstallError: Extension 'weewx-belchertown-release-1.2.tar.gz' not found.
Listo.....Hola
Ya tenemos una Raspberry Pi funcionando con Weewx, con el proceso de instalación setup.py en lugar del hasta ahora habitual paquete Debian.
Además tenemos funcionando el Skin Belchertown 1.2
Y enviamos datos a Meteoclimatic sin problema (siempre que hayas seguido las instrucciones al pie de la letra)
Ahora tenemos más tareas:
1.- Crear un script que lo haga todo de forma automática. Un meteowee especial para setup.py.
2.- Traducir Belchertown. Tengo traducido al completo la versión 1.0 pero tengo que revisar si hay diferencias.
3.- Modificar todo el sistema para soportar varias estaciones meteorológicas, fusionando informes.
A ver.....te contesto pero no en profundidad, porque grosso modo lo has pillado perfectamente.
En cuanto a las opciones, sin dudarlo. Driver GW1000.
Matizaciones:
- Con GW1000 podrás interrogar al WH2650 con la periodicidad que quieras. Adiós al problema de los datos actuales del último minuto. Si interrogas cada 16 segundos, tendrás los últimos datos actualizados desde el bloque de sensores a la pasarela.
- Más que la IP pública del router donde se encuentra ubicada la WH2650, deberías dar un dominio para resolver del tipo no-ip, dyndns o lo que te apetezca. Así tendrás siempre conexión aunque cambia la IP de la vivienda de Nerja.
- Debes abrir el puerto 45000 en el router de Nerja hacia la IP privada de la WH2650. Recuerda que a los dispositivos Fine Offset, al menos de momento, no se le puede poner una IP privada fija, por lo que deberás "enseñar" al router que a la WH2650 le debe asignar siempre la misma IP.
- En WSView, usando el driver GW1000 no debes poner nada en la secciones customized de los servicios web externos. De ese modo, por ejemplo, podrías mandar datos a atmos.cat y a la vez que tu ordenador de Málaga recopila datos con Weewx.
Por último, indicar que el driver GW1000 ha venido para imponerse. De tal modo que ya dispone de wiki propia https://github.com/gjr80/weewx-gw1000/wiki y con multitud de documentación y ejemplos.
A ver.....te contesto pero no en profundidad, porque grosso modo lo has pillado perfectamente.
En cuanto a las opciones, sin dudarlo. Driver GW1000.
Matizaciones:
- Con GW1000 podrás interrogar al WH2650 con la periodicidad que quieras. Adiós al problema de los datos actuales del último minuto. Si interrogas cada 16 segundos, tendrás los últimos datos actualizados desde el bloque de sensores a la pasarela.
- Más que la IP pública del router donde se encuentra ubicada la WH2650, deberías dar un dominio para resolver del tipo no-ip, dyndns o lo que te apetezca. Así tendrás siempre conexión aunque cambia la IP de la vivienda de Nerja.
- Debes abrir el puerto 45000 en el router de Nerja hacia la IP privada de la WH2650. Recuerda que a los dispositivos Fine Offset, al menos de momento, no se le puede poner una IP privada fija, por lo que deberás "enseñar" al router que a la WH2650 le debe asignar siempre la misma IP.
- En WSView, usando el driver GW1000 no debes poner nada en la secciones customized de los servicios web externos. De ese modo, por ejemplo, podrías mandar datos a atmos.cat y a la vez que tu ordenador de Málaga recopila datos con Weewx.
Por último, indicar que el driver GW1000 ha venido para imponerse. De tal modo que ya dispone de wiki propia https://github.com/gjr80/weewx-gw1000/wiki y con multitud de documentación y ejemplos.
Pues ya lo tengo funcionando plau2 con el driver GW1000, de momento en pruebas, pero parece que va bien ya que se generan los archivos para la página web y el correspondiente *.sdb
En el router de Nerja he configurado un DDNS de noip.com, he abierto el puerto 45000 a la IP de la WH2650 que he dejado fija
Cuando vuelva a Málaga terminaré de configurar la web, cambiar el skin, etc...
Realmente es mejor solución GW1000 que interceptor
Otro tema que tengo que resolver es la escritura en la tarjeta microSD.
Esta Raspberry va a controlar 2 estaciones por ahora y quizás otra en un futuro próximo, además tiene conectado un receptor Receptor RTL-SDR R820T para recepción de tráfico aéreo y envío de datos a FlightRadar24 y FlightAware, así que creo que debería añadirle un disco externo tipo SSD ( tengo uno de 256 Gb y conexión USB sin usar)
Así que vuelvo a pedir ayuda para la configuración.....
Jantoni, de nuevo, Muchas gracias
Saludos
Pues tambien es interesante el tema del receptor de tráfico aereo! madre mia, uno no gana para trastos al final. Voy a googleear porque me ha gustado *+*