OpenWeatherMap-Alerts-Weather-Driver

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:

I will begin the process of removing sunrise-sunset.org polling from the driver. It really doesn't provide must of an improvement over the data I can get from the Hub and then calculate pretty close estimates for the rest. Those data points are then only used to estimate LUX.

I will get this done ASAP, but I do also work for a living and that is prioritized. Thanks for your patience. Look for a new version soon.

2 Likes

just want you to know - the weather is my favorite tile!
image

1 Like

[UPDATED V0.6.1 08/22/2022]

This version completely removes the sunrise-sunset.org poll. It will use the Hub's sunrise and sunset times then calculate Noon as the mid-point of those. It estimates twilight begin as 25 minutes before sunrise and twilight end as 25 minutes after sunset. With these estimates the sunrise-sunset.org poll is no longer required.

I made this change very quickly, but I have not seen any errors in my brief testing. Please report any issues and I will address as quickly as I can. Thanks.

1 Like

Hey there @Matthew .

Looks like I’m getting an error. Both for when I turn on and off the setting “local sunrise/sunset.”

Here are the logs:

Seems to be fine otherwise though.

Did you update to the new version 0.6.1 released this afternoon? Open the driver and click 'Save Device' then click 'Save Preferences' and see if that stops the errors.

From your error log you did not update as it is still reporting the line 1002. In the new code released this afternoon line 1002 is a blank line. Update the code and try again. If using HPM do an Update or a Repair. If not using HPM open the code and re-import to get the updated code.

1 Like

Thanks! I saw the update today and was certain I pushed it through. Just went back in and saw that it’s still hanging out waiting to be executed.

As expected, the error is no more after updating.

Sorry for the false alarm!

1 Like

Thanks… confirming my error issue is gone.

Suggestion for the next update - Add an option to turn off the below (IF debug?). I like to keep my logs clean, so I go in and comment these out after each release.

dev:5192022-08-23 05:47:43.773 infoOpenWeatherMap.org Weather Driver - INFO: Switching to Daytime schedule.
dev:5192022-08-22 20:13:06.686 infoOpenWeatherMap.org Weather Driver - INFO: Switching to Nighttime schedule.
1 Like

iany news on this issues, just tried 0.6.1 but still have the same problem.

I have not heard that anyone has attempted to use the 3.0 API Key with the current driver after doing a global search and replace in the driver code for 'api.openweathermap.org/data/2.5/' and replace that with 'api.openweathermap.org/data/3.0/'. If someone with a 3.0 API key wants to do that test and confirm if it is successful (no errors and the data populates as expected), I can do a change to allow the user to select which version (2.5 or 3.0) API key they have and the driver will point to proper endpoint for that key.

1 Like

I'll not add a separate option, but will make those part of the 'Extended Logging' option. They will not show if Extended Logging is off, but will show if Extended Logging is on. That change will be in whenever the next update gets released. Thanks.

1 Like

I'm using the new 3.0 API key from openweather. I manually changed the 4 lines in your driver where it was using the 2.5 API and set it to 3.0.
It's working perfectly and updating as expected.

That is great news! I'll start on the update to add a user preference for the 2.5 or 3.0 API Key. Anyone who doesn't wan to wait can make that code update themselves.

Thank you!

1 Like