OpenWeatherMap-Alerts-Weather-Driver

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

Since the last update, ive noticed the OWM URL and time is in line with the sunset/sunrise time!!
image
And its a lot more noticeable on a larger scale

Hi, I must be missing something terribly obvious.... But how do I get e.g. the 3 day forecast to show in Sharptools.io? I am able to get them displayed on the Hubitat dashboard just fine, and I have enabled the 'sharptools data' switch. Also, the basic tile is showing just fine in Sharptools.

Is the 'attribute' tile option hidden somewhere clever where I haven't been able to find it?

You don't. Enabling the SharpTools.io optional attribute just activates the attributes that SharpTools.io uses in it's native weather tile. That optional attribute does not enable SharpTools.io to display the other Hubitat dashboard tiles in the driver.

3 Likes

That was intentional, to reduce the number of lines displayed in the tile. The tile is intended to be shown in Hubitat dashboards, not really meant for viewing in the Current States list, or on a white background. You cannot see the sunrise and sunset icons on a white background because they are white.
image

I am sure different browsers render the image differently. I'm not a HTML expert so I'm not sure why in your second image the OWM icon is so large?

@derk.groeneveld sounds like @Matthew has you pointed in the right direction.

Check out the 'Media Tile' examples in the following article for some examples of a popular approach that is used for displaying weather data in dashboards:

@Matthew, @josh I had indeed already discovered the media tiles solution. But seeing this new driver gave me hope that there was a potential 'integral' solution.

Is there any ongoing discussion with Sharptools that might suggest this may in the future be possible without outside rendering of the media tiles?

We don't support rendering of arbitrary HTML as a security consideration.

I can certainly understand why the community has taken the approach as it's really the only way to get a custom UI within Hubitat dashboards at the moment. It's an adulteration of the 'attribute' model to stuff HTML into the attributes - especially since they were designed for concise smart home 'state' data. But in the absence of an alternative presentation / templating feature, the community figured this out and has taken to it as a custom presentation approach.

We've internally considered some alternative approaches with either whitelisting certain HTML tags to support this community approach, supporting custom components within SharpTools natively, and/or potentially a native weather integration with more layout options. The SharpTools Feature Requests category is the best place to request this and get community interest. :slight_smile:

2 Likes

Ugh, so I'm still really new to HE. Only been here about 2 weeks and am just starting to add devices to my dashboards, so yeah, I'm still wet behind the ears. I added you package from HPM, and I added 2 virtual devices (one for the Alerts driver and one for OpenWeatherMap driver).

I'm seeing all the data in the driver screen, and I've been able to add a tile to my dashboard, but it's only showing the really generic today data. Is there a walk through that shows me how to create the nice format and forecast tiles you have here?