[Resolved] APIXU Hubitat weather Tile

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

Everything is working good except feels like temp is still broken. I know its nothing you can fix though.

Not sure why he hasn’t made the change as it’s relatively straightforward - he might have gotten busy with other things or just forgotten - happens to us all! :smiley:

I went ahead and made the changes and submitted a Pull Request for him to review. You can find the updated copy of the code here:

https://raw.githubusercontent.com/joshualyon/bangali/d0f50d173d7673516c308fea7f8433f474c0b3dc/driver/apixu-weather.groovy

All it does is add the feelsLike and wind options in as publishable attributes.

1 Like

Thanks! Ill give it a try tonight. Once the hot weather hits (if it ever does) will the feels like be the humidex value or is that something separate?

The developer of the device driver would be best to answer that, but my guess is it’s something similar to what you described - taking into account other weather measurements to determine how hot or cold it actually feels like rather than technically what the temperature is reported as by a thermometer.

Accurite defines ‘Feels Like’ as:

The “feels like” temperature is a measurement of how hot or cold it really feels like outside. The “Feels Like” temperature relies on environmental data including the ambient air temperature, relative humidity, and wind speed to determine how weather conditions feel to bare skin.

Different combinations of temperature, humidity, and wind speed can increase the sensation of being hot or cold. For example, skin that is exposed to wind and cold temperatures will make a person feel that it is colder outside than it really is because heat is drawn away from the body at a faster rate. As another example, a day that is very humid may feel hotter than it really is outside because your body sweat does not evaporate (and thereby cool the body) the way it is intended.

My guess is APIXU probably has a similar interpretation. :smiley:

1 Like

Thanks, I think youre right, the weather industry likes to throw out terms like windchill and humidex but i think they all mean “feels like” in this case.

1 Like

I cant seem to get this feels like temp to show correctly. Here is what shows on the device page:

  • feelsLike : 0.8
  • feelslike_c : 8.8
  • feelslike_f : 24.8

The tile in sharptools is showing the 0.8 value but im sure it should show the 8.8 value. Is this an APIXU problem?

I just got around to updating the driver code but did not help. Its been at 0.8 for months

Can you clarify which driver version you updated to? Bangali added the feelsLike attribute as a publishable attribute in the 4/20 release (v5.0.2)

Do you see a Feels like option in your list of publishable attributes as shown in my screenshot in this post and is it switched on?

Also, has the driver polled at least once since you updated the code? I believe it defaults to every 30 minutes but is configurable.

For testing, sometimes I change the driver to a different location and different units just to make sure everything is updating. For example, I’ll change it to Paris with Imperial units turned off and save… then watch the Hubitat device page to see if the expected attributes update as expected (especially feelsLike in your situation). If the feelsLike doesn’t update in the Hubitat device page, then it won’t update in SharpTools either.

1 Like