Skip to content

Commit

Permalink
Merge pull request #1 from chasenicholl/main
Browse files Browse the repository at this point in the history
Sync with @chasenicholl main
  • Loading branch information
DMBlakeley authored Dec 14, 2023
2 parents f8d10c6 + f7a61a7 commit e7a7159
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ All notable changes to this project will be documented in this file. This projec
* Update axios to v1.6.2 to address moderate severity vulnerability.

## 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](https://weatherflow.github.io/Tempest/api/udp/v171/) for more information.
* 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.
* To use the local API add `local_api`: `true` or `false` to your top level configuration.
* Observations are broadcasted every 60 seconds.
* Leverages the `obs_st` message. See [documentation](https://weatherflow.github.io/Tempest/api/udp/v171/) for more information.
* `precip_accum_local_day` not available with local API

## v3.0.3
* Update node-version: [18.x, 20.x], remove 16.x which is no longer supported by homebridge.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ It is recommended when upgrading to v3.0 of the plugin from a prior version that

### Setup and Parameters

You will need to create an account at https://tempestwx.com/ and then generate a Personal Use Token https://tempestwx.com/settings/tokens.
Local API is now supported which requires no authentication. If you choose to use the non-local HTTP API you will need to create an account at https://tempestwx.com/ and then generate a Personal Use Token https://tempestwx.com/settings/tokens.

- `name`: _(Required)_ Must always be set to `WeatherFlow Tempest Platform`.
- `local_api`: _(Required)_ Use the Local API versus HTTP API.
Expand Down
6 changes: 6 additions & 0 deletions src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ export class WeatherFlowTempestPlatform implements DynamicPlatformPlugin {
this.tempest_battery_level = 0;
this.tempest_device_id = 0;

// Backwards compatible config check for new local_api variable
if (!('local_api' in this.config)) {
this.config['local_api'] = false;
this.log.info('local_api config parameter not set defaulting to false.');
}

// Make sure the Station ID is the integer ID
if ((this.config.local_api === false) && isNaN(this.config.station_id)) {
log.warn(
Expand Down

0 comments on commit e7a7159

Please sign in to comment.