-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Dark Sky API #48
Comments
Perhaps OpenWeatherMap? Seems the free tier is limited to 1 API call / sec, which is (in my opinion) way more than necessary - my own weatherpi was querying once per 5min. Looks like they have current forecast API and 5-day forecast API that would likely emulate the previous functionality, and looks like it supports a lot of different localization capabilities. I'm currently waiting on the API key to get activated (apparently it takes a few hours) to try some testing with those two endpoints:
I am also apparently very impatient 😆 |
Alright, API key got activated, looks like we also have the ability to use icons from their site itself (or write something to use the existing icons); example output is below from their site: Icon info is here. So far, looks pretty reasonable - thoughts? |
Please do let us know if you can get that API working. I literally bought a screen in a case for this to wall mount it on the 28th, arrived today. I checked on here to start working at setting up my new weather display! To my dismay its over with... |
That really sucks @fraser386! I'll absolutely get it working and will keep this issue updated with progress. I am certainly considering Open Weather Map @MarticusH. I am also checking with two other sources that look like they may have more to offer too in hopes that one of them will pan out. |
Thank you @genebean! |
Cool cool, thank you @genebean - let us know what you decide on! |
I contacted Foreca at a users suggestion but it seems they don’t currently offer anything free or near-free. I have a meeting scheduled for today though that I’m hoping pans out.🤞More info soon. |
Just had a great call with Climacell and found out that in a matter of days they will have a free tier for their weather api that has limits similar to what Apply just killed off for Dark Sky. This is what I plan to move us to. They directed me at the right set of api docs and are checking to see if there will be free air quality info available too. I hope to get this turned around pretty quickly but want to do it in conjunction with merging in some contributions from @metaMMA as that work will make this work easier. |
Just a quick update to say I haven’t forgotten about this. I’m still working with @metaMMA to get their enhancements merged in. Hopefully I’ll have more news soon. |
Thanks!
…Sent from my iPhone
On Apr 25, 2020, at 1:23 AM, Gene Liverman ***@***.***> wrote:
Just a quick update to say I haven’t forgotten about this. I’m still working with @metaMMA to get their enhancements merged in. Hopefully I’ll have more news soon.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Tonight I started writing the actual Python module to pull forecast data from ClimaCell. Prior to this I’ve been wrapped up in other improvements and some unrelated work. It feels good to start interacting with the new api. 👋 Darksky Sent with GitHawk |
@genebean - Thank you for this! Is this work on a branch somewhere that one could preview/test? |
It makes me really happy to see this integration happening. Such a good project. Keeping my eye out for anything I can help with. |
Also very interested in this work. If there is a testable branch I would be happy to take it for a spin. |
@genebean still no updates on the ClimaCell version of the weather app? |
Did you get any further with the API over the last 6 months? |
Hi Everyone. I just installed bolt 1.4.0 version but dont know about the API Key. Is it still running with Dark Sky service? is it ready for the ClimaCell API? Thanks for this contribution!! |
Hi Folks, Perhaps https://openweathermap.org/api can also be a good alternative? Thanks for this. |
love the project! has it been updated with the new api? |
I guess author @genebean has been too busy, probably given the COVID situation. |
I have. I recently started looking at this again and have come up with a plan. It's going to take some time as I don't have a lot of time to work on things, but this is going to be addressed as I still use PiWeatherRock every day. |
If you have time, why not set out your plan in Projects and maybe some of us can help with tasks? |
Any updates? |
Another one here wondering about updates, this looks like a great project to work on with a couple of kids who love sciency stuff. |
I’m hoping to dive back in this week. I’ve now got the extras motivation of my own setup not working well because the code doesn’t currently handle api errors well and, instead, spams the api with requests causing rate limits to be exceeded. All that to say I think my motivation has returned (finally). |
FYI: I started working on this yesterday and plan to work more later today. |
After hours of work today I have discovered I left a spaghetti like mess of intertwined code for myself 😞 I'm now working to refactor some of the current code to facilitate replacing Darksky. The upside: I think I see where things are screwy and overly complicated. |
Awesome to see you working on this again, sorry to see it's being a pain! |
Today I got a normalized data structure created that contains all the bits of the response from Darksky's api that are used in the various bits of my code. The new structure is a dictionary (a hash) with predictable keys. The values are filled in with the data returned from Darksky. The next step is to put this new data structure to use in the existing code. Once that's complete, I'll extract the Darksky bits into a data provider module that simply takes a configuration object or file as input and returns this new data structure. Doing so will mean that any module that can read things such as api keys from the config and returns a dictionary with the needed keys can be used by the core program. This not only lets us create a ClimaCell / tomorrow.io module, but also modules for any other desired data source. That data source could be something region specific to a user or could be one that reads from MQTT. The MQTT angle serves two purposes:
In case you haven't guessed, I'm very interested in scenario 2 above. Don't worry though, I am still going to facilitate using this without Home Assistant. |
@genebean is this project still ongoing? |
On 11/29/22 13:16, kodepharm wrote:
@genebean <https://github.com/genebean> is this project still ongoing?
Hi!
No idea on the project status (I'm an end-user like yourself) but my
DarkSky is still working -- did see a notification the API was to stop
working the end of 2021 and its almost the end of 2022. (Maybe I
shouldn't tell!) Hope it does continue working or we find what to do
for updating.
… Message ID: ***@***.***>
|
@Barry-IA same, my pi is still able to fetch so i am not sure when is the actual cut off data from darksky. it seems like the entire community on gitter is also silent, i hope things are not abandoned. |
For a modified version with wind and weather data from OpenWetherMap |
@ciprian288 checked out your version of PiweatherRock, very nice. have you thought about using api data from tomorrow.io? i think genebean was thinking to replace darksky with it. |
Hello pi@mylittlepi:/etc/system/system $ sudo systemctl status PiWeatherRock Dez 15 11:15:11 mylittlepi systemd[1]: /etc/systemd/system/PiWeatherRock.service:1: Missing '='. I don't know much about Python and Linux, I'm more into Windows and Powershell. EDIT: two questions: |
Hello all. Here’s a short thread about where things are: |
Nice work @SloomR! I’ll take a look at what you’ve done sometime soon and see if it’ll help me move the rest of the project forward. |
Hey @genebean, |
The new API shut down at the end of 2022. If you had an account with the API's, the system still worked up and til March 31, 2023. https://darksky.net/dev. It has offically stopped working on a couple of my systems now. I have downloaded the one below, but still having problems as I didn't get the Raspberrypi IP after the reboot. There were no errors following the instructions.
Still searching for a replacement. |
Scott: I recently updated; below is an extract from my update notes. The ‘trick’ might be to rename the original PiClock directory to PiClock_old. The instructions are essentially those of https://github.com/n0bel/PiClock/blob/master/Documentation/Overview.md First boot and configure
Get all the software that PiClock needs. update the repository Get the DS18B20 Temperature driver for Python (optional) reboot Get the PiClock software BJM: Here his instructions need to be updated as still referring to DarkSky but the config file has the updated options. The ‘Map API Key’ section is modified slightly. BJM: Google Maps API key Mapbox api keys Now that you have your api keys… BJM: At ‘regular’ level, not superuser.
BJM: So to repeat, need googleapi -or- mbapi
AND
owmapi -or- tmapi.
Configure your PiClock Run it! BJM: Indeed! :) There are times/have been times when the wx maps stall. I’ve not needed to reboot as they automatically eventually update on their own – 20-30 minutes? HTH – longer than I anticipated but I had no idea where you got lost so I did pretty much the whole thing. Barry |
Barry,
This works very nicely, thanks for the info. Is there a way to set the
forecast from 10 days to 5 days? I've looked thru the config.py file, but
didn't see anything that would change things.
Thanks again.
Scott
…On Sat, Apr 15, 2023 at 4:41 PM Barry-IA ***@***.***> wrote:
Scott:
I recently updated; below is an extract from my update notes. The ‘trick’
might be to rename the original PiClock directory to PiClock_old.
The instructions are essentially those of
https://github.com/n0bel/PiClock/blob/master/Documentation/Overview.md
with my comments – hopefully highlight where you may have gone off-track.
“BJM” are my initials/comments.
First boot and configure
BJM: Read through and pretty much skipped as used the original SD card.
Actual start of PiClock is here:
Get all the software that PiClock needs.
Become super user! (root) (trumpets play in the background) (ok, maybe
just in my head)
sudo su -
BJM: remember the hyphen at the end! If you copy and paste some text
formats will change hyphens, quote marks, etc., to formats the Terminal
does not understand. I have a problem where double hyphens sometimes get
converted to a single long hyphen in LibreOffice.
update the repository
apt-get update
then get qt4 for python
apt-get install python-qt4
(manually confirm or stick a -y at the end)
pip install python-dateutil --upgrade
pip install tzlocal --upgrade
pip install python-metar --upgrade
apt-get install unclutter
BJM: The unclutter will work – if the system wants an updated file fine,
if not you’ll get a message stating is current and up-to-date.
Get the DS18B20 Temperature driver for Python (optional)
BJM: I skipped this step but will probably add it in later. Plus not sure
where it gets displayed.
reboot
To get some things running, and ensure the final config is right, we'll do
a reboot
reboot
Get the PiClock software
Log into your Pi, (either on the screen or via ssh) (NOT as root) You'll
be in the home directory of the user pi (/home/pi) by default, and this is
where we want to be. Note that the following command while itself not being
case sensitive, further operation of PiClock may be affected if the upper
and lower case of the command is not followed. ==> 10” PiClock → renamed
original directory to /PiClock_old
git clone https://github.com/n0bel/PiClock.git
BJM: So originally when I did this I received an error as the directory
was already present. Easiest way to rename a directory is via the Files
GUI. Also note it’s ‘n zero b e l’: some fonts won’t show its a dotted in
the center.
BJM: Here his instructions need to be updated as still referring to
DarkSky but the config file has the updated options. The ‘Map API Key’
section is modified slightly.
Configure the PiClock api keys
We need to set API keys for DarkSky and Mapbox or Google Maps. These are
both unless you have large volume. The PiClock usage is well below the
maximums imposed by the no cost api keys.
Map API Key
You have your choice of
MapBox -or- Google Maps to get your underlying maps from. You only need
one or the other (mbapi -or- googleapi)
and
OpenWeatherMap.org -or- Tomorrow.io
BJM:
mbapi = (Get your own!!) Also make sure to begin and end with the quote
mark.
owmapi = (Get your own! Pay attention to the single quotes. I have a Pi3
running HomeGenie and used that one without problem.
Google Maps API key
– See original.
Mapbox api keys
(I’m using Mapbox)
Now that you have your api keys… BJM: At ‘regular’ level, *not* superuser.
cd PiClock
cd Clock
cp ApiKeys-example.py ApiKeys.py
nano ApiKeys.py
Put your api keys in the file as indicated
change this to your API keys Map API keys -- only needs 1 of the following Google
Maps API key (if usemapbox is not set in Config)
googleapi = 'YOUR GOOGLE MAPS API KEY'
Mapbox API key (access_token) [if usemapbox is set in Config]
mbapi = 'YOUR MAPBOX API KEY'
If you want to use Openweathermap.org, uncomment and add appid
owmapi = 'YOU OPENWEATHERMAP APPID'
If you want to use tomorrow.io, uncomment and add appid also
comment/remove owmapi if you're using tomorrow.io tmapi = 'YOUR
tomorrow.io API KEY' BJM: So to repeat, need googleapi -or- mbapi AND
owmapi -or- tmapi.
Configure your PiClock
here's were you tell PiClock where your weather should come from, and the
radar map centers and markers.
cd PiClock
cd Clock
cp Config-Example.py Config.py
nano Config.py
BJM: Update your location. Note the space between the two. I commented out
the default line to retain the example. While in there I updated the zoom
levels of the radars. On my 10” screen I’m using Radar1 = 5, Radar2 = 7,
Radar3 = 9, and Radar4 = 11. (That’s a shortcut notation; think it’s
zoom=.) The exact level depends on personal preference and I think the size
of the screen.
I skipped the NOAA WX config.
Run it!
You'll need to be on the desktop, in a terminal program.
cd PiClock
sh startup.sh -n -s
Your screen should be covered by the PiClock YAY!
BJM: Indeed! :) There are times/have been times when the wx maps stall.
I’ve not needed to reboot as they automatically eventually update on their
own – 20-30 minutes?
HTH – longer than I anticipated but I had no idea where you got lost so I
did pretty much the whole thing.
Barry
—
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKSZNKFQMSVRQZP7L53S3LXBMPYPANCNFSM4LYCJHWA>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Virtutis Gloria Merces
|
Hi Scott! Short answer: no idea. Long answer: you’re getting ten days?? Mine shows four for the current day (three in three hour increments plus the day’s summary, then one each for the next five days. ...Oh: guess that’s the five days you’re wanting: the coffee hasn’t kicked in yet! Half-thinking (some coffee is working [grin]) you meant you’re getting a five day forecast and desire ten. One part of the solution is to find if the forecast source offers ten days. Another would be updating the overlays: in PiClock/Clock/ subdirectories and have Config.py point to the new ones. ...Things might also display differently if configured for a digital clock vs. analog. I have an analog one here. I’m thinking of if I added five more blocks to the weather forecast ‘ladder’ the displayed information would be too small to read, or if add a second ladder column would distort the roundness of the clock display. Barry |
Barry,
Thanks for the reply. My bad. I'm using the Pi 7" screen and had seen all
of the boxes down the right hand side and thought it was 10. It is a bit
small to see everything. There are 9 boxes in total, 4 for the day and then
the 5 day forecast. I have the display set to the analog clock as well.
Tried the digital, but went back to the analog.
My other question is, how do I stop the script to get back to the desktop?
I've crtl+q and crtl+c and esc, but nothing seems to work. Do you know?
Need to get the PI's timezone set correctly.
Scott
…On Sun, Apr 16, 2023 at 6:41 AM Barry-IA ***@***.***> wrote:
Hi Scott!
Short answer: no idea.
Long answer: you’re getting ten days?? Mine shows four for the current day
(three in three hour increments plus the day’s summary, then one each for
the next five days. ...Oh: guess that’s the five days you’re wanting: the
coffee hasn’t kicked in yet!
Half-thinking (some coffee is working [grin]) you meant you’re getting a
five day forecast and desire ten. One part of the solution is to find if
the forecast source offers ten days. Another would be updating the
overlays: in PiClock/Clock/ subdirectories and have Config.py point to the
new ones.
...Things might also display differently if configured for a digital clock
vs. analog. I have an analog one here. I’m thinking of if I added five more
blocks to the weather forecast ‘ladder’ the displayed information would be
too small to read, or if add a second ladder column would distort the
roundness of the clock display.
Barry
—
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKSZNIUHSXUWCHNQM5UGNDXBPSHJANCNFSM4LYCJHWA>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Virtutis Gloria Merces
|
Hi Scott! Yeah: a 7” screen is a little small. I have one here (used for something else) and I think I’d need my reading glasses plus the magnifying glass to read the forecast. A 10” screen is nice – start dropping hints for your birthday or next gift event! (Be a bit greedy and go for a touchscreen one!) F4 is the stop/halt command. F2 to start/stop the NOAA wx radio. Space bar/left arrow/right arrow to change pages. The -n and -s switches to startup.sh: Look in startup.sh, the “# wait for Xwindows and the desktop to start up “ section for this and other fun stuff. Make a backup copy of the original before playing! Barry |
@ciprian288 i did fresh install today and the app will attempt to launch with a flicker of black window but then nothing happens. any idea why this is ? thanks |
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
|
According to https://blog.darksky.net, Apple has purchased Dark Sky and will shut down the api at the end of 2021. Thus, we need a new data source.
The text was updated successfully, but these errors were encountered: