homebridge-weather-plus icon indicating copy to clipboard operation
homebridge-weather-plus copied to clipboard

With Eve compatibility, not all fields are available. I need sunrise/sunset.

Open lmolter54 opened this issue 2 years ago • 9 comments

This plug-in is great and I will leave coffee money eventually; however, I need the local sunrise and sunset times (they are unchecked in the properties) but they are not in the payload.

lmolter54 avatar Aug 01 '22 21:08 lmolter54

check the field "forecast today" and you will get a forecast for today with sunrise and sunset.. 👍😎

Jogistar avatar Aug 15 '22 17:08 Jogistar

Hmmm... not so. I have 'forecast' set to Today and I don't get a sunrise or sunset time in the payload. If I use the Node-red node OpenWeatherMap In, I get the sunrise and sunset times. For now, I use a Node-red node to tell me whether or not it's Day or Night where I live. I really don't need the exact times.

[image: image.png] Larry

On Mon, Aug 15, 2022 at 1:53 PM Jogistar @.***> wrote:

check the field "forecast today" and you will get a forecast for today with sunrise and sunset.. 👍😎

— Reply to this email directly, view it on GitHub https://github.com/naofireblade/homebridge-weather-plus/issues/240#issuecomment-1215506307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHUYCIAWJRLWENJ3DQUUBJLVZJ72PANCNFSM55I36XEQ . You are receiving this because you authored the thread.Message ID: @.***>

lmolter54 avatar Aug 15 '22 18:08 lmolter54

I use home+ 5 app for iOS, i dont know how the EVE app shows data I have my setup as followed: (homebridge & home+5 image attached in link) link to wetransfer https://we.tl/t-qNv9chikgp

Jogistar avatar Aug 15 '22 19:08 Jogistar

I assume you are using Openweather API v2.5 It seems sunrise and sunset are part of the spec. for the current weather, as well as the forecast API. I am not sure why support for it wasn't added. I'll post a patch that adds support for it.

dacarson avatar Feb 10 '24 01:02 dacarson

@Jogistar may have got sunrise and sunset for the forecast as the code was there for OpenWeather v3.0 API. However, it wasn't there for current weather. And it was totally missing when v2.5 API was used

dacarson avatar Feb 10 '24 01:02 dacarson

Unfortunately, I don't have a v3.0 API account, so I can't verify that it is working. @Jogistar if there is a way you could test my change, I would appreciate it. Or @jkreileder I believe you have a v3.0 account, I'd it if you could validate my code.

dacarson avatar Feb 10 '24 01:02 dacarson

@dacarson The 3.0 API provides sunset und sunrise for both the current day and forecasts. The code so far only used the values for forecasts. I've opened a PR that also uses them for the current day.

jkreileder avatar Feb 10 '24 11:02 jkreileder

Thanks @jkreileder. I also have fixed it on my fork, and was hoping to get it tested. If your PR lands first, I will just merge it with mine that also reports Sunrise and Sunset for 2.5 API.

dacarson avatar Feb 10 '24 19:02 dacarson

Can you please try 3.3.4-beta.1 and verify that it works.

dacarson avatar Mar 26 '24 19:03 dacarson