Obligatory WeatherFlow e-ink Display

I’m new to the community, but I wanted to share my e-ink display project. Full disclosure, I am not a programmer, I have no training whatsoever in Python, and furthermore failed C++ in college not once, not twice, but 3 times. Those caveats aside, this project is easily achievable by a novice. I do not want to give any false assumptions that the source code is mine, or that I have developed it in any way, that is not the case. I have taken the source and modified it to suit my needs and use the WeatherFlow data.

Edit: I made some pretty big improvements tonight so I felt as though a fresh, less glared picture was in order

First and foremost…

Bill of sale:

  • List item 1x 5x7 photo frame - I am in the midwest, I purchased a rather generic frame at my local Meijer
  • 1x Raspberry Pi Zero 2W
  • 1x WaveShare 7.5inch e-Paper HAT (B) - (I had bought the 3 color Red, Black, White version expecting to have red integrated. As I am not a skilled programmer leveraging someone else’s code, I shoehorned my 3 color screen into a 2 color screen code.)
  • MicroSD memory card
  • Ideally a 3D printer to make custom parts

Source Code:
The source code I used for this project was called e_paper_weather_display

Important Modifications:
This code is written to use OpenWeather API. Simply changing the URL does not allow the code to work with WeatherFlow. The following code is the key to success:

At the import section of the code, look for json - modify the line to look like this:

import requests, urllib.request, json

At the section where URL =, set it to use your station ID and API token. If needed, you can also change the units to what you prefer.:

URL = ‘https://swd.weatherflow.com/swd/rest/better_forecast?station_id=[StationID]&units_temp=f&units_wind=mph&units_pressure=inhg&units_precip=in&units_distances=mi&token=[API Token]’

From here, you will modify the JSON pull to use the upgraded method. This is the key to get the app to work. The original method returned garbage. See below:
# Check status of code request
if response.status_code == 200:
print(‘JSON pull from Tempest WX successful.’)
# get data in jason format
f = urllib.request.urlopen(URL)
wxdata = json.load(f)
f.close()
# get current dict block
current = wxdata[‘current_conditions’]

From this point you only need to plug in the JSON items you want to see. Reference [Place Holder for Tempest API link due to newbie restrictions] for the specific JSON items. Note: if you keep the source naming convention, selecting your data will look similar to (without the double quotes) “current[‘air_temperature’]” - setting this to a variable, eg temp_current = current[‘air_temperature’] - will allow you to use the the API data for the current temperature.

My Modifications:
I had a lot of fun with this project, so I went pretty far with it. I designed and printed a back for the frame as well as a mask for the e-ink screen. These allowed me to create mounting points for the driver HAT as well as the Raspberry Pi. Note: If the picture is not embedded in this original post, it will be in subsequent replies.

Top left:
I modified the source code to allow the use of day weather icons and night weather icons. This was achieved by using the sunrise and sunset data. Simple logic of if > sunrise and < sunset = daytime, < sunrise and > sunset = nighttime.

Barometer data. I added in barometer readings along with an icon for the trend. The icon I used was from [Place Holder due to restrictions as new user] were either from this list or modified from one on this list.

Top Right:
The feels like temperature is a product of humidity and dew point. The modification I made here was adding in a fire icon to the right of the feels like temp if it is equal to or exceeds 5 degrees above current temp. Conversely, if it is equal to or minus 5m it will display a snow flake icon.

Bottom left:
No changes

Bottom Middle:
Added Dew Point as a new line and Cardinal DIrections to the Wind reading.

Bottom Right:
If there is lightning detected in the last 3 hours, the panel changes from last updated time to a lightning icon with the number of strikes in the last 3 hours and the current distance reading for the strikes. Once the lighting stops, the 3 hour period will expire and the panel will go back to the last updated time.

For fun:
If the wind exceeds 10MPH, the weather icon will change to the ‘IT HECKIN WIMDY’ meme. This clearly has no scientific value, but it is fun to see a fox meme pop up.

Final notes:
I will provide images and descriptions of how I modified this code to make it work for me. However, since I did not create the source code I do not feel as though it is fair to claim it as my own. I modified what I found to make it suit my needs since the Tempest specific repository was taken down. This was a ‘oh crap I ordered all these parts and I need to make it work or the wife will kill me’ moment. With a bit of trial and error, this is a rather simple project. Creating a script to execute (without quotes) “python weather.py” in the root crontab @reboot is really all that is needed.

If anyone has any questions or feedback, please let me know and I will do my best to answer!

Edit: Upon request, I have created a fork from the original code for my version to work with Tempest: https://github.com/OG-Anorine/Tempest-7.5-E-Paper-Display

5 Likes

Tempest API reference Link: Tempest API

Weather Icon source: Weather Icons

3D Printed back:

Lightning tracking mod:

1 Like

Super good looking. Have you noticed anything re: burn-in on the display, and how often does it refresh ?

Thanks! I appreciate the feedback! I am refreshing every 5min. I also run a reboot at 3:30am in order to completely reinitialize the screen. So far I have seen zero burn-in.