crystal-face
crystal-face copied to clipboard
Weather is not updating
My weather stopped updating and I saw a lot of other people in the reviews mention it. Looks like the subscription to openweathermap.org has reached its limit.
Thank you for reporting and investigating this. I believe this is due to abuse of the API key, by using it to call the OpenWeatherMap One Call API, which does not fall under the Open Source allowances. I have not been able to track down the culprit app, so I may be forced to disable to existing key, and release a new version of Crystal that uses a new key. I will continue to look into this ASAP.
To try and minimise disruption to any forked apps in production, I've asked OpenWeatherMap whether they're able to disable access to the One Call API only for the existing key, or failing that, disable the key temporarily, rather than forcing me to delete it. At last resort, I'll delete that key, create another, and update Crystal as mentioned above. I'll update here as soon as I hear back.
If anyone has any ideas how to track down the culprit, please let me know 😄
What about just making the API key as a user input in the settings? Each person could then sign up and get there own Free Key and enter it
@warmsound I am a professional system admin and web application dev - there is really very little that can be done here. Once your API key is exposed, there is no way to know who is using it, or why. Even if you say, got a list of connecting IP addresses, you wouldn't have any way to know who was who, and even if you did, there really isn't anything you could do - besides nicely asking them to stop.
I must say, I really love this face, and it is extremely kind of you to provide a key, so that people (especially non-technical) can just install the watch face and use it immediately. I imagine my father (who is in his 70's :smile:) attempting to get himself a key and being immediately confused by what it is he is even trying to do. So I understand why you've gone this route, but unfortunately, I honestly don't think you can really continue to do it this way. I haven't checked, but I would be very surprised if this didn't immediately violate OpenWeatherMap's terms of service. Although, it would be interesting to hear their take on this particular use case.
I agree with @notfixingit3 - adding a configuration option makes perfect sense and would immediately allow people to get their weather back up and running. I would be happy to help implementing this, although I have no experience with Garmin CIQ, I am so inspired by this great face that I would be happy to learn, and maybe even create my own face one day! Not to mention, I have used this face for months for free, so the very least I could do would be to donate my time to help out.
@notfixingit3 @crossbap thank you both for your input on this, and @crossbap for your kind words and offer of help!
OpenWeatherMap have an Opensource Plan, which increases usage limits, for free, up to the equivalent of the Developer Plan (3,000 calls per minute). It's described here, under the "API calls return an error 401" FAQ:
For FOSS developers: we welcome free and open source software and are willing to help you. If you want to use OpenWeather data in your free software application please register an API key and file a ticket describing your application and API key registered. OpenWeather will review your request lift access limits for your key if used in open source application.
I have registered Crystal for use with the Opensource Plan, so I believe that should be OK within OWM's rules. I did actually start by allowing users to sign up for their own key under the Free Plan, and enter it in Crystal's settings, but I recall reading this may actually have been against OWM's conditions of use (multiple OWM accounts, for same app) - if I find where this is written, I'll update here.
The issue we have at the moment is that the Opensource Plan only lifts limits for the Current Weather API, which is what Crystal uses. One or more other apps are using Crystal's API key to call the One Call API, which has much lower limits - it's these calls that have caused the key to be blocked.
I'd like to try cycling the key at least once, to see if I can clear the block, and maintain the ease-of-use. I wonder if there is a way to obfuscate the key somehow, or at least make it harder to use/abuse? If the problem happens again, then I guess we have no choice but to put the "own key" setting back in (and you guys get to say "I told you so!" 😄).
BTW, OWM support have confirmed that it is not possible to block/disable a particular key, only an entire account. It's also not possible to disable only the One Call API for a given key.
Awaiting activation of new OWM key (a couple of hours) before testing. I may need to contact OWM to include the new key under Crystal's Opensource Plan, and/or to unblock the account.
It's not really possible to stop people from abusing a key if it's publicly available like this. This is a temporary solution, but I welcome it since we'll be able to use the watch face again. One option that I've seen in other apps is to allow users to change the key in the settings if needed, but a key is set by default.
I think that's a great compromise 👍, and it's probably worth me implementing even if the cycled key works for a while (it will be interesting to see how long it works for...).
The new key is active but still blocked, so I've contacted OWM to see if they need to do something their end, or if I just need to wait. I'll wait for the new key to work, before releasing a new version of Crystal.
I wonder why you use your own weather provider in the first place, can't you just use the data that the Garmin watch has already? At least my Vivoactive 4 has a weather widget. Or is that data not available on all the watches you support?
I've just seen that the CIQ API (Toybox.Weather) has support weather only for a range of devices... But maybe you could prefer their API and only fallback to OpenWeather if it is not supported by CIQ on the device where Crystal is running? This would take pressure of the API key as well..
Update: OWM have confirmed that everything should be working once the new key is active, but even after 24 hours, my account is still blocked, so I'll have to chase again.
@2b2bff good question. Being able to query weather conditions via the Connect IQ API is relatively recent addition (version 3.2), so not many watches are supported. The API also relies on there being cached current conditions, which may not always be available. But it may still be a useful fallback, in case, you know, the OWM API is blocked for some reason... 😄 I will look into implementing this.
I've just released v2.4.6, which should get users up and running again for a while.
I'll leave this issue open for monitoring, and to implement the fallbacks suggested above:
- Ability to supply own OWM key via settings;
- Toybox.Weather support, subject to testing (unsure how often cached weather is available).
Thanks everyone for the informative discussion.
Hi I think this bug is still prevalent. I updated last night and a few mins later the weather updated to the correct data. This morning it's gone back to default...
PS the watch face is brilliant. Thank you for your work
@spasypaddy thanks for your kind words, and for reporting on this issue! Has your weather started working again, by any chance?
A couple more data points: shortly after your comment, I tested weather on the simulator (with the new key), and the correct weather showed very quickly. I then upgraded my own watch: "..." showed for a few minutes after acquiring GPS lock, but the correct weather did eventually appear, and has remained up-to-date during the day.
@warmsound it's not showing the correct weather sadly. Is there a way to force a refresh on my watch of the weather? Its been wrong all day sadly.
@spasypaddy Just to check: are you seeing a sun icon, with "..." displayed beneath?
Switching away from Crystal to another app/watch face, and then back again, or changing the settings, should be enough to trigger another weather request, assuming you have bluetooth and internet connectivity.
I can see from the reviews for the latest version that weather is fixed for some, but not all users, so I may have to look into this further.
Hi I'm seeing cloudy and 27 degrees. Which is what it was doing all of last week before the update.
I quite like the idea of having an advanced option of using your own api key if needed. Not sure how easy that would be to implement
Thanks
On Wed, 31 Mar 2021, 00:03 warmsound, @.***> wrote:
@spasypaddy https://github.com/spasypaddy Just to check: are you seeing a sun icon, with "..." displayed beneath?
Switching away from Crystal to another app/watch face, and then back again, or changing the settings, should be enough to trigger another weather request, assuming you have bluetooth and internet connectivity.
I can see from the reviews for the latest version that weather is fixed for some, but not all users, so I may have to look into this further.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/warmsound/crystal-face/issues/187#issuecomment-810634478, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ6G5LVJTPSHUV2O6WXIHFTTGJKFPANCNFSM4ZT66OBQ .
Version 2.4.7 has just been released, with a new "OpenWeatherMap API Key Override" setting. I'll be investigating Toybox.Weather next.
My weather seems to have stopped updating in the last few days. I've tried the API Key Override but it doesn't seem to have helped. Any ideas?
(FANTASTIC watch face by the way, thanks for your hard work on it)
My weather and sunset keep going to incorrect values for me. Sunset specifically seems weird because it defaults to 2:30AM. Getting a GPS lock will fix it but it doesn't last a full day.
I've added my own API key too.
Anybody came up with a solution for this? I still have this issue. The weather is stuck at 27C cloudy. I have tried entering my own OWM key, but it doesn't help.
If you look for the Crystal-Tesla watch face, I've implemented the Garmin Weather API to be used instead of the OpenWeatherMap. All it requires is that your watch is at API level 3.2 (that's when Garmin added the feature). You can see which API level your watch is here:
https://developer.garmin.com/connect-iq/compatible-devices/
If you look for the Crystal-Tesla watch face, I've implemented the Garmin Weather API to be used instead of the OpenWeatherMap. All it requires is that your watch is at API level 3.2 (that's when Garmin added the feature). You can see which API level your watch is here:
https://developer.garmin.com/connect-iq/compatible-devices/
Just installed it working great thanks