[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.

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.

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!

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.