OpenWeatherMap-Alerts-Weather-Driver

I may have added some confusion. If you want Local SunRise and SunSet to update that selection must be 'on'. I stated that mine do not update because I have that switch turned 'off'. If you have it 'On' and they are not updating then something is wrong.

Are you certain they are not updating? In general the times should only change once per day and only by a minute of two. Thanks.

I am also noticing an issue re sr/ss, the sunset sunrise times are appearing as 'null' on the mytile attribute. Is this something I am doing wrong?

image

[UPDATED 08/20/2022 V0.6.0]

  • More corrections to sunrise/sunset data when when there is a Sunrise-Sunset.org failure.

If using HPM Update or do a repair. Otherwise open the driver code and re-import from the Github source.

1 Like

Thank you

1 Like

@Matthew, hey Mathew things are looking really good thanks so much for making the repars, love this driver😁

Dan

1 Like

So this driver in its current stat is no longer working for newly registered OW users if we don't pay for their subscription.

Jas anyone got this to work with the new api keys?

I’m receiving the below errors after this update. I haven’t modified anything, but is there something I need to adjust? Thanks!

dev:5192022-08-22 09:37:32.645 errorjava.lang.NullPointerException: null on line 1002 (method pollOWMHandler)
dev:5192022-08-22 09:37:10.095 errorjava.lang.NullPointerException: null on line 1002 (method updateLux)

I'm not seeing any errors on my setup? Suggest you open the driver and click 'Save Preferences'. If the errors continue, suggest a reboot. Let me know if that does not clear the errors and I'll investigate further. Thanks.

Tried Saving Preferences, and when that didn’t work rebooted my hub. I’m still receiving the errors. Appreciate any help you can provide. LMK if you need any additional info from me.

I'm also getting that:
image

When I manually click Refresh, I get the same error at 1002, but with method refresh. I saved the preferences and also rebooted. I still get the error.

I looked at the code

I turned on extended logging and turned off Local SunRise and SunSet to skip this block of code. I didn't get the same error, but instead I got an error in the next block of code:
image

Just to check the values, I copied the logging line for dumping sunRiseSet to line 1000 and refreshed it again:

sunrise:2022-08-22T09:59:27+00:00

@Matthew Does that "+00:00" for the timezone offset work with the "XXX" in the format string?

What I am not understanding is why it is even hitting that block of code (line 998-1020) at all? If Sunrise-Sunset.org poll fails (and it is currently failing) then it would go to lines 1021-1045 (the 'Else' part of that If Then Else block). I am not seeing this behavior on my end and it is acting as I expect it to. I have no errors. I'll keep looking when I get time .... but I don't see any errors on my system and I cannot recreate what you are seeing?

I don't see the poll of sunrise-sunset.org failing. It looks to succeed just fine.

It just seems like the parse of the resulting string is failing.

With Extended Logging turn on and the Log open in a separate tab, hit "Save Preferences'. If Sunrise-sunset.org is failing you should see in the logs:

Are you not seeing that?

No, I am not seeing that. I get what looks like a good response from sunrise-sunset.org.

good morning -
To too am seeing a nullpointerexception Null on line 1002. It seems the tw-begin and tw-end are not set BUT - I see them on the device screen! I disabled 'Local' and the values are now gone from my screen. I will also note the times were off by 30 minutes roughly as compared to what is displayed by the Openweathermap.org - I'm just adding to the din, that it's not a one-off. I think (and don't shoot me) these values were from the Hub settings - which is also different by about the same amount. I don't think I got returned values from sunrise-sunset.org for some reason - maybe the location entered to the post? I wish I could be more helpful, and this is not critical to me (I lost faith in SR/ SS values and the Hub some time back and now just hard set time values) but it is interesting as always to see the descrepencies :).

If the sunrise-sunset.org poll fails it will use the Hub's coordinates for that sunrise and sunset data. It then finds the mid-point of those can sets that as Noon. It then estimates twilight begin and twilight end by adding/subtracting a fixed 25 minutes from sunrise or sunset times.

What others appear to be seeing is that the sunrise-sunset.org poll is NOT failing, but the code is not using the poll results to populate the data points. That creates the NullPointerException errors. Again, I cannot replicate this condition (I believe it as it has been reported by multiple people, I just can't see it). Having a hard time debugging something I cannot recreate.

same here.. seeing first the error 0n 1002 then multiple errors.. old version works fine.

I also have the nullpointerexception on same line.

Log

ExtendedLogData


I truly wish I could get involved and bring useful data to the table - but I'm overwhelmed with work atm - I'll try to set aside time to study it.
Is this helpful? my settings? I just turned on 'local ...' and the error immediately came up (I have a notification tile for errors on a dashboard).



The tw_begin and tw_end are NOT showing in Current States now - must have been leftover from prior to the update.

just pushing refresh causes the error :slight_smile: