Displays local weather and wind on a Raspberry Pi
Daily forecast | Hourly forecast | Wind data |
---|---|---|
PiWeatherRock is an internet-connected weather station. Its purpose is to display local weather and wind condtions. It was created with the goal of having a simple way to check the weather and wind before a nautical activity (kiting, windsurfing, sailing). The end result is a modern version of a weather rock.
-
The build of this project originated with the code written by Gene Liverman and published at https://piweatherrock.technicalissues.us .
-
Right now all data is pulled from:
- OpenWetherMap https://openweathermap.org/api/one-call-3 - you have to subscribe to "One Call API 3.0" for 1,000 API calls per day for free
- Windguru https://www.windguru.cz
- Holfuy https://api.holfuy.com/
sudo apt-get install python3
sudo apt-get install python3-pip
git clone https://github.com/ciprian288/PiWeatherRock-Windguru-Holfuy.git PiWeatherRockWind
pip3 install -r ~/PiWeatherRockWind/requirements.txt
-
The xhost command needs an active X server to run, it can run at the login screen, for example when lightdm loads. You can enable it by editing /etc/lightdm/lightdm.conf and adding the line:
xserver-command=X -s 0 -dpms
sudo cp ~/PiWeatherRockWind/scripts/{PiWeatherRock.service,PiWeatherRockConfig.service} /etc/systemd/system/
sudo systemctl enable PiWeatherRockConfig.service
sudo systemctl enable PiWeatherRock.service
sudo systemctl start PiWeatherRockConfig.service
sudo systemctl start PiWeatherRock.service
-
For instaling clock font:
sudo cp -r ~/PiWeatherRockWind/fonts/digital.ttf /usr/share/fonts/truetype/digital.ttf
fc-cache -f -v
-
For your locale:
locale -a # find your locale
sudo update-locale LC_TIME=xx_XX.UTF-8 # replace xx-XX with your locale
sudo reboot
or
sudo dpkg-reconfigure locales # select and configure your locales
sudo reboot
- When PiWeatherRock starts, on the left side of the screen is your RaspberryPi IP (like: 10.0.2.15:8888 from screenshots)
- Put in any web browser RaspberryPi IP . It provides a web interface for configuring PiWeatherRock
- Wave your mouse over the titles for instructions
- The "API Meteo" key MUST BE CHANGED because it is a TEST key
-
After
Update
your configuration (on web interface) restart PiWeatherRock.service with:sudo systemctl restart PiWeatherRock.service
-
If the wind is set, the color of the watch and the wind data (blue, green, orange, brown, purple) changes according to the wind speed
-
To display wind data from Windgru, set in the web interface for configuring PiWeatherRock the "API Holfuy" to null and the station ID number from a real wind station like " https://www.windguru.cz/station/2708 " , not the forecasted one. The station ID can be found by accessing the desired station on holfuy.com or windguru.cz, being the number at the end of the link.
-
If you don't want the wind page to be displayed, go to the 'Wind screen' section in the web interface for configuring PiWeatherRock and set the pause to 0.