OpenWeatherMap-Alerts-Weather-Driver

It could be .... but at this time I choose to not to add additional complexity to accommodate every variation of possible options. The driver was never in tended to be able to accommodate every variation of stylistic desires. If the '/', or other separator character or control code, is important enough for a user then they could edit their copy of the code to put it in easily enough.

Thanks.

2 Likes

Hi @Matthew,
I'm having some difficulty upgrading to the newest version. After some work with no success I have completely uninstalled the old version and installed the new.
I'm not sure if the device page has changed but this is what I'm seeing.


Many of the options are gone. I removed the api key in the snapshot but is there for testing.
The is an error during the api call

dev:30602020-11-04 10:03:58.077 am warnOpenWeatherMap - getWeather() execption java.net.URISyntaxException: Illegal character in query at index 55: https://api.openweathermap.org/data/2.5/weather?zip=N0M 1G0,CA&APPID=xxxxxx
&units=metric

The Zip code (actually a postal code) has a space in it. Probably the space is the issue. The N0M 1G0 was the value I used with the previous version and worked well. I never populated that field in the new install so I don't know where it's coming from.

The screen shot looks to be the standard (integrated) OWM driver, not the customer driver in this thread, Use the link in the first post, or HPM to install the custom driver.

OMG how stupid do I feel now? Thanks for the response and for the app.

Have been looking hard for an external weather solution and this driver is fantastic! Thanks, @Matthew, great job on this.

1 Like

I understand saving as many characters as possible on the big tiles with long urls, however, at the moment using using /tinyurl.com/y42s2ndy vs Weather forecast - OpenWeatherMap saves exactly 3 characters and forces a link to a second cloud site. I understand you want to use this, but for those of us who prefer otherwise, please consider a flag to select using tinyurl, or not.

Additionally, when clicking on the MyTile tinyurl link, I've been seeing more London, GB weather than expected, and sometimes my local city with a London radar map. I'm aware this is likely a OWM issue, but in theory this should not occur when the OWM city code is set. What I've done for now is change my MyTile link to Weather forecast - OpenWeatherMap. Hopefully it shows my selected city 100% of the time. Is anyone else having this issue?

Update: After closely examining the threedayfcstTile and having it come in at 1018 characters, I understand why tinyurl is being with the current html.

Should additional space be needed, the closing </tr> and </td> tags are optional and may be safely removed saving ~165 bytes of data. With tinyurl used ~9 times, using this technique with openweather.org would result in a net savings of ~128 bytes and remove ~9 doubled cloud links.

I am interested too if anyone is have an issue with tinyurl. I have not experienced that. That service just forwards to the designated url. I do see the "/tinyurl.com/y42s2ndy/{citycode}" flash very briefly in my browser then it is replaced almost immediately with the "/openweathermap.org/city/{citycode}" url. I presume the issue with OWM not showing your correct city or radar is an OWM issue, not related to tinyurl, but you could test that. You would have to go into the code and look for the 'tinyurl.com' instances in the myTile section and replace those with the direct openweathermap.org url and see if your issue persists or not.

Yes, I know that specific tinyurl only save 3 characters ..... but every character saved helps to preserve the information and formatting going into the tile. Yes, I know there is a desire to avoid unnecessary cloud access, but until we can definitively show that tinyurl is causing a problem, I am not inclined to stop using that service. IMHO, I believe the benefits of using tinyurl out weight the detriments, again, at least until we can definitively show that tinyurl is causing a problem. YMMV.

Thanks.

You are correct. I overlooked that other tinyurl links besides "/tinyurl.com/y42s2ndy/{citycode}" are used saving a significant amount of space. For example
https://tinyurl.com/y6xrbhpf/26.png
becomes
https://raw.githubusercontent.com/HubitatCommunity/WeatherIcons/master/26.png

I amend my request to change only "/tinyurl.com/y42s2ndy/{citycode}". Also consider eliminating the </tr> and </td> elements should you need or want additional space.

Regarding seeing London, GB weather on my local weather page: I have no idea why that occurs, however it is only in browsers, including Fully and Vivaldi, that don't have 100% functional location services. I've changed the link on the myTile link.

I thought once the location was established or provided, it would be saved in a long term cookie. That's not true, OWM uses Session cookies (actually a good thing), but that does not explain why it occasionally fails with a valid citycode. I will let you know if changing the "/tinyurl.com/y42s2ndy/{citycode}" does anything.

Thank you

Screen shot of my city with a London GB weather map.

Closed Firefox, Opened Firefox, went to
https://openweathermap.org/city/5100924
refused site request for location services, oops...., submitted bug report to OWM

Just so I understand your conclusion.... this is a OWM issue and not and issue with using tinyurl, correct?

I will look at removing </tr> and </td> in the next release. I did not realized those were optional closure fields. Thanks.

1 Like

Definitely an OWM issue.

I also tried the tinyurl.com/y42s2ndy/{citycode} in Firefox, denied location services, and received London weather and map. Not what I expected!

When the </tr> and </td> are removed, I feel tinyurl.com/y42s2ndy should be replaced with openweathermap.org/city, assuming there is sufficient headroom on the 1024 byte limit.

Thank you

[UPDATED]
v0.4.6
11/06/2020

Changes:

  • Refactored the dashboard tiles.
    I refactored the dashboard for consistency in appearance, functionality and coding style.
    There is a single hyperlink on each tile that is on the OpenWeather logo image. That will take you to your local weather page on OWM for more weather details and any weather alerts. myTile (the left most tile in the first image below) will show as it is in the first image if there is sufficient characters available in the tile limit (1,024). It the character limit is exceeded, it will strip out the icon images in the second to last row and strip out the sunrise & sunset icon images. In that case, those icons will be replaced with characters (see second image). There are many things that can cause the character limit to be exceeded, including your city name length, condition text length, number of decimals you chose to display and if there are any current weather alerts displayed.

If the 1,024 character limit is exceed the myTile will be as shown below. The bottom two rows have most images removed and replaced with text.
image

1 Like

I just updated to v0.4.6, and now the current temperature for myTile looks like this for me:

opw4

I see it on my dashboard tile as well. Anyone else seeing this?

The temp is fine. The null is the current condition icon. Make sure you have access to the location your icons are in. If you are using the default location then it is probably a Github access issue, although the OWM icon is showing and it is in the same location (if using the default).

This seems odd. I haven't done anything with icons, so I guess that means I am using the default. I have never seen this behavior before until I installed the newest version (0.4.6) today. Not sure what to even try and do about this.

Is this also the current condition icon?

opw5

That seems to be working fine.

It uses the same source image file. Not sure why it is not working. Suggest a 'Repair' if using HPM, or open the code and 'Import' to get a refreshed copy. There have been some Github issues recently. Maybe the prior copy didn't complete well??

Hi, I'm building a thermostat driver and my thermostat is able to show outdoor temperature. Is there a way I can provide this information using this driver? And, if so, how could I do that? Thanks!

You are likely going to need to also write an app (only apps can read driver state)

So you have your driver - it likely has a command that is 'set outside temperature'

You write an app that gets the open weather temperature, and calls 'set outside temperature' on your driver. This app could be rule machine, simple automations, webcore or groovy.

1 Like

Ok so I tried the 'Repair' from within HPM. No change, Still seeing the 'null' where the condition icon should be. Very odd. This isn't that big of a deal for me. I just thought it was strange and should report it.

I do believe this is an issue with Github, which is the default location for the icons. I see is sporadically with the icons on the tiles, but it goes away on the next refresh. You could try copying the icons from Github to a local location and change the icon location in the preferences.
Weather Icons Zip File