Re: Clock/temp/wind by ehertz

ehertz wrote:

Just to be sure I understand eastdiamond, you want the clock to reflect the time in the time zone corresponding to where the temperature is being read. In other words, if you are in the Eastern time zone (Washington DC), and you ware looking at a temperature in the Central time zone (Milwaukee), if the time is 10:00 AM in Washington, you want the clock to display 9:00 AM to correspond to the correct time in Milwaukee. Is that correct?

That definitely would take more configuration than I put into the widget. At this point, I do not know of any Clock widgets that allow you to specify a time zone other than the one on your Chumby. Perhaps someone else does and can suggest that widget?

openweathermap.org does provide a timezone parameter. However, it is listed as a "Prototype Parameter" and when I took a look at it for my location, it just gives a blank result. So I could not use that to make an automatic adjustment to the displayed time. I suppose I could have a field on the configuration screen that allows a time zone offset parameter, like -1 if you want to see Milwaukee time while in Washington. This does get back to the real estate question on the configuration screen, which I already don't like, because it is getting kind of crowded.

Unless I hear more feedback asking for this option, I do not plan to do anything about it.

ehertz, I understand your position. I just wanted to make sure that I " customized the widget " correctly.
I do love your widget thanks.

Re: Clock/temp/wind by ehertz

Hi ehertz,

I used to use Omni Clock beta on my Dash (in the Sony days!) and really loved it for its simplicity and clarity and legibility of its display  but, as a Canadian, was never able to get the temperature to work. However, because of the "picture in picture" way that Sony set up their home screen I could see the temperature on their small section of the screen and it would suffice, although I hated to see the prettily coloured 00 on my Omni Clock!

Then came the Sony "issues" and Duane rode in on his white horse and saved the day, and all was good... and then I discovered "Clock and Temperature" by ehertz and was overjoyed to see that it to was basically very similar to Omni Clock with a (hooray) working temperature display! I used a screen grab of Omni Clock's display to get the correct colours and made myself a perfectly familiar looking clock!

Problem is, the temperature display sometimes works and sometimes doesn't (most often after a restart -- I have a setup where I programmatically switch between the 'night clock' and yours. Night, very dim, between 10pm and 6:59am, then switch to yours at 6:59 and sound my alarm at 7am) and often it just shows dashes for the temp for hours on end and finally comes up with the (correct) temp. I'd like to see if this can be fixed or perhaps it's something I'm doing wrong. I suspect that it may have something to do with the fact that I am in Canada and have to enter my location as 'Edmonton, Canada.'

I was really excited to see the new version which included the wind speed but for some reason I was unable to make it work at all in terms of showing neither the temperature nor the wind speed, probably because for some reason the way in which you have to enter your location is different on this app.

Once again, many thanks for the excellent app.

Michael

Re: Clock/temp/wind by ehertz

Just to clarify, the temperature and wind data come from openweathermap.org. If, when the widget polls the site, it does not respond, or responds with a corrupted xml file, then you will see dashes displayed. For my location in North Carolina, USA, the site has been generally reliable, but definitely not 100%. Michael, if you are seeing dashes for extended periods, please go directly to the openweathermap.org website and enter your location directly. If it comes up with valid temperature data, then please let me know the location you are entering so I can test this myself.

In an earlier version of the widget, things were working fine for a relatively long time, and then they broke. When I finally did some troubleshooting, I figured out that the xml file that was now being sent differed just a little bit from the previous version. But that was enough to screw up my parsing algorithm so that it worked sometimes, but not other times. I think that is properly fixed in the current version 3.28 at least for US locations. However, it is possible that for Canadian locations, the xml file is again just a little different, so that my parsing is unreliable.

The bottom line: if you are seeing dashes on the widget, but valid data on the website, then the fault is mine, and I need to fix it. But if you do not see valid data on the website, then the problem is with openweathermap. Please let me know what your testing shows so that I can fix the problem if it is in the widget code.

Re: Clock/temp/wind by ehertz

Hi, I did what you suggested, entering ‘Edmonton, Canada’ as the city. It had no trouble bring up the correct weather instantly. However, it showed the city as ‘Edmonton, CA’ so I plan to try that instead and see if it resolves the issue. I’ll let you know.

Thanks for the advice.

Michael

ehertz wrote:

Just to clarify, the temperature and wind data come from openweathermap.org. If, when the widget polls the site, it does not respond, or responds with a corrupted xml file, then you will see dashes displayed. For my location in North Carolina, USA, the site has been generally reliable, but definitely not 100%. Michael, if you are seeing dashes for extended periods, please go directly to the openweathermap.org website and enter your location directly. If it comes up with valid temperature data, then please let me know the location you are entering so I can test this myself.

