OpenWeatherMap-Alerts-Weather-Driver

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?

See this post for a walk through on how to add the built-in tiles this driver provides. You may also be referring to the additional formatting that that some of my screenshot have because I use have use Smartly to customize the CSS formatting of some of my dashboards.

Hope that helps.

Thanks - I thought it may have been an error!!

I have this displayed in a Node Red dashboard, so this must be how Maker API hands off the data.
If I make the tile smaller, it doesn't reduce in size. Just means i need to scroll to see whole image.
In saying that, i'm sure there are ways to reduce the tile size without the need for scrolling.

I will also look at how to change background image colour to see icons!!

@Matthew first of all thanks for the great driver, it is absolutely fantastic!
I would like to ask if it is possible to add also "illuminated" to "myTile" (current day forecast) ?
Thanks in Advance

It is possible, but not something I will do in the published version. The tile already exceeds the maximum characters of 1,024 in some circumstances. There is coding to help when that happens, but it does limit the formatting and functionality (removes hyperlinks) of the tile. You can add a standalone dashboard tile with the attribute of 'illuminated' (or any other available attribute) to show that result. That is what I do.

@Matthew thanks for the information and fully understand. I already have a tile with attribute just was thinking to have everything in one tile.

I keep getting the following error in logs

java.lang.NullPointerException: Cannot invoke method toBigDecimal() on null object on line 845 (updateLux)

Make sure you are the latest version, V0.4.6 11/06/2020. There is no toBigDecimal() on line 845 in the current version of the code.

I'm getting this error when I check for updates in Package Manager:

The driver name changed to remove 'NWS' from the name back in V0.3.2. There were instructions provided for HPM users after many updates subsequent to that change, but I have stopped including them after multiple additional updates were released. Those instructions are below:

==============================

The suggested updated method with HPM is to do a new install with the new driver (without the 'NWS' in the filename. Once installed, go to your virtual device and update the driver to use the new driver. You can use HPM to delete the old driver as follows: Do an 'Uninstall. If there are two drivers listed with the same name, click on the first "OpenWeatherMap-Alerts Weather Driver". The app asked if I wanted to delete "OpenWeatherMap- NWS -Alerts Weather Driver". Should you pick the wrong one (the one WITHOUT 'NWS' in the name), cancel and retry with the other selection.

Thanks for your speedy reply! I must have missed the last step as I didn't actually have the NWS driver installed or in use. But "deleting" it seems to have done the trick, even though it wasn't actually there. ¯_(ツ)_/¯ Thanks again. My bad.

@mathew-
Just wanted to report the following error. Only received it once so far....

2020-11-25 01:23:01.101 pm errorjava.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 811 (updateLux)

Thanks. I'll put in some more logic to correct for a null value in the next release to try to catch that.

1 Like

Thank you! And thanks for all of your hard work with this project!

[UPDATED]
v0.4.7
11/26/2020

Changes:

1 Like

Thanks for the Update :blush: