- #French weather display full#
- #French weather display code#
- #French weather display plus#
- #French weather display download#
- #French weather display free#
text (( 10, 8 ), "Mis jour le " + weather. line (( 5, 350, 795, 350 ), fill = 0, width = 1 ) # HORIZONTAL SEPARATION # UPDATED AT display. line (( 350, 5, 350, 350 ), fill = 0, width = 1 ) # VERTICAL SEPARATION slim display. line (( 540, 5, 540, 350 ), fill = 0, width = 1 ) # VERTICAL SEPARATION display. rectangle (( 5, 5, 795, 475 ), fill = 255, outline = 0, width = 2 ) # INNER FRAME display. # Author : Aerodynamics # Date : # Version : 1.1 # -*- coding:utf-8 -*- # -*- coding:utf-8 -*- from weather import * from news import * from display import * import json lat = "48.85" # Paris, France :) lon = "2.39" api_key_weather = "" api_key_news = "" debug = 0 # If debug != 0 -> debug on if debug = 0 : import epd7in5b_V2 else : pass def map_resize ( val, in_mini, in_maxi, out_mini, out_maxi ): if in_maxi - in_mini != 0 : out_temp = ( val - in_mini ) * ( out_maxi - out_mini ) // ( in_maxi - in_mini ) + out_mini else : out_temp = out_mini return out_temp def main (): # FRAME display.
#French weather display free#
As I'm running a Pi Zero for that I think I will find it another utility at the same time.įeel free to reproduce it and share the result :) It's not totally straight forward but I must have provided all the information you need to make it work. It's prettier than many commercial weather station. You will find all you need here : WAVESHARE WIKI LINK I'm sure Pillow can be replaced by another way to create a 800x480 array The documentation provided by the manufacturer makes it easily understandable. It is quite easy to use : create your interface thanks to pillow librairy and load it to the screen. The ePaper used is the "7.5inch e-Paper HAT (B)" from Waveshare. As a future improvement I will replace part of the news by a pollution or weather alert if there is one.
#French weather display download#
I currently download and parse these data but not use them. OpenWeatherMaps also provides weather alert (snow, wind.) and pollution data. I select the last 5 top news and just print the 120 first characters (sufficient most of the time).
To get a "global" view I chose googlenews as a source (in french). It is simple to use and free up to 100 calls/day (I make 24). I chose to use NEWS API to get the last top news. Historical values of pressure and temperature for the 6 passed days (graph) (updated once a day).Daily forecast up to 4 days, printing, icon, min and max temperature and probability of rain.Hourly forecast for +3h, +6h, +12h printing temperature, probability of precipitation and icon.Rain forecast for the next hour (per 10min intervals).Current Wind speed and orientation (convert degrees to "compass").The following are the selected value for the station : You get current weather, rain forecast for the next hour, hourly forecast for 48h and daily forecast up to 7 days. To reduce the number of call, I chose the "One call" API. It is quite easy to make it work and free up to 60calls/minute (I make 1 a hour). The weather informations are download from OPEN WEATHER MAP.
#French weather display code#
The code is launch at boot thanks to crontab : PY FILES PROVIDED BY WAVESHARE TO MAKE IT WORK WITH ePAPER SCREEN (epd7in5b_V2.py & epdconfig.py), YOU WILL FIND THEM HERE Sure that the code can be enhanced but it works this way.įuture enhancement : make the display more parametric To enhance a bit the display the screen is a three color one.
Also you easily find examples of use on the internet which ease the use. Nota : as a french guy, you will find some french in the code (labels, specified language for api)Īs the main idea was to have a nice display which consumed few power so I chose to get a e-paper from waveshare which is not expensive and seems to be some good quality.
#French weather display plus#
The idea behind was to discover and use API but also getting a nice weather station with the info I wanted plus the top news to stay update. : few bugs correction, added debug mode, added file saving and restoring for past pressure and temperature values
#French weather display full#
The French Southern and Antarctic Lands (French: Terres australes et antarctiques françaises, TAAF), in full the Territory of the French Southern and Antarctic Lands (French: Territoire des Terres australes et antarctiques françaises) is an overseas territory (French: Territoire d'outre-mer or TOM) of France.