In an earlier version of the widget, things were working fine for a relatively long time, and then they broke. When I finally did some troubleshooting, I figured out that the xml file that was now being sent differed just a little bit from the previous version. But that was enough to screw up my parsing algorithm so that it worked sometimes, but not other times. I think that is properly fixed in the current version 3.28 at least for US locations. However, it is possible that for Canadian locations, the xml file is again just a little different, so that my parsing is unreliable.

The bottom line: if you are seeing dashes on the widget, but valid data on the website, then the fault is mine, and I need to fix it. But if you do not see valid data on the website, then the problem is with openweathermap. Please let me know what your testing shows so that I can fix the problem if it is in the widget code.

Re: Clock/temp/wind by ehertz

Well, it worked this morning. It’ll take a couple more days to make sure, but I’m hoping it was as easy as that. Thanks!

Re: Clock/temp/wind by ehertz

I set up a test channel of my own with two widgets: one for your location and one for mine. I have let it run for several hours yesterday and today. So far, I have not seen the dashes come up for anything other than a short period. But I will keep watching to try to track this issue down.

Re: Clock/temp/wind by ehertz

Hi ehertz, sorry to be the bearer of bad news. Everything seemed to be fine until this morning when it again reverted to its old, 'bad' behaviour. It has now been 1 hr and 30 minutes since the Dash switched to your app and the temperature still shows as just dashes, no value. I went to the openweathermap.org site and checked, I found no problem with displaying our temp so it definitely seems to be a glitch in the data fetching logic.

mickblu wrote:

Hi, I did what you suggested, entering ‘Edmonton, Canada’ as the city. It had no trouble bring up the correct weather instantly. However, it showed the city as ‘Edmonton, CA’ so I plan to try that instead and see if it resolves the issue. I’ll let you know.

Thanks for the advice.

Michael

ehertz wrote:

Just to clarify, the temperature and wind data come from openweathermap.org. If, when the widget polls the site, it does not respond, or responds with a corrupted xml file, then you will see dashes displayed. For my location in North Carolina, USA, the site has been generally reliable, but definitely not 100%. Michael, if you are seeing dashes for extended periods, please go directly to the openweathermap.org website and enter your location directly. If it comes up with valid temperature data, then please let me know the location you are entering so I can test this myself.

In an earlier version of the widget, things were working fine for a relatively long time, and then they broke. When I finally did some troubleshooting, I figured out that the xml file that was now being sent differed just a little bit from the previous version. But that was enough to screw up my parsing algorithm so that it worked sometimes, but not other times. I think that is properly fixed in the current version 3.28 at least for US locations. However, it is possible that for Canadian locations, the xml file is again just a little different, so that my parsing is unreliable.

The bottom line: if you are seeing dashes on the widget, but valid data on the website, then the fault is mine, and I need to fix it. But if you do not see valid data on the website, then the problem is with openweathermap. Please let me know what your testing shows so that I can fix the problem if it is in the widget code.

Re: Clock/temp/wind by ehertz

A few questions, you mention that it has been over an hour that you switched to the app, and it is still displaying dashes. Are you running just this one app in a channel, or are there more widgets and every time this one comes around, it displays the dashes?

