Install meteo
From xPL
A Raspberry Pi stack allows to build a small meteo station.
Before all, make sure you have installed an xPL hub.
Install the xPL meteo station
Download the xPL device script.
Move the script to xPL scripts directory:
SCRIPTS_BASE_DIR=/home/control/Documents/Controls mv xpl-pi-meteo.pl $SCRIPTS_BASE_DIR chown control:users $SCRIPTS_BASE_DIR/*.pl chmod 775 $SCRIPTS_BASE_DIR/*.pl
Test the xPL meteo station
Open a terminal window and launch the device:
SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-pi-meteo.pl -vs 2
Open a second terminal window (on any machine with xPL installed) and monitor the xPL protocol:
SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-monitor.pl -vf
The monitor should echo the clock ticks every 2 seconds.
Launch the xPL meteo station at startup
The xPL meteo station runs on raspbian.
Edit /lib/systemd/system/xpl-pi-meteo.service
:
[Unit] Description=RPi xPL meteo station After=network.target [Service] Type=simple ExecStart=/home/control/Documents/Controls/xpl-pi-meteo.pl -w 2 -s 60 Restart=always [Install] WantedBy=multi-user.target
Activate the service:
su systemctl enable xpl-pi-meteo.service service xpl-pi-meteo start
Reboot and check:
ps ax | grep -v grep | grep -i xpl ps aux | grep -i xpl | grep -v grep | sed 's/.*\/Controls\///' | sort service xpl-pi-meteo status