[RELEASE] Weather-Display With OWM-Alerts Forecast Driver

Hi - so I thought recent 'fixes' I made resolved this issue - but it didn't for me after all.
Room Lighting is set with an activation - which errors occassionally. Can anyone shed light?

Here's the room lighting screen:

Does not appear to be error with this driver. Would recommend posting in a thread for Room Lighting.

1 Like

Seeing this error. Did perform a repair with no success. Running 2.5 version API OWM.

[UPDATED V0.6.3 04/17/2024]

  • Fixed API URL to pull location alerts

If using HPM do an Update or a Repair. Otherwise open the driver code and re-import the code. Thanks.

Hi there @Matthew - so a lot going on here for me - I recently wrote a twilight tool and i'm very happy with my results.
Today, I was cleaning and noted you had updated OWM - long ago I had forked you so as to customize my tile perfectly for my needs with HD+. FWIW, your tile owns my top left corner - prestigious!
I merged with you and upon refresh, lo and behold there was two very cool things I wasn't prepared for - tw-begin / tw-end and also moon phase!
First, long ago I implemented a moon phase tile -
image - This tile is important to me for my fishing schedule and I've trusted it for a few years now. I'm using the @thebearmay .7.4 version. Checking it with moonGiant.com his tile is spot on.
image

My twilight parser pulls data from sunrise-sunset.org to obtain a twilight begin and twilight end. My values seem to check out correctly when compared to NOAA.
image

My questions -
For some reason I'm unsure of, your values for moon phase show 1st quarter currently. This doesn't jive with my data and I'm scratching my head about it. Wondering if you have an explanation?
Second 1/2 bonus round, the twilight begin and end - I have 5:12a to your 5:22a and 9:05p to your 8:57p.

The benefit of course for me is rolling up 3 drivers into 1 . I still will need to parse your tw-begin/end to use for outdoor lighting, (I was never able to publish my driver since you can't trigger a rule from a date/time variable unless it's a Hub Global) but I'd happily share it with you if it might help see the descrepency clearer. I appreciate this tool as it is, very much!
Shu

Moon phase is a calculation based on what Weather-Display returns as the 'Moon Age' as follows:

String mPhase
BigDecimal tma = !wd.everything.astronomy.moon.moon_age ? 0 : wd.everything.astronomy.moon.moon_age.toBigDecimal()
if (tma >= 0 && tma < 4) {mPhase = 'New Moon'}
else if (tma >= 4 && tma < 7) {mPhase = 'Waxing Crescent'}
else if (tma >= 7 && tma < 10) {mPhase = 'First Quarter'}
else if (tma >= 10 && tma < 14) {mPhase = 'Waxing Gibbous'}
else if (tma >= 14 && tma < 18) {mPhase = 'Full Moon'}
else if (tma >= 18 && tma < 22) {mPhase = 'Waning Gibbous'}
else if (tma >= 22 && tma < 26) {mPhase = 'Last Quarter'}
else if (tma >= 26) {mPhase = 'Waning Cresent'}
myUpdData('moonPhase', mPhase)

I did update the last entry (>=26) to 'Waning Cresent' from 'Waxing Gibbous'. (Update posted below)

This driver stopped using the sunrise-sunset.org almost two years ago when their API was not functioning. See this post about twilight begin-end times:

If you need more precision that what this driver provides please continue to use your current method.

UPDATED V0.6.4 05/13/2024]

  • Corrected moon phase

If using HPM do an Update or a Repair. Otherwise open the driver code and re-import the code. Thanks.

Thanks for looking.

Matt, You might want to check your tinyurl link, I think it is being blocked.

This link fails:

image

Result when I click on the icon:

image

I submitted a ticket to tinyurl.com requesting that the block be removed.
image

UPDATE: it appears as if the destination has been flagged as 'Blacklisted', so you cannot create another tinyurl that point to that same location. I tried another service (tinycc) it said the destination was also blacklisted. Again, you can copy all the icons from that location to a destination of your choice and change the Alternative Icon Location in the preferences to map to that location.

Nothing in the code has changed recently. The platform is adding in a closing double quote to the end of the link, and I don't know why? I have been unsuccessful in getting that to go away. You can right click on the link and 'Copy Link', then paste that into a browser and delete the closing double quote and the link does work then. Same thing is happening with the icons. I pointed the 'Alternative Icon Location' to server location I can access and they are not showing on my dashboard, but if you right click and select 'Copy Image Link' and paste that into browser the image shows?

At this point I am assuming that something changed in the latest platform update that is causing this .... but I really don't have a answer or solution at this time.

Thank you.

Tagging @gopher.ny

Something in the latest platform update has created issues with this driver's dashboard tile links. Links to images are not showing the image .... but if you copy the image link and paste into a browser the image shows just fine. I link that should take users to another site now has a closing double quotation mark appended to the end of the link, causing the link to fail. Nothing in the driver code has changed recently and everything worked well previously.

Happy to help troubleshoot .... I juts don't see anything in the driver code that caused this (and nothing has changed in the code since it last work correctly). Thanks.

My images are displaying fine..but current forcast which combines images and text is not..

@gopher.ny

@gopher.ny

.... Just checked again and it does look like icons are working correctly again. I don't know if this was a Hubitat Platform issue, or a TunyURL issues .... but it appears to have been corrected now.

There is still an issue if you are using NWS for weather alerts. On the Alert Tile there is an extra double quote appended to the link, so when that is clicked you get an invalid site error. You can go into the URL in your browser and delete that trailing double qoute and the link should work. I have not been able to determine how to prevent this .... yet.

1 Like

I've updated to 3,.0 OMW. I'm seeing this error:

java.lang.NullPointerException: Cannot invoke method toBigDecimal() on null object on line 769 (method pollOWMHandler)

I cannot replicate. I have seen a rare-occassional error that I attribute to an OWM return data malfunction. These usually clean up on the next API data pull. If you are seeing this continuously turn on extended logging and provide more details.

Thanks.

I will. Thank you

I found the issue. Had http:// in the config. should have been https://

1 Like