(It should work fine as a single widget in a channel, but I am curious. For myself, I run a channel with just this clock on a dimmed display through the night. I much prefer it to the standard Chumby night mode, because I don't have to worry about accidentally hitting the display in the middle of the night and suddenly having the Chumby go back to its previous channel with a bright display. The widget should reach out to openweathermap every 15 minutes to get an updated temperature, assuming one is available.)

When you do see dashes, did you notice anything "odd" like going from a two digit temperature display to one digit? Is there any pattern, like at a certain hour of the day?

On my own Chumby, I did get a brief period where the temperature display for your location came up as dashes, but at the same time, I had dashes for my location, so I assumed it was a glitch on openweathermap's server. It went away after about 10 minutes.

I will keep watching and see if I can track anything down once I see this happen at a time when I can get to a computer.

Re: Clock/temp/wind by ehertz

Hi Michael. I think I know what is going on, and it has nothing to do with your location in Canada vs. anywhere else.

As I mentioned earlier, I have been running a channel with two widgets, on to show the temperature in my part of North Carolina, and another in Edmonton. Both widgets occasionally display dashes. It happens fairly infrequently on both, and there does not seem to be a correlation. In other words, just because one location shows dashes does not mean the other location will show dashes. These days, this seems to happen only once or twice a day per location. This has made troubleshooting difficult.

In delving into this further, I think what I am seeing is that every once in a while, the widget receives a corrupted xml file from openweathermap. The way the widget is built, if it receives no file at all, it keeps trying. But, if it does receive a file, it tries to interpret the file, and then post the results. Once it receives the file, it stays quiet for 15 minutes and just reposts the last results it received. This is to prevent excessive calls to the openweathermap server, which would violate their terms of service.

What I am thinking of doing is changing the widget behavior so that if it does receive a corrupted file as a response, it stays quiet for a much shorter period (say, 5 minutes), before trying to get a new temperature value. Hopefully, the next time I try to get the temperature, it will give me a valid file with a valid temperature.

I will post again when I have an updated version to be released.

Re: Clock/temp/wind by ehertz

Hi ehertz, sorry I took so long to reply but I  was swamped over the holiday season work wise. However there is always a positive aspect to anything, and in this case it is that I completely reworked my home's WiFi by adding a Netgear router configured as an access point quite close to my bedroom where the Dash is located. The result of this is that I now have full strength WiFi rather than the less than stellar signal I had before.

The net result is that with this improved communication quality the frequency of the temperature showing as dashes has reduced significantly. It still displays dashes, most notably at wake-up time because that's when I most want to know the temp!

I think this actually reinforces your XML file theory. Improved communication = better file integrity hence reduced errors.

I'd really appreciate you continuing with the implementation of the possible fix (always assuming you can spare the time, of course). If I can help in any way, please just ask.

Oh, and final note - I use my Dash as an alarm clock plain and simple. Only one channel, namely the default one and only one app - yours! It's been set to run continuously and is Pinned in place.  The sequence is: at 10pm I set the clock to dim mode. Then at 6:59am I revert the display to normal mode. Finally at the daily (changing) wake time I play a alarm chime.That's it!

I had tried to add a weather app but they all seemed to either fail to find my local weather or were US only or whatever...

Thanks again for my (obviously) favourite app! I wished your one with wind would work for me but I am unable to get it to work properly either because it has a totally location input.

Michael

Re: Clock/temp/wind by ehertz

I've had this running for awhile now and haven't seen the dashes, but it is rotating with five others.  You might try having two of these rotating, since it would reload every x seconds and might cure the data issues.

Re: Clock/temp/wind by ehertz

FYI, yesterday morning, when things were far, far, far too cold here in my part of North Carolina, I did see dashes when my alarm went off. A few minutes later, the app finally showed a temperature of 2 degrees F. Which, frankly, I was not believing. So I went to OpenWeatherMap.org just to make sure I had the right location entered. Sure enough, they claimed the temperature in Chapel Hill, NC was 2 degrees. The real thermometer which I have mounted on a wall in the bathroom next to my bedroom with a probe outside showed 6 degrees. The guy on the radio claimed we were at 8 degrees. Either way, it was much too cold.

I know, compared to Edmonton, that is probably balmy. But for me, it is unpleasant, to say the least.

Anyway, I want to assure you that I also get frustrated by not having a temperature reading every once in a while.

Michael, when I do get a chance, I will try to see how they format the XML file to show wind for Canadian cities to see if I can make the widget work properly for you.

Re: Clock/temp/wind by ehertz

riblet2000 wrote:

I've had this running for awhile now and haven't seen the dashes, but it is rotating with five others.  You might try having two of these rotating, since it would reload every x seconds and might cure the data issues.

Actually, that probably will not fix Michael's problem. The widget will only try to get a temperature every 15 minutes. This is to meet the terms of service for the free service that I am using, which limits the maximum number of calls to the server per day.

You can tell how close you are to getting a new reading by looking at the extreme right side of the screen. There is a 1 pixel wide white progress bar that starts at the bottom of the screen and grows. At 5 minutes after the last reading, the bar will be 1/3 of the way up the screen. At 10 minutes, 2/3. When the 15 minutes are almost up, you will see the bar almost at the top of the screen.

There is one way to defeat the 15 minute limit, and that is to reload the channel. Or you can reboot the Chumby. But otherwise, you are pretty much stuck with it.

Re: Clock/temp/wind by ehertz

I updated the widget and I think it will now work properly for non-US locations to display both temperature and wind speed. The latest version is 3.46.

To enter a non-US location, in the location box on the configuration screen, please enter the city followed by a comma and then the two letter country code. For example, for Edmonton, please enter "Edmonton,CA" (without the quotation marks, and no spaces after the comma). For US locations, just enter the zip code.

If you do see any issues, please let me know.