chasenicholl / homebridge-weatherflow-tempest

WeatherFlow Tempest Homebridge Plugin
Apache License 2.0
15 stars 2 forks source link

Local Socket API support #16

Closed chasenicholl closed 1 year ago

chasenicholl commented 1 year ago

[v4.0.0]

Added Local UDP API support! Now you can choose to listen to your Weather Stations observations directly over your local network. No Station ID or API Token needed. Observations are broadcasted every 60 seconds. This leverages the obs_st message. See documentation for more information.

chasenicholl commented 1 year ago

@DMBlakeley take a look when you get a chance - local udp API implementation!

DMBlakeley commented 1 year ago

@chasenicholl will take a look. Nice work!

Have the 4.0.0 version running on my MacBook and 3.0.3 version running on my Mac mini so I can easily compare between the two versions.

chasenicholl commented 1 year ago

Thanks @DMBlakeley!

DMBlakeley commented 1 year ago

Hi @chasenicholl,

I have dug into v4.0.0 comparing it to v3.0.3 as well as the Tempest App directly. I have a number of recommended changes to a number of files:

For the tempest.ts changes I was reminded how HomeKit handles metric vs standard units. For supported units such as temperature, humidity, and wind speed calculations are done with metric units. How they are displayed is a function of the localization of your iOS or Mac device. The units for additional parameters that were added as dummy occupancy sensor are handled by the plugin settings.

All the updated files can be found in my directory (https://github.com/DMBlakeley/homebridge-weatherflow-tempest). Now need to figure out how to push to you.

DMBlakeley commented 1 year ago

Changes are in my files.

chasenicholl commented 1 year ago

@DMBlakeley thank you for the thoughtful feedback. Please feel free to checkout this branch locally, commit your changes and push here for one more round of reviews before we publish the big update!

edit* apologies I didn't realize I hadn't added you as an official collaborator yet. I just corrected that. You should now be able to directly contribute. Thank you again.

DMBlakeley commented 1 year ago

Hi Chase, As I am new to being an official collaborator I just wanted to make sure that I am adding or updating files correctly. I see 2 options:

  1. Open the local-websocket-support branch and add / replace the files directly.
  2. Create a new branch as a pull request.

Which do you prefer? Regards, Doug

chasenicholl commented 1 year ago

@DMBlakeley great question. Lets have you create a branch from this branch. Make your changes. And open a new PR for me to review merging your changes back into this branch. Make sense?

DMBlakeley commented 1 year ago

@chasenicholl, I think that creating a PR against the local-wesocket-support branch is the safest and cleanest approach.

Let me give my updates one more review and I will submit the PR for your review and merging into this branch and then back into main.

DMBlakeley commented 1 year ago

@chasenicholl, I submitted PR #17 against the Local Socket API branch last evening. Let me know if there are any issues with this approach.

chasenicholl commented 1 year ago

@DMBlakeley I've been running this branch locally now since I merged your PR without issues. How about yourself?

DMBlakeley commented 1 year ago

@chasenicholl, I have also been running v4.0.0 without issues. Have found very good correlation between v4.0.0 and the Tempest app. My recommendation would be to release.