Re: Clock and Temperature 1.10

fxshpac wrote:

Just an idea on getting around with the API key limit set by worldweatheronline. If you can provide a way in widget customization for each of us to enter our own API key the limit will not be hit that fast since each key has its own limit. Hope it makes sense to you. I myself have been looking forward to a fully working version of the widget and I thought this may help you in some way. Thanks.

Thanks for the suggestion fxshpac. I uploaded a new widget "Clock and Temperature - TEST" that should allow you to put in your own API key.

Please let me know if this works for you (and anyone else who cares to test).

Re: Clock and Temperature 1.10

Unfortunately I can't find a direct link to your test version and the link i found still shows the original version.

Re: Clock and Temperature 1.10

Can you try http://chumby.com/guide/B6ECFB59-DE04-3 … 062/widget to see if that gets you to the appropriate widget?

I did verify that it is marked as "Public," so it should be accessible.

Re: Clock and Temperature 1.10

I've marked the TEST widget public (I still have to do that - the "public" checkbox when uploading is a *request* to me to make it public).

Re: Clock and Temperature 1.10

Thanks very much Duane. I should have guessed that. By the way, I am still trying to get things fixed so that I can cache information in the local Chumby memory. I am just very slow at troubleshooting.

fxshpac, please let me know if you are able to use this version of the widget, once you get a World Weather Online API key. (You can go to this link: http://blog.worldweatheronline.com/2014 … um-api-key to register for your own key.

Re: Clock and Temperature 1.10

Yes I tested the widget today but it's not working for me unfortunately. Firstly I got the free API key which is a string of 29 letter/digits starting with 5f96. I entered the string in the customization UI along with other info such as zip code and saved them successfully. Then I rebooted my chumby device which is a Infocast 8 that's activated and subscribed. After reboot, I selected the test widget to play, at this point the temperature is showing 3 dash and a message of "current temperature not available" below that. In the meantime, in my developer.worldweatheronline.com account, I notice that the following counters are slowly incrementing and it seems coincide with the times I restarted the widget.

KeyError    15

Just to see if my key works or not, I entered the following URL in my browser and I got the XML formatted output successfully and I don't see KeyError counter increasing this time, instead, Response 200 counters are increasing for the first time. So this may indicate my key is working at least.

api.worldweatheronline.com/free/v2/weat … 5&key=[my-api-key]&q=[my-zip-code]&format=xml

200    2

Let me know if you need any more data/log for your investigation. Thanks

Re: Clock and Temperature 1.10

Just to report one thing I just found out. When I changed the string "v2" in the URL from last post to "v1", I got KeyError Response instead. So maybe your widget is still using v1 API so it won't work with my V2 API key?

Re: Clock and Temperature 1.10

Yes, you are correct. I did not realize that World Weather Online had changed from V1 to V2 keys, so my URL was calling the old version of the API. I did get my own V2 key, and made a couple of changes. Please let me know if it is now working for you.

If you are loading the current version of the widget, it will show 1.70 in the lower right hand corner.

Re: Clock and Temperature 1.10

Happy to report that widget version 1.70 works for me now. It displayed the temperature correctly after I rebooted my device to picked up the latest version. My developer account is also showing no KeyError counter increasing and only 200 counter increasing. So far so good and I will give it a few more days to see if it stays this way. Thanks again for your effect making it work again ehertz. I think until you work out the caching method this is the best i can ever expected. Happy New Year. smile

Re: Clock and Temperature 1.10

Excellent news! I am very glad to hear that things are now working properly. Please do let me know in a few days if you see any bugs pop up.

And, I do hope that 2015 is a good year for you and the rest of the Chumby community.

Thanks to Duane, 2014 was truly an excellent one and I look forward to his continued dedication and support of this whole enterprise.

Re: Clock and Temperature 1.10

I have now updated the widget, and given it the new simpler title "Clock and Temperature". It should cache results each time it retrieves the current temperature. That way, whenever the widget loads, it looks at the time the last temperature was read, and, if it was less than a certain time period, it will use the older temperature.

My current plan is to watch the number of calls to the World Weather Online API for several days, and see if I need to change the caching period, to make sure that I do not bump up against the daily limit.

I also noticed when I checked the Chumby website that the widget is not visible. I assume that Duane needs to reapprove this as a public widget.

Finally, Duane, would it be possible to add the variable _chumby_widget_state to the "Chumby Property Dictionary" at http://wiki.chumby.com/index.php?title= … Dictionary along with a brief description of what the variable does and its limitations (like how many characters can safely be stored)? Also, if there are other properties or variables that never quite made it to the wiki, it would be helpful to get those included. Your earlier note about using this variable was extremely helpful. It just took me a while to figure out the mechanics of doing this and testing it to make sure it worked the way I needed. Again, you have my thanks.

Re: Clock and Temperature 1.10

ehertz wrote:

I also noticed when I checked the Chumby website that the widget is not visible. I assume that Duane needs to reapprove this as a public widget.

I marked it public, let me know if there's any further problem.

Cleaning up any loose bits and bytes.

Re: Clock and Temperature 1.10

Looks good diamunt. Thanks for the help.

From what I can see, WWO seems happy with the load.

If anyone does see any problems with the widget, please post so I can investigate.

Re: Clock and Temperature 1.10

Also, is anyone still using the TEST version of the widget? If I do not hear from anyone that you want to keep it, I will delete it at the end of the week. But if someone does want to keep using it with their own key, let me know, and I will leave it up, but probably rename it to avoid confusion.

The advantage in using your own key is that you can get much more frequent updates, since the "official" version using my key is limited in the number of queries it generates.

Re: Clock and Temperature 1.10

So far the TEST version has been working all the time since a few days ago and I really like it. Therefore I think it's a good a idea to keep the TEST version available as a plan B in case the official version hits the limit again once usage picks up after more people start using this widget.

Another better idea in my opinion is to combine this two into one version by including API key input box in customization UI. Users can leave it empty in which case the widget will use the built-in API key, otherwise it will use whatever the key provided.

Either way, let me know what you think. Thanks.

Re: Clock and Temperature 1.10

fxshpac wrote:

Another better idea in my opinion is to combine this two into one version by including API key input box in customization UI. Users can leave it empty in which case the widget will use the built-in API key, otherwise it will use whatever the key provided.

I probably should not tell you this... but...

The way that the software is written in the Test version of the widget does exactly that. If you leave the API box blank, you will see that it still retrieves the temperature, but it does it under my key (which is not indicated anywhere). That made it much easier for me to test, because I am too lazy to keep typing that long code into the box, and I made too many mistakes.

So please keep it quiet, and don't tell anyone else the secret.

Re: Clock and Temperature 1.10

I don't know if I'm doing something wrong, or the test version has a bug...

but I initially told it F and my zip, and tried it (with your default key) it showed me C temps.
I then got a key for myself, and added that, still showed C temp.

I just now went in, clicked c, then f on the config screen, hit save, and then reloaded the channel, and I get f temps.

Cleaning up any loose bits and bytes.

Re: Clock and Temperature 1.10

diamaunt wrote:

I don't know if I'm doing something wrong, or the test version has a bug...

but I initially told it F and my zip, and tried it (with your default key) it showed me C temps.
I then got a key for myself, and added that, still showed C temp.

I just now went in, clicked c, then f on the config screen, hit save, and then reloaded the channel, and I get f temps.

No, you are not doing anything wrong. This is a bug that I also noticed, but have not been able to track down.

The default is to use Celsius temperatures, and I noticed that the widget (actually both versions) save in C, even if you click F. But the workaround that does seem to work reliably is, as you discovered, while you are on the Config screen to toggle between F and C and then back to F. Then when you save, it seems to stay in F.

It is annoying, but it seems like once the temperature units are set, it remembers the right selection.

Re: Clock and Temperature 1.10

Just to let folks know that I have noticed that the temperature display seems to be quite flaky for the last few days. As far as I can tell, the problem is on World Weather Online's end. When I just tried to go to the website's homepage, it is not loading.

I will keep monitoring over the next few days to see if things get fixed. If not, I will see if there is an alternate weather information provider I can use (for free, of course).

Last I checked a couple of weeks ago, my API key was getting about 6,000 hits a day, so well under the limit of 12,000 that WWO allows.

Re: Clock and Temperature 1.10

Just got this email today:

Dear API User,

As you all are aware that we have been under constant DDOS attack on our network for last few days. We have tried everything to get our solution back but it seems the attack is not subsiding.

Therefore we request all our API users to please change your request from api to api2

Thank you,

World Weather Online Team

I am not allowed to post the url that they want developers to change to.

Re: Clock and Temperature 1.10

Thanks for sending that along onefish2. I have not yet received that email.

I did update the app to version 2.47, which uses the alternate api. It seems to work fine in my testing. However, you will not be able to see that new version until the widget is approved by Duane or another moderator.

The version number is indicated in the lower right hand corner.

Re: Clock and Temperature 1.10

I also updated the similar version of the widget that allows users to use their own API key.

That version is now 1.71. I also changed the name of the widget so it is now 'Clock and Temperature - BYO Key'.

Re: Clock and Temperature 1.10

Both widgets are public.

Re: Clock and Temperature 1.10

Thanks Duane.

Unfortunately, it looks like World Weather Online is still being hit with a major DDOS attack that is affecting both the old and new API websites, so the widget is still not working reliably.

I will continue to monitor the situation and see if I do need to make other changes in order to get the temperature indication back.

Re: Clock and Temperature 1.10

For those using this widget, you probably noticed that the temperature has stopped being reported. Or, more accurately, it is only being reported intermittently. I took a look at the problem and found out that World Weather Online decided to change their terms, so that a free account can now make only 1,000 calls per day, rather than the 20,000 that were previously allowed.

According to their statistics, they are getting hit with about 6,000 calls per day by my widget, so my app gets blocked about four hours into the day.

Over the weekend, what I will do is modify the timing so that instead of updating the temperature every 20 minutes, it instead will ask for a reading every 2 hours sad.

The other alternative that you can use is to use the widget "Clock and Temperature - BYO Key". This is an alternative version of the widget that allows you to use your own WWO key to get temperature readings, so unless you have over 300 chumbys using that key, you should be able to get temperature readings reasonably frequently.