[Resolved] APIXU Hubitat weather Tile

Just updated a couple hours ago but the forecast icon and other values are still not updating on the dashboard

Once you’ve updated your Hubitat firmware, you’ll need to reload a SharpTools page at least once so the system can determine that you have the new Hubitat code and enable the dynamic subscriptions.

After that, each time you visit a dashboard, it will check to make sure all required subscriptions are setup.


You can verify which version is being reported to SharpTools by following these steps:

  1. Navigate to your SharpTools User Page
  2. Tap the ... next to your Hubitat location
  3. Tap the Show Advanced toggle in the top-right corner
  4. Check to make sure that you have at least version 5.2.0 (12)

Ok i have reloaded the dahsboard and confirmed I am running 5.2.0 (12) but still doesnt seem to be updating.

Same issue here. I’m showing the correct version, however the icon is still not correct. :frowning:

What is being reported on your APIXU weather device Current States for forecastIcon?

Also, have you tried changing the location used in the preferences of your driver and saving to see if the data updates? For example, I changed to Paris and I’m seeing a forecastIcon = sunny with weather = clear.

image

Then if I change to Portland, I’m seeing forecastIcon = snow and weather = Light snow:
image

For reference… this is what I’m referring to in the Current States of the APIXU device:

SharpTools uses the forecastIcon as the icon. You can see the full list of attributes the weather tile tries to display:

Looking at Bangali’s latest code, it looks like localSunrise and localSunset don’t exist anymore (they are now named with underscores), so if you’ve updated to a newer driver those attributes won’t update as expected. I had created a brand new weather device with the latest Bangali code for testing hence why my tiles above aren’t showing the sunrise/sunset at all. :smiley:

The rest of the attributes appear to be available and updating as expected from my tests.

Here is what my screens show:

sharpicon hubweather

Thanks for the screenshots. The forecastIcon, feelsLike, city, and humidity attributes which are visible in the screenshot appear to be reflected properly on the tile. Is everything working as expected now or if not, what is expected?

Ill have another look when I get home

Sorry I should have been a little more clear, this was taken at 10pm at night, I was expecting to see the cloud icon as shownin the forecasticon field and not a partly sunny icon as shown on the dashboard icon.

1 Like

@Mark_B thanks for the clarification.

The forecastIcon is expected to map to Weather Underground compatible icon keys which also have ‘night’ variants.

For example, there’s a cloudy and a nt_cloudy

Cloudy (cloudy):

image

Night Cloudy (nt_cloudy):
image

Looking at the attributes that his APIXU driver exposes, it looks like there is an is_day parameter, so I don’t think it would be hard to append a “nt_” before the forecastIcon in the event that it’s not day time. I’ll make the suggestion and see what he thinks.

I took a closer look at his driver code and it looks like he already has the basic pieces in place to map the night variants, but hard coded it to day. Maybe it was just a remnant from testing that never got fixed. Either way, I’ll make a post in his thread to see what he thinks…

Line 285 of the current release can be changed from:

sendEvent(name: "forecastIcon", value: getWUIconName(obs.current.condition.code, 1), displayed: true)

To:

sendEvent(name: "forecastIcon", value: getWUIconName(obs.current.condition.code, obs.current.is_day), displayed: true)
3 Likes

Just swapped out that line of code in the device driver and now all is GREAT! Thanks Josh! Now I just need an adjustable width music player tile! lol

2 Likes

@josh I have updated to the latest driver and the sunrise sunset times are incorrect

it’s using the first set in the picture for sunset sunrise where it should be using the second set.

Edit:

Found out how to disable the first set which automatically uses the second set:

Thanks for the update and glad to hear you got it working. Thanks for sharing the screenshots as well!

SharpTools only uses the localSunrise and localSunset values, so those will need to be published. If SharpTools had an old copy of those values cached from before they were removed (and re-added), it will continue to show the cached values until they are republished in the APIXU driver. :grinning:

I dont know whats going on now both sets are the same in device driver page. I re-enabled those and its all good for now. maybe its on APIXU side

So I just updated my driver last night to the newest code and now ST seems to be ‘stuck’…I figured it might take a bit for SharpTools to refresh but 12 hours later it’s still showing the same temp and the night time icon. Thoughts?

Nevermind, turned out to be a Hubitat issue. All is working now.

Can you provide some screenshots of what you are seeing in the driver and what you are seeing in the tile?
Thanks for the update. Looks like you’ve edited your post that it’s working now, but I’m going to leave this post here for reference… :smiley:

Bangali’s new 5.0.0 APIXU driver adds the option to choose which attributes to publish. From what I could tell, they are all enabled by default. If you disable any of them, you’ll want to make sure you’ve published all the attributes required for SharpTools (see below).

  • city
  • feelsLike - currently missing
  • forecastIcon
  • humidity
  • localSunrise - there are multiple and they appear to be named the same
  • localSunset - there are multiple and they appear to be named the same
  • percentPrecip
  • temperature
  • weather
  • wind - currently missing

I updated my test setup to the 5.0.0 APIXU driver and it looks like everything is working except for the feelsLike and wind attributes. Looking into Bangali’s code, it looks like he introduced a new sendEventPublish method which will only publish the event if it’s turned ‘on’ in the device preferences. Unfortunately, it looks like wind and feelsLike are missing from the attributes map so there is they can’t be enabled in the preferences. I’ve commented in his Github repository and will reach out to him directly.

For reference:
SharpTools uses the forecastIcon attribute from the driver to determine the displayed icon. And uses the temperature attribute for the main displayed temperature and the feelsLike attribute for the smaller ‘feels like XX°’ text.

image

image

image

image

5 Likes

Thanks Josh - This explanation was very helpful!

1 Like