Topic: Clock and Temperature 1.10

The "temperature" side of things has stopped working.  It used to work immediately after the relaunch, but now it just says "current temperature is not available".

Happens on both of my C1s and with the app preview on the site.

Re: Clock and Temperature 1.10

That's a third-party app - the author, ehertz, hangs out here, so post a comment to the app and he should get it.

Re: Clock and Temperature 1.10

Thanks for your note sweh. I am aware that the temperature is no longer displaying. The situation is that the weather information provider, World Weather Online, changed their URL and the parameters associated with retrieving information.

What I need to do is update the widget to get the new URL in place and the parameter name fixed. Unfortunately, because of some other things going on right now, I do not expect to be able to start working on this until the middle of October.

Once I get the widget updated, I will work with Duane to make the updated version available. Thanks very much for your patience.

Re: Clock and Temperature 1.10

Ironically this is the one app that I was willing to pay for in order to regain access again. It is the only clock face I use on my Chumby. I was actually thinking of canceling my subscription thinking it might have been on the server side and not the software. Thank you for clarifying what was going on ehertz. I hope you can find the time to fix it soon. I really miss the full functionality of it.

Re: Clock and Temperature 1.10

I (finally) figured out how to properly modify this app, so I think it is now working properly to display temperature. I also fixed a annoying bug related to when temperatures go over 100 degrees, so that the font reduces, rather than having the display cut off. Please let me know if you see any issues with this update.

6 (edited by infocastme 2014-12-07 10:12:52)

Re: Clock and Temperature 1.10

Thank you for fixing a great widget!

Working great on my I8's and I3.5's

Temp is 1 degree difference from NOAA

Re: Clock and Temperature 1.10

Hmm, I'm getting a temperature, but I'm not sure it's the _right_ temperature.  The display says 48F (both on chumby and on the web site preview); a real thermometer says 41F.  The worldweatheronline website says 38F for the same location (07410 zip code).

Re: Clock and Temperature 1.10

http://www.chumby.com/guide/CEACBBC4-0B … 646/widget for anybody wondering which wink

Cleaning up any loose bits and bytes.

Re: Clock and Temperature 1.10

Thanks for updating. I get a display but it always shows 3C or 37F regardless of the code I put in.

Re: Clock and Temperature 1.10

gordonmd wrote:

Thanks for updating. I get a display but it always shows 3C or 37F regardless of the code I put in.

sweh wrote:

Hmm, I'm getting a temperature, but I'm not sure it's the _right_ temperature.  The display says 48F (both on chumby and on the web site preview); a real thermometer says 41F.  The worldweatheronline website says 38F for the same location (07410 zip code).

infocastme wrote:

Temp is 1 degree difference from NOAA.

gordonmd and sweh, I will have to see what is going on, which will not happen until this evening. Obviously, I screwed something up. Definitely would not be the first time.

As for the temperature difference infocastme, you should understand that different services use different locations to measure temperature. In my area, some are using the temperature at the airport (RDU). Others are using more neighborhood-based locations. Weatherbug uses a thermometer located in a high school about 10 miles from my house. Meanwhile, Weather Underground uses weather stations located in people's backyards. For example, you might want to compare Weatherbug and Weather Underground to see some of the weather stations they are using in your own area.

The other issue that comes up is the update time. World Weather Online says that they only update their reading once an hour, while others give much more frequent updates.

Just for fun, I compared my local temperature within the last few minutes (all in Farenheit):
Accuweather - 35
NOAA - 36
Yahoo - 36
Weather.com (Weather Channel) - 36
Weatherbug - 36.3
Weather Underground - 36
World Weather Online - 36

My widget uses World Weather Online, because they have a relatively easy interface to use, and because they seem to provide relatively comprehensive coverage for locations throughout the world. I suspect that some of the other services emphasize only US temperatures, although I do not know that for sure, I admit.

11 (edited by bobsz 2014-12-08 08:45:38)

Re: Clock and Temperature 1.10

My Chumby 1 is also showing incorrect temperatures. Temperature readings change through the day, so I guess it's actually getting readings from *someplace,* just not here. My zip code is 11561, widget shows about 8-10 F warmer throughout the day. Tried putting in the name of my town, and other zip codes. Widget seems to stick in mid 40's.

BTW, "Superclock" widget shows correct temps, even though the location for both is the same (JFK airport.)  Thanks for your work on this.

Re: Clock and Temperature 1.10

Just to continue the saga a little more, I have this widget running on the Chumby I keep on my desk at work. I noticed that it stopped receiving any temperatures about an hour ago, even wrong ones.

When I took a look at the URL that I use to retrieve temperatures, I saw this error from World Weather Online:
Queries per day exceeded: Queries exceeded (13200 allowed).

So, I guess my widget is just a little too popular.

Perhaps someone has a solution for me. My Chumby programming skills are definitely still just slightly above beginner.

The problem is that WWO asks that any free users (like me) cache weather data and then retrieve new readings just once per hour, because they only update their internal tables once an hour. Except, I do not know how to cache data, assuming that is even possible in the Chumby system. I do have the widget set so that if someone keeps the widget pinned, it will request an updated temperature every 5 minutes. But I suspect that the vast majority of folks are like me, and have this widget in a channel with several others, so every time the widget comes up in rotation, it requeries the WWO database.

Any ideas from a programming professional as to how I could get around that by storing temperature data somewhere instead of requerying the database?

If not, I will see if I can find another temperature source that is a little more forgiving. Or maybe there is a way to rotate temperature providers at random.

Thanks for any ideas anyone has to fix this problem permanently.

Re: Clock and Temperature 1.10

If your widget saves data in the _root variable "_chumby_widget_state", then it will be saved by the CP across executions when the widget quits, as long as that channel is playing.  I think it will hold about 100 bytes.  It needs to be a simple string.

This is how a lot of chumby-authored widgets cache small amounts of transient data across executions.  You could store the temp and a timestamp, and only fetch if it's been more than a couple of hours or so.

This only works on actual devices - not the web site.  It does not survive channel changes, reboots, CP restarts, etc.

This was implemented in the C8 and I8 CPs back in the Chumby era - I added it to the CC/C1/I3 CP just a few months ago.

This, of course, only caches for a single device, so you still might exceed the cap across all devices.  The correct solution is to provide some sort of server-side cache to consolidate caching across multiple devices.

Re: Clock and Temperature 1.10

Thanks Duane. I will see if I can figure out how to use the _root variable to get the volume of requests cut down considerably.

For other folks using this widget, I just uploaded a new version that disables the temperature function. I need to do this to reset my query allowance so I can do my own testing. You can tell you have the latest widget because there will be three dashes where the temperature would be.

Also, I did find the problem in my code that screwed up the location query. I had put in an extra line as part of testing, and that set a fixed location. That is now out. Thanks to everyone for noticing the problem.

I will try to get a revised version that functions properly in a few days.

Re: Clock and Temperature 1.10

I love this widget. Glad to see its up an running again!!

Re: Clock and Temperature 1.10

I see we now have numbers again :-)

Yay!

Re: Clock and Temperature 1.10

And now the numbers have gone again :-(  Heh!

Re: Clock and Temperature 1.10

sweh wrote:

And now the numbers have gone again :-(  Heh!

Frustrating, isn't it?

Let me explain what I did as a temporary measure.

I now have the widget set to retrieve temperatures for the first 15 minutes of every hour, and then stop. My rationale for that is so I can keep down the load on World Weather Online below my allowed 12,000 hits per day under my free user key. That way, I have some room to do testing without being locked out of the website in the evening when I do my testing. Also, I want to allow folks to test their various temperature locations to make sure that everything is now working wherever you might be.

(For anyone interested in writing their own widget using this same website, here are the FAQs related to free usage of the weather API: http://www.worldweatheronline.com/api/f … terms.aspx )

I am still trying to work through Duane's suggestion about how to store data locally, but do not have that working yet. (I'm sure it is very, very obvious to everyone that I do not make my living as a professional programmer.)

I really do appreciate everyone's patience as I work through this process.

Re: Clock and Temperature 1.10

Thanks for the update!

Re: Clock and Temperature 1.10

Hmm, dunno if you've added your debugging location back into the code, but the temperature my chumby just displayed was 54F... worldweatheronline website says 35F :-)

Re: Clock and Temperature 1.10

sweh wrote:

Hmm, dunno if you've added your debugging location back into the code, but the temperature my chumby just displayed was 54F... worldweatheronline website says 35F :-)

Oh dear. Let me check when I get home tonight. If so, I will get this fixed quickly.

Re: Clock and Temperature 1.10

Ehertz, to confirm just in case  - be sure when you update the app to bump the version number.  This is required for the chumby devices to recognize the app has changed and to pull down a fresh copy for the local cache.  Note also that it might take a day or two for the devices to naturally notice the change - so users should manually reload the channel.

Re: Clock and Temperature 1.10

Hi ehertz, not sure what happened just now (1130 Melbourne time) I had just rebooted C8 and it showed 24' C which is correct but after the next cycle it reverted to dashes. Must be nearly there. Thanks

Re: Clock and Temperature 1.10

gordonmd wrote:

Hi ehertz, not sure what happened just now (1130 Melbourne time) I had just rebooted C8 and it showed 24' C which is correct but after the next cycle it reverted to dashes. Must be nearly there. Thanks

Hi gordonmd. At this point, this is "normal." In the version currently posted, the widget pulls the temperature for the first 30 minutes of each hour, and then stops, which is why you saw one temperature displayed at 1130, and then when the widget came around again at 1132 or so, you would see dashes. Then when you got to 1200, you should see temperatures displayed again for the next 30 minutes.

The reason I did that is to cut down on the number of times the World Weather Online server gets asked for a temperature under my key. As a free user, I can get up to 12,000 calls per day. After that, they cut me off for the rest of the day, or, I get to pay. The first day the widget was active, my key was shut down after about 14 hours. As much as I love Chumby folks, I am not willing to pay what it would cost to buy 25,000 or 30,000 hits per day. (Pricing is posted on the WWO website, if you are interested.)

So I have things set so at least I can prove that the temperature will display properly for different areas, while still leaving me some of my call allowance to work out the kinks in the evening.

I am still trying to implement Duane's suggested fix for caching temperatures to reduce the number of calls to something under my allowance. WWO asks that people retrieve temperatures no more than once per hour and then cache the results. The Chumby offers some limited caching ability. Which sort of goes along with my limited programming ability smile

Eventually, I will get this all resolved. I do appreciate your patience with me.

Duane wrote:

Ehertz, to confirm just in case  - be sure when you update the app to bump the version number.

Thanks for the reminder Duane. Yes, I discovered that issue by not putting in a new version number, just posting a new file, and then seeing that even rebooting my Chumby did not load the new file. For me, this is all a lot of trial and error.

Re: Clock and Temperature 1.10

Hi ehertz,

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.