naofireblade / homebridge-weather-plus

A comprehensive weather plugin for homebridge.
MIT License
315 stars 63 forks source link

Add Ambient Weather support #297

Open dhull opened 4 months ago

dhull commented 4 months ago

This is an update of my previous PR (#54) to add Ambient Weather support to homebridge-weather-plus. Sorry that it has taken me so long to update the PR for the changes to homebridge-weather-plus, but at the time I was forced to continue to use an older version of Homebridge by a different plugin and then I moved and didn't use Homebridge at all for several years.

I have a question about whether my code is properly setting the station's ObservationTime value. As far as I can this this characteristic is the observation's time in HH:MM:SS format in the time zone that Homebridge is running in. Is that correct?

threeonparfive commented 2 months ago

Any idea of when this update might be available? I'm excited to give it a try and stop using Weather Underground for this!

naofireblade commented 2 months ago

I have a question about whether my code is properly setting the station's ObservationTime value. As far as I can this this characteristic is the observation's time in HH:MM:SS format in the time zone that Homebridge is running in. Is that correct?

It looks like different apis implementations handle this differently. OWM and WeeWX are using the timezone of the weather location. WU and Weatherflow are using the device timezone. I could make arguments for both variants :) . What do u prefer?

dhull commented 2 months ago

It looks like different apis implementations handle [ObservationTime] differently. OWM and WeeWX are using the timezone of the weather location. WU and Weatherflow are using the device timezone. I could make arguments for both variants :) . What do u prefer?

It appears that ObservationTime is displayed in the Eve app but I don't see it otherwise used. I'm guessing that the Eve app doesn't adjust it for where my phone is, so if the weather station in in timezone A, homebridge is in timezone B, and my phone is in timezone C, then I would probably prefer the observation time to be reported in timezone C, but since that isn't possible then I think that my second choice would be timezone A. (I just checked by changing the timezone on my phone and found that Eve does not adjust the observation time.)

My current PR wasn't setting the timezone at all, just using UTC. I'll update it to use the weather station timezone.

threeonparfive commented 1 month ago

Is there a way for me to test this new code? I'm currently still running on v3.3.3 because 3.3.5 broke the wind speed calculation from Weather Underground and hasn't been fixed yet (open issue). I'd prefer to have this direct integration with Ambient Weather.

threeonparfive commented 1 month ago

Now something is broken with my station and Weather Underground. I'd really like to have this new update to have native Ambient Weather support.

@dhull @naofireblade Do you expect to have this code live soon?