Raspberry Pi Weather Display
ฝัง
- เผยแพร่เมื่อ 9 ก.ย. 2024
- A super cool Raspberry Pi Weather display which give you the forecast and live radar.
🔹My Favorite Gear - www.amazon.com...
Monitor used in video - amzn.to/3LHDXsW
🔹Commands used in the video
github repo - github.com/ele...
API Websites:
locationiq.com/
app.tomorrow.i...
www.mapbox.com/
install commands:
git clone github.com/ele...
cd pi-weather-station
curl -sL deb.nodesource... | sudo bash -
sudo apt install nodejs
npm install
npm start
startup script:
#!/bin/bash
#script used to start weather station display
#km4ack 19APRIL2022
cd $HOME/pi-weather-station/
/usr/bin/npm start &
sleep 30
sudo killall chromium-browser
sleep 120
export DISPLAY=:0 && /usr/bin/firefox-esr --kiosk localhost:8080
crontab entry:
@reboot sleep 20 && export DISPLAY=:0 && /home/km4ack/Desktop/start-weather
🔹Raspberry Pi Build Guide - tiny.cc/pi4guide
🔹Frequently Asked Questions - tiny.cc/km4ack-faq
🔹Weekly Newsletter - mailchi.mp/40d...
🔹Follow Me
Twitter @km4ack
🔹FREE Get Started Guide - tiny.cc/getstar...
🔹Cool Ham Gear - km4ack.com
🔹Support the channel through Patreon - / km4ack
🔹Did you just get a raspberry pi and want to hook it up to your radio? Start here • Where to start? Raspbe...
Want your raspberry pi to play nice with your ham radio? Are you into digital modes like FT8, JS8Call, FLDIGI, Winlink, APRS, Digipeaters and others? Each week I put out new content showing you exactly what steps to take to get the latest ham radio software on your raspberry pi. Whether you just want to ragchew or are seriously into emergency preparedness, emcomm, or ARES and want to learn all you can about using the raspberry pi to drive your ham radio, this channel has something for you. Be sure to click the subscribe button and ring the bell before heading off. That way you will get notified of all future videos.
🔹🔹🔹🔹🔹
As an Amazon Associate I earn from qualifying purchases
Monitor used in video - amzn.to/3LHDXsW
You weren't kidding about using a leftover Pi 3. I had a notion to pick up another Pi 4 last week and they cost twice as much as I paid last year. I thought computers obeyed Moore's Law and became cheaper over time. Apparently NOTHING is cheaper these days. :-(
I'm pretty happy with the National Weather Service forecast for my area, NEXRAD radar and the NWS IR map bookmarked in my browser to quickly check the weather whenever I like, but this is a pretty neat hack for anyone who wants a dedicated weather display.
I love these How To videos. While the goal is clearly to get us to the end point with a functioning project as quickly as possible, a lot of Linux can be learned by osmosis along the way. It's sort of like giving us a fish while also giving us a little bit of a fishing lesson as well.
Thanks for the kind words Bruce. Due to the worldwide chip shortage, Pi's are ridiculously expensive on Amazon. The last one I purchased (Pi Zero 2W) I got from Canakit. I had to pre order and wait around 2 months but they are still selling them at the normal price. You might also check out rpilocator.com/
Thank you! The node js section is outdated, and chromium is working.
I like how you say "press RETURN", takes me back to my Commodore 64 days
That term will certainly give away my age :-)
great job works perfect please keep coming with the tutorials ,very helpfull.regards john
Please help!
I'm stuck at the npm install it says file not found. What do I do???
Well done. I feel inspired to do this.
Thanks Jason/all. It was indeed the Lat / Long issue (used 4 decimal places) and it is now working as it should! 73 Serge
can you tell me what format the Lat / Long needs to be in? is it decimal degrees like 28.0000 / -95.0000 or degrees decimal minutes like 28 00.0000 / -95 00.0000
do i need to change anything for using the default HDMI out for use on a 32 inch tv?
I cannot get this to work properly. It says.> Cannot retrieve map data. Did you enter an API Key? I have followed your video 3 times now and can't get this to work/update. Any ideas? N9WX
followed tutorial to the letter and can not get this to work. Need help
Excellent video Jason!
@KM4ACK Went through it a few times and never could get it to come up and run. Not sure what is wrong with it. Need help with Weather Station pgm. Firefox installed and is running with no problems. KV4ATV
I am having an issue where the website is sitting loading from the initial API configuration.
Perfect. Thanks!
Very nice little project, can you tell me how often the radar image is updated and also how often the temp is updated. Thanks, WB4IZC
Any idea why this no longer works?
I have followed these steps 3 times to get this to work and all it does is act like it is loading. Waited for over 30 minutes each time and it still never works. Guess the service is down...
Interesting project and well explained.
How do I change the port from 8080 to some other port? I already have something else running on port 8080.
Too cool and when I find a spare Pi I will give this a try.
So, I'm doing this the way you have set up. When I reboot in VNC, I see chromium start then get killed, but I never see Firefox start. If I open Firefox though, it's open in kiosk mode and if I type in localhost:8080, I get the option to go to that tab. Am I not waiting long enough, or is there something else that I'm missing? One difference is that I have the start-weather script in the pi-weather-station directory.
It shouldn't take more than 5 minutes for the display to start. Post your startup script to the forum and let me take a look to see if I can spot anything that might be tripping you up. groups.io/g/KM4ACK-Pi/topics
Fun with Bash scripts!
Great video. Just started learning the PI. Got to MAPBox and trying to figure it out. Do you have any videos on it? 73
Hi Jason. Quick question for you. Will the PI Wather Station App work with the Raspian OS or should I use Bullseye? Newbie Rasp Pi user. :-) Thank you and keep up the great videos! 73 Serge VA3SB
Raspberry Pi OS latest version is Bullseye.
If you have a GPS Hat (or the dongle if you're using Build-a-Pi), is there a way to get this to start up using the location from the GPS?
I don't think using the GPS is an option.
I finally got the script to start at boot, stupid capitalization.
is there a setting to user so that the map is not zoomed out so far? I live in a metropolitan area with several different cities, I dont need the full area; it makes my city so small. can i adjust the distance to say 15 miles vice its default setting?
I would think there has to be a zoom setting in the code that could be changed but I haven't looked into it.
There are +/- marks in the upper left corner that change the size of the map.
Great vid just subed hope to see more pi videos
I followed this for bullseye and chromium is bringing it up but nothing's happening does it work on bullseye or just buster
it does work for bullseye, when you say nothing is happening what exactly is it doing? what does the screen say?
@@Travelinmatt1976 it's just blank after putting in all the keys and waiting for 30 minutes
@@mikeburdette so when you say a blank screen are you looking at a black screen? is it a white screen with some icons? is it a grey screen? it doesnt say anything at all?
@@Travelinmatt1976 just a black screen trying to load the data has the time on one side and just black on the other
@@mikeburdette Hmmm, I'm at a loss. If it has the time and no map I'd expect it to say "Cannot retrieve map data, Did you enter an API key?" but since it's blank I don't know what to tell you.
Jason, thanks for the terific tutorial! Chromium is opening properly on my up-to-date Buster install. Do you happen to know the command line switch to launch Chromium in full-screen mode? Thanks again! 73 de WV3E.
What app are you using to run that widget on the left of your screen
Conky
im at the part of the weather API key, its asking to pay for a subscription to use the API key. is this the same that you used Jason?
I did not have to pay for a basic key. The subscription is for more advanced features and more calls.
@@KM4ACK thanks for the quick reply. after i let it sit for a few hours i was able to log back in and viola there is my key.
oh by the way. chrome is working now on start.
now if i can just get the start up script to work correctly.
so after some messing around i found that chromium does not start when rebooted.
Are you going to look at using the GPS data from /run/user/1000/gridinfo.txt (the actual GPS coordinates are available too, just not saved there)? Since it seems to be all javascript, I wonder if it can be run in another OS, like maybe Debian for a home server (I have ADS-B, and a scanner streamer running on the same Debian VM server, might try to add it to it) and give that port 8080 feed to my home network.... It'd be cool to make available to others without internet on my Go-Network for emcomms, too (Pi4 running the scanner streamers and Citadel BBS and Internet connectivity)...
KM4ACK, all went pretty good, however how do I get back to the Weather Key line? I typed in the "apikey=" and I'm certain that it is causing me a problem. This is my FIRST project with a Raspberry Pi, so it took many hours. KA8JOY
This looks really good but mapbox wants me to give them a credit card. Did you have to do this and if so have they ever charged your card? I am hesitant to do this.
I didn’t have to do that when I signed up. However, check out privacy.com for just such occasions. Free burner card service that I have used for over a year now. Great service but no affiliation with them. Just something I use.
Hi Jason, I like it. !!
Any chance of a temp and humidity display using a DHT sensor on Build a Pi for field or off grid use i run my build a pi with a 4inch display when away from home.
Thanks! great project I do have one issue where it does not want to boot fully. I have to ssh into the pi and npm start each time?
Thanks for the super chat! It is probably an issue with your cron command.
Is there a solution for no desktop (display) environment but just command link?
not that i am aware of in this case
Hello again Jason. Having some issues on this end. No doubt I've done something that I shouldn't have. :-) I have downloaded all of the API keys but when the software starts up, I get the grey screen with the date and time on the top left corner but the display area indicates "Cannot retrieve map data". I have checked and rechecked the API keys so not sure what to try next. Any advice or guidance would be greatly appreciated. Many thanks. Serge VA3SB
Read through the comments on this vid. Pretty sure someone posted a solution recently.
you need to enter your Lat/Long use 4 decimal points so Lat 35.1234 and Long -97.1234
I’m here too. Cannot retrieve map data.
great little project. I want to know if it's only going to work in the USA or around the world?
Curious if this app is still working, as I’m seeing data receipt has stopped and others reporting similar issues. Changing the api keys does not solve the issue… the system was updated, wonder if something has broken?
I have solved this, but tried a few more complex rebuilds along the way. The most simple thing to try is this; put in LAT LON values, don't leave them blank. If that doesn't solve it - I have a more intensive option... it involves replacing data.climacell.co with api.tomorrow.io -- then rebuilding the source code. I hope the first and simple item works for you, I did both and it works. But I added the LAT LON last -- in full transparency, I'm not sure which was really the culprit.
Jason, I just completed this project. It works flawlessly. Thanks for sharing it with us. I do have a couple of questions. 1) I built this at our home QTH in Phoenix. i will be using this weather monitor at our mountain home. How will the unit know the new location? Will it be automatic due to the internet connection ore will I need a new map key? 2) I noticed that after a period of time the display went blank I assume this is due to a screen saver. Do you have any suggestions to disable the screen saver? Thanks again! de Fred/N7PN
Glad you found it useful :-) For the screensaver, go to the main Pi menu->Preferences->Raspberry Pi Config. Look under the display tab and disable screen blanking. As for the location, it may auto update based on the internet connection but I believe you will need to update the Geolocation API Key
@km4ack BTW, for the weather key, it's the same as the "Secret Key" just above where you copied out the API key...
Can't seem to get this to work. Followed the video. All of the components went into place nicely. But the weather app keeps telling me it can't load the map data. Checked the keys....everything seems to be fine. Seems like a cool project...but.
you need to go ahead and enter your Lat Long in Decimal Degrees format with 4 decimal places like this, XX.XXXX
And then hit refresh
I have completed both a Pi3 version, and a Debian Bullseye 11 VM version, and both maps have a major issue with Radar artifact that doesn't seem to clear. We had storms roll through last night and one particular artifact was always there. (Look NW of Louisville KY for a bad one, but they are all over the country)
I have had this running for a month now and several days ago I started noticing the same thing. Not sure what the deal is but it's something with the radar feed.
Question and comment: Love this. Thanks for showing how this is done. One question/request though.... Is there a way to connect through a web browser from another computer? That would be a nice add-on if possible because I can't always be next to it.
yes, you should be able to by entering [ ip-address of the WeatherPi]:8080 but you have to punch a hole through the pi's firewall. -- haven't tried it though. I use Remote Desktop by doing "sudo apt install xrdp -y" on the pi and using the free app from Microsoft (native on most window machines) Remote Desktop and available on the iOS/Mac App Store and Google Play Store. It's also available for Linux. Much simpler but you have to have VMC installed on the client machine.
I made the weather station that you show how to install. Chromium worked just fine so I didn't go any farther to change to Firefrox.
Thanks for the update on Chromium
Chromium works for me. I had posted (or thought that I had) a comment this morning with a website that shows you how to load up a webpage on startup, but it seems to be gone now. I'm assuming that's the reason why it works for me.
Hey All
I make it 90% through the install without issues and then it doesn’t recognize “npm install” or “npm start”. What’s going on? Using pi3 on Build A Pi.
This recent write up might help groups.io/g/KM4ACK-Pi/message/12106
And this, sir, is why you are the GOAT!!!@@KM4ACK
One more suggested fix. In the line "@reboot sleep 20 && export DISPLAY=:0 && /home/km4ack/Desktop/start-weather" change it to read "@reboot sleep 20 && export DISPLAY=:0 && ~/Desktop/start-weather" for the start script. The Tilde Character (~) -- the key below the esc key shifted on most keyboards has been a shortcut for your "home/userid" directory from the Bourne Shell, CShell, through the Bash (BTW Its stands for Bourne Again Shell) and will save you some typing and have ing to escape out to look up your login id. BTW while cryptic I use the vi editor and have been since the 70's. Yes it is cryptic, and you can get into trouble (just as you can with using sudo/or going to root mode) but the short cuts are incredibly powerful and you can save a lot of time editing scripts with just a few key strokes. I would suggest you take the time to learn. The start curve is a bit steep, like learning bash, but once you get it is very productive.
Oops! my bad, I forgot that ~ only works when you sign in. The the point of reboot you haven't really signed in so it doesn't know who's home directory to go to. Nevermind!
not working now
Think this would run ok on a Pi Zero W? I have 2 of those floating around. Great stuff!
I would lean toward a yes as it runs fine on the Pi 3. Might take it a bit longer to boot and get running but once running it should be ok.
@@KM4ACK We will give it a try and report back then. Thanks! Coming to Hamcation in Feb.?
How does this update the weather info via our beloved radios?
It doesn't. This project uses the internet to update the display.
Didn't see what pi 3 you use here. if you did mention i missed it.
Pi 3B
Did you ever get passed the chrome startup problem?
I just installed and chromium works fine as far as I can tell
Has anyone else discovered that while it is giving the 24 hour conditions that it is no longer showing the 7 day data?
Great video, I have it almost working, created all the accounts pasted in the three keys and hit save, it just sits and says it 'can't retrieve map data, did you enter the key?' Tried a couple of reboots and repasted key, no joy.
I had to wait a while before the API's kicked in but other than that, didn't have any issues with the map.
I'm experiencing the same problem.
@@KM4ACK It's been sitting here for a couple of hours and still the map and weather data has not loaded. I have checked the API's are correct.
@@KM4ACK Went to Mapbox and refreshed API and reloaded, still doesn't work. If anyone has solved this please post
@@tedtoad2471 Did you enter the LAT/LON values? A few people (including me) had odd issues getting data feed when not entered. One person changed their values from 6 decimal places to 4 (xx.xxxx) -- then rebooted and all was working normally. Let us know if this works. It's a great little app and valuable for us in the storm ally.
Minor error - in the startup script, the line cd $HOME/Downloads/pi-weather-station/ is incorrect. It needs to be cd $HOME/pi-weather-station
Great catch! I had installed it three different times during filming and didn't make the change to the startup script. Thanks for the heads up!
I had to fill in manually my latitude and longitude to get it working. Sadly, the project has not been touched in the last two years.
Great project! Has anyone tried adjusting transparency of the radar layer? I'd like to make the radar layer pop a little more. N1ROG
Just FYI, this is going to take WAAAY longer than you think...
Great project & TY for this tutorial! I was able to get kiosk mode to launch in Chrome without hanging by adding '' accordingly in the following command line statement: export DISPLAY=:0 && /usr/bin/chromium-browser --kiosk localhost:8080.
Thus, I modified the original script (Sleep number time is a personal preference setting. 15 worked the best for me). See below:
#!/bin/bash
#script used to start weather station display in kiosk mode
#by KM4ACK 19APRIL2022; modified by SJE 21AUGUST2022
cd $HOME/pi-weather-station/
/usr/bin/npm start &
sleep 15
export DISPLAY=:0 && /usr/bin/chromium-browser --kiosk localhost:8080
Hope this helps. Cheers!
Thanks Jason. Everything is working great, except my map does not look anything like yours and is basically a continual redrawing of what looks like a radar of my location. Thanks, love all the cool things I am doing because of your videos. de K2PMD