Git Product home page Git Product logo

homebridge-weatherflow-tempest's Introduction

Homebridge WeatherFlow Tempest Plugin

verified-by-homebridge npm-version npm-downloads donate

New in v4.0.0 Local API Support!

Homebridge Plugin providing basic WeatherFlow Tempest support. Exposing 7 Acessories.

  • Temperature Sensor
  • Humidity Sensor
  • Light Sensor
  • Motion Sensor (triggered by user configured value)
  • Occupancy Sensor (triggered by user configured value)
  • Fan (expressed as Rotation Speed - Wind Speed 0-100mph)
  • Battery Sensor (added to air_temperature Temperature sensor)


NOTE:

It is recommended when upgrading to v3.0 of the plugin from a prior version that you save your configuration information including token and station_id, uninstall the prior version of the plugin, restart Homebridge to clear the accessory cache, install v3.0 of the plugin, enter your Settings, and finally restart Homebridge to initialize the plugin.



Setup and Parameters

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.
  • token: (Required for HTTP API) Oauth2 Personal Use Token, create via your tempestwx account.
  • station_id: (Required for HTTP API) The station ID you are pulling weather data from.
  • interval: (Required for HTTP API) How often to poll the Tempest REST API. Default 10 seconds. Minimum every second.
  • sensors: (Required) An array of sensors to create. This is dynamic incase you want to target different temperature or wind speed attributes.
  • sensors[].name: (Required) Display name of Sensor in Apple Home.
  • sensors[].sensor_type: (Required) The type of Home Sensor to create. There are 6 options ["Temperature Sensor", "Light Sensor", "Humidity Sensor", "Fan", "Motion Sensor", "Occupancy Sensor"].
  • sensors[].{1}_properties.value_key: (Required) Which REST API response body key to target for its value. You can find the available value_keys in the table below.
  • sensors[].motion_properties.trigger_value: (Required with Motion Sensor) At what point (value) to trigger motion detected on/off. Minimum 1.
  • sensors[].occupancy_properties.trigger_value: (Required with Occupancy Sensor) At what point (value) to trigger occupancy detected on/off. Minimum 0.

{1} Replace with Sensor: temperature, humidity, light, fan

sensor_type {2} value_key metric units std units additional_properties Typ metric trigger Typ std trigger Notes
Temperature Sensor air_temperature C F NA NA NA set by UI preferences
feels_like C F NA NA NA set by UI preferences
wind_chill C F NA NA NA set by UI preferences
dew_point C F NA NA NA set by UI preferences
Humidity Sensor relative_humidity % % NA NA NA
Light Sensor brightness lux lux NA NA NA
Fan wind_avg m/s mi/hr NA NA NA wind_avg speed reported as Fan %
Motion Sensor wind_gust m/s mi/hr motion_trigger_value 5 10
Occupancy Sensor {3}{4} barometric_pressure mb inHg occupancy_trigger_value 1000 30
precip mm/min in/hr occupancy_trigger_value 0.1 0.25
precip_accum_local_day mm in occupancy_trigger_value 25 1 Not available with Local API
solar_radiation W/m^2 W/m^2 occupancy_trigger_value 1000 1000
uv Index Index occupancy_trigger_value 3 3
wind_direction degrees degrees occupancy_trigger_value 360 360

{2} Reference: https://weatherflow.github.io/Tempest/api/swagger/#!/observations/getStationObservation

{3} Reference Wiki for details on how to view Occupancy Sensor values with iOS 16.x and MacOS Ventura 13.x.

{4} NOTE: There is a current limitation with v3.0.0 of the plug-in in that HomeKit accessory names are set when the accessory is initially added and cannot be dynamically updated. The accessories are correctly displayed and updated in the Homebridge "Accessories" tab of the webpage interface. Occupancy sensors trigger_value status is correctly displayed in both HomeKit and Homebridge.

Local API Config Example

{
  "name": "WeatherFlow Tempest Platform",
  "local_api": true,
  "units": "Standard",
  "sensors": [
      {
          "name": "Temperature",
          "sensor_type": "Temperature Sensor",
          "temperature_properties": {
              "value_key": "air_temperature"
          }
      },
      {
          "name": "Relative Humidity",
          "sensor_type": "Humidity Sensor",
          "humidity_properties": {
              "value_key": "relative_humidity"
          }
      },
      {
          "name": "Light Level",
          "sensor_type": "Light Sensor",
          "light_properties": {
              "value_key": "brightness"
          }
      },
      {
          "name": "Wind Speed",
          "sensor_type": "Fan",
          "fan_properties": {
              "value_key": "wind_avg"
          }
      },
      {
          "name": "Wind Gust",
          "sensor_type": "Motion Sensor",
          "motion_properties": {
              "value_key": "wind_gust",
              "trigger_value": 10
          }
      },
      {
          "name": "Barometer",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "barometric_pressure",
              "trigger_value": 30
          }
      },
      {
          "name": "Solar Radiation",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "solar_radiation",
              "trigger_value": 1000
          }
      },
      {
          "name": "UV",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "uv",
              "trigger_value": 3
          }
      },
      {
          "name": "Precipitation Rate",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "precip",
              "trigger_value": 0.25
          }
      },
      {
          "name": "Precipitation Today",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "precip_accum_local_day",
              "trigger_value": 1
          }
      },
      {
          "name": "Wind Direction",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "wind_direction",
              "trigger_value": 360
          }
      }
  ],
  "platform": "WeatherFlowTempest"
}

HTTP API Config Example

{
  "name": "WeatherFlow Tempest Platform",
  "local_api": false,
  "token": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
  "station_id": 10000,
  "interval": 10,
  "units": "Standard",
  "sensors": [
      {
          "name": "Temperature",
          "sensor_type": "Temperature Sensor",
          "temperature_properties": {
              "value_key": "air_temperature"
          }
      },
      {
          "name": "Feels Like",
          "sensor_type": "Temperature Sensor",
          "temperature_properties": {
              "value_key": "feels_like"
          }
      },
      {
          "name": "Dew Point",
          "sensor_type": "Temperature Sensor",
          "temperature_properties": {
              "value_key": "dew_point"
          }
      },
      {
          "name": "Relative Humidity",
          "sensor_type": "Humidity Sensor",
          "humidity_properties": {
              "value_key": "relative_humidity"
          }
      },
      {
          "name": "Light Level",
          "sensor_type": "Light Sensor",
          "light_properties": {
              "value_key": "brightness"
          }
      },
      {
          "name": "Wind Speed",
          "sensor_type": "Fan",
          "fan_properties": {
              "value_key": "wind_avg"
          }
      },
      {
          "name": "Wind Gust",
          "sensor_type": "Motion Sensor",
          "motion_properties": {
              "value_key": "wind_gust",
              "trigger_value": 10
          }
      },
      {
          "name": "Barometer",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "barometric_pressure",
              "trigger_value": 30
          }
      },
      {
          "name": "Solar Radiation",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "solar_radiation",
              "trigger_value": 1000
          }
      },
      {
          "name": "UV",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "uv",
              "trigger_value": 3
          }
      },
      {
          "name": "Precipitation Rate",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "precip",
              "trigger_value": 0.25
          }
      },
      {
          "name": "Precipitation Today",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "precip_accum_local_day",
              "trigger_value": 1
          }
      },
      {
          "name": "Wind Direction",
          "sensor_type": "Occupancy Sensor",
          "occupancy_properties": {
              "value_key": "wind_direction",
              "trigger_value": 360
          }
      }
  ],
  "platform": "WeatherFlowTempest"
}

homebridge-weatherflow-tempest's People

Contributors

chasenicholl avatar dmblakeley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dmblakeley

homebridge-weatherflow-tempest's Issues

OBS data missing

Describe Your Problem:
There are two issues that I am working through. The first is that when I create a new sensor, the humidity sensor is no longer an option. I only see Temp, Fan, and Light. If it try to manually update the json under advanced to create the humidity sensor, that doesnt work either.

The second issue is that when the API tries to connect for the first time, it returns a message that OBS data is missing.

Logs:

12/7/2022, 1:26:47 PMLaxton-HoobsWeatherFlow Tempest PlatformFinished initializing platform: WeatherFlow Tempest Platform
12/7/2022, 1:26:47 PMLaxton-HoobsWeatherFlow Tempest PlatformTempestApi initialized.
12/7/2022, 1:26:47 PMLaxton-HoobsWeatherFlow Tempest PlatformLoading accessory from cache: Outside Temperature
12/7/2022, 1:26:47 PMLaxton-HoobsWeatherFlow Tempest PlatformLoading accessory from cache: Outside Relative Humidity
12/7/2022, 1:26:47 PMLaxton-HoobsWeatherFlow Tempest PlatformLoading accessory from cache: Outside Light Level
12/7/2022, 1:26:47 PMLaxton-HoobsWeatherFlow Tempest PlatformLoading accessory from cache: Outside Wind Speed
12/7/2022, 1:26:47 PMLaxton-HoobsWeatherFlow Tempest PlatformExecuted didFinishLaunching callback
12/7/2022, 1:26:48 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:26:48 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 1 of 30. No cached "obs" data.
12/7/2022, 1:26:48 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:26:48 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 2 of 30. No cached "obs" data.
12/7/2022, 1:26:51 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:26:51 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 3 of 30. No cached "obs" data.
12/7/2022, 1:26:55 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:26:55 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 4 of 30. No cached "obs" data.
12/7/2022, 1:26:58 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:26:58 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 5 of 30. No cached "obs" data.
12/7/2022, 1:27:02 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:27:02 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 6 of 30. No cached "obs" data.
12/7/2022, 1:27:07 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:27:07 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 7 of 30. No cached "obs" data.
12/7/2022, 1:27:14 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:27:14 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 8 of 30. No cached "obs" data.
12/7/2022, 1:27:21 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:27:21 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 9 of 30. No cached "obs" data.
12/7/2022, 1:27:29 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:27:29 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 10 of 30. No cached "obs" data.
12/7/2022, 1:27:38 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:27:38 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 11 of 30. No cached "obs" data.
12/7/2022, 1:27:48 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:27:48 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 12 of 30. No cached "obs" data.
12/7/2022, 1:27:59 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:27:59 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 13 of 30. No cached "obs" data.
12/7/2022, 1:28:11 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:28:11 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 14 of 30. No cached "obs" data.
12/7/2022, 1:28:24 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:28:24 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 15 of 30. No cached "obs" data.
12/7/2022, 1:28:39 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:28:39 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 16 of 30. No cached "obs" data.
12/7/2022, 1:28:54 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:28:54 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 17 of 30. No cached "obs" data.
12/7/2022, 1:29:10 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:29:10 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 18 of 30. No cached "obs" data.
12/7/2022, 1:29:27 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:29:27 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 19 of 30. No cached "obs" data.
12/7/2022, 1:29:45 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:29:45 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 20 of 30. No cached "obs" data.
12/7/2022, 1:30:04 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:30:04 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 21 of 30. No cached "obs" data.
12/7/2022, 1:30:24 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:30:24 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 22 of 30. No cached "obs" data.
12/7/2022, 1:30:45 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:30:45 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 23 of 30. No cached "obs" data.
12/7/2022, 1:31:08 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:31:08 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 24 of 30. No cached "obs" data.
12/7/2022, 1:31:31 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:31:31 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 25 of 30. No cached "obs" data.
12/7/2022, 1:31:55 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:31:55 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 26 of 30. No cached "obs" data.
12/7/2022, 1:32:20 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:32:20 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 27 of 30. No cached "obs" data.
12/7/2022, 1:32:46 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:32:46 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 28 of 30. No cached "obs" data.
12/7/2022, 1:33:13 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:33:13 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 29 of 30. No cached "obs" data.
12/7/2022, 1:33:41 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGResponse missing "obs" data.
12/7/2022, 1:33:41 PMLaxton-HoobsWeatherFlow Tempest PlatformWARNINGRetrying 30 of 30. No cached "obs" data.
12/7/2022, 1:34:10 PMLaxton-HoobsWeatherFlow Tempest PlatformERRORReached max API retries: 30. Stopping.
12/7/2022, 1:34:10 PMLaxton-HoobsWeatherFlow Tempest PlatformFailed to fetch initial Station Current Observations after retrying. Refusing to continue.

Plugin Config:

{
"platform": "WeatherFlowTempest",
"name": "WeatherFlow Tempest Platform",
"interval": 10,
"token": "72685be3-d674-4023-b475-e49160a8d324",
"station_id": "ST-00018457",
"sensors": [
{
"name": "Outside Temperature",
"sensor_type": "Temperature Sensor",
"value_key": "air_temperature"
},
{
"name": "Outside Relative Humidity",
"sensor_type": "",
"value_key": "relative_humidity"
},
{
"name": "Outside Light Level",
"sensor_type": "Light Sensor",
"value_key": "brightness"
},
{
"name": "Outside Wind Speed",
"sensor_type": "Fan",
"value_key": "wind_avg"
}
]
}

Screenshots:

image

Environment:

  • Plugin Version: 1.2.2
  • Homebridge Version: 4.2.8
  • Node.js Version: 16.18.1
  • NPM Version: 8.19.2
  • Operating System: Rasbian

error: Response missing "obs" data.

Describe The Bug:

After successful initialization, the following error occurs, continuously, approximately every 30 seconds.

[9/23/2023, 3:41:36 PM] [WeatherFlow Tempest Platform] Response missing "obs" data.
[9/23/2023, 3:41:36 PM] [WeatherFlow Tempest Platform] Returning last cached response.

To Reproduce:

Always occurs.

Expected behavior:

No error expected.

Logs:

[9/23/2023, 3:51:25 PM] [WeatherFlow Tempest Platform] Response missing "obs" data.
[9/23/2023, 3:51:25 PM] [WeatherFlow Tempest Platform] Returning last cached response.
[9/23/2023, 3:52:16 PM] [WeatherFlow Tempest Platform] Response missing "obs" data.
[9/23/2023, 3:52:16 PM] [WeatherFlow Tempest Platform] Returning last cached response.

Plugin Config:

{
    "name": "WeatherFlow Tempest Platform",
    "token": "myToken",
    "station_id": myID,
    "interval": 10,
    "units": "Standard",
    "sensors": [
        {
            "name": "Backyard Temperature",
            "sensor_type": "Temperature Sensor",
            "temperature_properties": {
                "value_key": "air_temperature"
            }
        }
    ],
    "_bridge": {
        "username": "myName",
        "port": 30801
    },
    "platform": "WeatherFlowTempest"
}

Screenshots:

Environment:

  • Plugin Version: 3.0.1
  • Homebridge Version: 1.61
  • Node.js Version: 18.13.0
  • NPM Version:
  • Operating System: Docker

Repeating "[WeatherFlow] AxiosError: Request failed with status code 404" Notification in the Homebridge Log

Describe The Bug:
Plugin giving a repeating "[WeatherFlow] AxiosError: Request failed with status code 404" Notification in the Homebridge Log

To Reproduce:
Not Sure!

Expected behavior:
Didn't used to happen - started happening a few months ago - reinstalled the app - regenerated station token - still throws the same error - plugin works and gets values to homekit, just keep getting this repeating log over and over.

Logs:

[30/07/2024, 13:08:56] [Harris Hill Weather Station] [WeatherFlow] AxiosError: Request failed with status code 404
[30/07/2024, 13:09:06] [Harris Hill Weather Station] [WeatherFlow] AxiosError: Request failed with status code 404
[30/07/2024, 13:09:16] [Harris Hill Weather Station] [WeatherFlow] AxiosError: Request failed with status code 404
[30/07/2024, 13:09:26] [Harris Hill Weather Station] [WeatherFlow] AxiosError: Request failed with status code 404
[30/07/2024, 13:09:36] [Harris Hill Weather Station] [WeatherFlow] AxiosError: Request failed with status code 404

Plugin Config:
{
"name": "Harris Hill Weather Station",
"local_api": false,
"token": "REDACTED",
"station_id": 142328,
"interval": 10,
"units": "Standard",
"sensors": [
{
"name": "Outside Temperature",
"sensor_type": "Temperature Sensor",
"temperature_properties": {
"value_key": "air_temperature"
}
},
{
"name": "Outside Humidity",
"sensor_type": "Humidity Sensor",
"humidity_properties": {
"value_key": "relative_humidity"
}
}
],
"platform": "WeatherFlowTempest"
}

Screenshots:

Screenshot 2024-07-30 at 1 23 35 PM

Environment:

  • Plugin Version: v4.0.2
  • Homebridge Version: v1.8.4
  • Node.js Version: v20.16.0
  • NPM Version: v10.8.1
  • Operating System: Raspbian GNU/Linux Bullseye (11)

Lightning detection sensor?

Is your feature request related to a problem? Please describe:
It's frustrating to not be able to use lightning detection to trigger automations in HomeKit

Describe the solution you'd like:
The ability to configure a contact sensor that triggers when lightning has been detected. Configuration parameters might include the maximum lightning distance that triggers the sensor, and how long to keep the contact sensor closed after an in-range strike is detected. So the contact sensor could be configured to, for example, trigger when lightning has been detected within 10 miles in the past 15 minutes.

Response missing "obs" data, returning last cached response

Describe Your Problem:

Several times per day I receive the error shown in the logs below. The plugin is configured as a Child Bridge and starts without issue. Data being reported seems correct. Would like to understand how to eliminate this error.

I also have a Home-Assistant plugin also polling the Weatherflow-Tempest data.

Logs:

[2/7/2023, 6:25:26 PM] [WeatherFlow Tempest Platform] Response missing "obs" data.
[2/7/2023, 6:25:26 PM] [WeatherFlow Tempest Platform] Returning last cached response.

Plugin Config:

{
    "name": "WeatherFlow Tempest Platform",
    "token": "05d8d2db-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "station_id": 12345,
    "interval": 20,
    "sensors": [
        {
            "name": "Tempest Temperature",
            "sensor_type": "Temperature Sensor",
            "value_key": "air_temperature"
        },
        {
            "name": "Tempest Relative Humidity",
            "sensor_type": "Humidity Sensor",
            "value_key": "relative_humidity"
        },
        {
            "name": "Tempest Light Level",
            "sensor_type": "Light Sensor",
            "value_key": "brightness"
        },
        {
            "name": "Tempest Wind Speed",
            "sensor_type": "Fan",
            "value_key": "wind_avg"
        }
    ],
    "_bridge": {
        "username": "0E:5B:xx:xx:xx:xx",
        "port": 50691
    },
    "platform": "WeatherFlowTempest"
}

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version: v1.6.2
  • Node.js Version: v18.14.0 (problem also occurred on prior v16 and v18 node versions)
  • NPM Version: 8.19.2
  • Operating System: MacOS Ventura 13.2

Help with Weather Flow.

Describe Your Problem:

When I add the sensors, I receive the following message in the log "5/22/2023, 1:54:06 PMWeatherflow Tempest BridgeWeatherFlow Tempest PlatformERRORTypeError: Cannot read properties of undefined (reading 'value_key')"

Logs:
5/22/2023, 1:53:52 PMWeatherflow Tempest Bridge starting
5/22/2023, 1:54:05 PMWeatherflow Tempest BridgeLoaded plugin 'homebridge-weatherflow-tempest'
5/22/2023, 1:54:05 PMWeatherflow Tempest BridgeLoading 1 platforms...
5/22/2023, 1:54:05 PMWeatherflow Tempest BridgeWeatherFlow Tempest PlatformFinished initializing platform: WeatherFlow Tempest Platform
5/22/2023, 1:54:05 PMWeatherflow Tempest BridgeWeatherFlow Tempest PlatformTempestApi initialized.
5/22/2023, 1:54:05 PMWeatherflow Tempest BridgeWeatherFlow Tempest PlatformExecuted didFinishLaunching callback
5/22/2023, 1:54:06 PMWeatherflow Tempest BridgeBridge is running on port 51876.
5/22/2023, 1:54:06 PMWeatherflow Tempest BridgeWeatherFlow Tempest PlatformERRORTypeError: Cannot read properties of undefined (reading 'value_key')

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version:
  • Node.js Version:
  • NPM Version:
  • Operating System:

Error setting serial number in logs

Describe The Bug:
Plugin still works, but there's an error in the logs

To Reproduce:
Just happens on startup

Expected behavior:
No error in logs

Logs:

[14/12/2023, 10:53:23] [homebridge-weatherflow-tempest] This plugin generated a warning from the characteristic 'Serial Number': [Serial Number] characteristic must have a length of more than 1 character otherwise         HomeKit will reject this accessory, ignoring new value. See https://homebridge.io/w/JtMGR for more info.
[14/12/2023, 10:53:23] [homebridge-weatherflow-tempest] Error: 
    at SerialNumber.Characteristic.characteristicWarning (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3011:105)
    at SerialNumber.Characteristic.validateUserInput (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2963:14)
    at SerialNumber.Characteristic.setValue (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2229:20)
    at AccessoryInformation.Service.setCharacteristic (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:758:35)
    at new WeatherFlowTempestPlatformAccessory (/var/lib/homebridge/node_modules/homebridge-weatherflow-tempest/src/platformAccessory.ts:642:8)
    at WeatherFlowTempestPlatform.initAccessory (/var/lib/homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:351:9)
    at WeatherFlowTempestPlatform.discoverDevices (/var/lib/homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:297:14)
    at WeatherFlowTempestPlatform.initializeBySocket (/var/lib/homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:114:12)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Plugin Config:

{
  "name": "Tempest",
  "local_api": true,
  "token": "<Your API Token>",
  "station_id": 0,
  "interval": 10,
  "units": "Standard",
  "sensors": [
    {
      "name": "Air Temperature",
      "sensor_type": "Temperature Sensor",
      "temperature_properties": {
        "value_key": "air_temperature"
      }
    },
    {
      "name": "Humidity",
      "sensor_type": "Humidity Sensor",
      "humidity_properties": {
        "value_key": "relative_humidity"
      }
    },
    {
      "name": "Brightness",
      "sensor_type": "Light Sensor",
      "light_properties": {
        "value_key": "brightness"
      }
    },
    {
      "name": "Feels Like",
      "sensor_type": "Temperature Sensor",
      "temperature_properties": {
        "value_key": "feels_like"
      }
    },
    {
      "name": "Wind Gust",
      "sensor_type": "Motion Sensor",
      "motion_properties": {
        "value_key": "wind_gust",
        "trigger_value": 3
      }
    },
    {
      "name": "Rain",
      "sensor_type": "Occupancy Sensor",
      "occupancy_properties": {
        "value_key": "precip",
        "trigger_value": 0
      }
    }
  ],
  "_bridge": {
    "username": "0E:C9:A9:4B:4B:4B",
    "port": 42489
  },
  "platform": "WeatherFlowTempest"
}

Environment:

  • Plugin Version: v4.0.0
  • Homebridge Version: 1.7.0
  • Node.js Version: v20.9.0
  • NPM Version: 10.1.0
  • Operating System: Raspbian

Temperature not converting to Fahrenheit

Describe The Bug:

"sensor_type": "Temperature Sensor" returns value in Celsius even with "units_temp": "f"

To Reproduce:

Read temperature from any station with "units_temp": "f"

Expected behavior:

Comment indicates that conversion should occur, but there doesn't appear to be any code currently doing so. I'm not too familiar with such, so it may be a bug in something implemented rather than something being omitted.

Logs:

[04/05/2023, 11:31:04] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[04/05/2023, 11:31:04] [HB Supervisor] Started Homebridge v1.6.1 with PID: 1590
[04/05/2023, 11:31:08] Loaded config.json with 0 accessories and 2 platforms.
[04/05/2023, 11:31:08] Loaded 3 cached accessories from cachedAccessories.
[04/05/2023, 11:31:09] ---
[04/05/2023, 11:31:09] Loaded plugin: [email protected]
[04/05/2023, 11:31:09] Registering platform 'homebridge-weatherflow-tempest.WeatherFlowTempest'
[04/05/2023, 11:31:09] ---
[04/05/2023, 11:31:09] Loading 2 platforms...
[04/05/2023, 11:31:09] [WeatherFlow Tempest Platform] Initializing WeatherFlowTempest platform...
[04/05/2023, 11:31:09] [WeatherFlow Tempest Platform] Finished initializing platform: WeatherFlow Tempest Platform
[04/05/2023, 11:31:09] [WeatherFlow Tempest Platform] TempestApi initialized.
[04/05/2023, 11:31:09] [WeatherFlow Tempest Platform] Loading accessory from cache: Outside Temperature
[04/05/2023, 11:31:09] [WeatherFlow Tempest Platform] Loading accessory from cache: Outside UV

Plugin Config:

{
    "bridge": {
        "name": "",
        "username": "",
        "port": 51829,
        "pin": "",
        "advertiser": "avahi"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "WeatherFlow Tempest Platform",
            "token": "",
            "station_id":,
            "interval": 10,
            "sensors": [
                {
                    "name": "Outside Temperature",
                    "sensor_type": "Temperature Sensor",
                    "value_key": "feels_like"
                },
                {
                    "name": "Outside UV",
                    "sensor_type": "Light Sensor",
                    "value_key": "uv"
                }
            ],
            "platform": "WeatherFlowTempest"
        }
    ]
}

Screenshots:

Environment:

  • Plugin Version: 2.0.1
  • Homebridge Version: 1.6.1
  • Node.js Version: 18.12.1
  • NPM Version: 8.19.2
  • Operating System: Raspbian

Need help making new version work

Describe Your Problem:
Received the errors shown in the logs below and the accessory doesn’t work. I have deleted the previous version and reinstalled the new version, but it still doesn’t work.

Logs:


[5/20/2023, 12:20:04 PM] [WeatherFlow Tempest Platform] Adding new accessory: undefined
[5/20/2023, 12:20:04 PM] [WeatherFlow Tempest Platform] AssertionError [ERR_ASSERTION]: Accessories must be created with a non-empty displayName.
at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:491:11)
at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:71:9)
at WeatherFlowTempestPlatform.initAccessory (/usr/local/lib/node_modules/homebridge-weatherflow-tempest/src/platform.ts:266:25)
at WeatherFlowTempestPlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-weatherflow-tempest/src/platform.ts:210:14)
at /usr/local/lib/node_modules/homebridge-weatherflow-tempest/src/platform.ts:95:16
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
generatedMessage: false,
code: ‘ERR_ASSERTION’,
actual: undefined,
expected: true,
operator: ‘==’
}

Plugin Config:

{
“name”: “WeatherFlow Tempest Platform”,
“token”: “hidden”,
“station_id”: hidden,
“interval”: 10,
“units”: “Standard”,
“sensors”: [
{
“sensor_type”: “Temperature Sensor”,
“temperature_properties”: {
“value_key”: “air_temperature”
}
},
{
“sensor_type”: “Humidity Sensor”,
“humidity_properties”: {
“value_key”: “relative_humidity”
}
}
],
“platform”: “WeatherFlowTempest”
}

Screenshots:

Environment:

  • Plugin Version: 3.0.0
  • Homebridge Version: 1.6.1
  • Node.js Version: 18.15.0
  • NPM Version: 9.6.4
  • Operating System: macOS

Unhandled Exception

Here is my configuration:

{
    "platform": "WeatherFlowTempest",
    "name": "WeatherFlow Tempest Platform",
    "interval": 10,
    "token": "<token>",
    "station_id": "<station_id>",
    "sensors": [
        {
            "name": "Temperature",
            "sensor_type": "Temperature Sensor",
            "value_key": "air_temperature"
        }
    ]
}

The following log shows the unhandled exception that is being produced when initializing the bridge using HOOBS 4.2.8, Homebridge 1..5.0,

11/25/2022, 12:26:50 AMWeatherflow Tempest Bridge starting
11/25/2022, 12:27:01 AMWeatherflow Tempest BridgeLoaded plugin 'homebridge-weatherflow-tempest'
11/25/2022, 12:27:01 AMWeatherflow Tempest BridgeLoading 1 platforms...
11/25/2022, 12:27:01 AMWeatherflow Tempest BridgeWeatherFlow Tempest PlatformFinished initializing platform: WeatherFlow Tempest Platform
11/25/2022, 12:27:01 AMWeatherflow Tempest BridgeWeatherFlow Tempest PlatformTempestApi initialized.
11/25/2022, 12:27:01 AMWeatherflow Tempest BridgeWeatherFlow Tempest PlatformExecuted didFinishLaunching callback
11/25/2022, 12:27:02 AMWeatherflow Tempest BridgeBridge is running on port 51866.
11/25/2022, 12:27:02 AMWeatherflow Tempest BridgeWARNINGunhandled rejection: TypeError: Cannot use 'in' operator to search for 'obs' in ����U�n�0����gG5-[�xk����=��AK���D
�i�
��]�eŒ�����>F3�+���R+.3���6����D	��].,���M����,H���L������gx�I����[�a ��d���1����H�� ^�k� V��O+_�k	F���wPG�e��c3�a4Y'A�'�U�F[�o7�"k��A�5�ڡ]M�kw���}��P���{=���~<=��˪NI�<n��BYa�3���'���RV�U�R鳤�cu�oR��4��F�
*G(�h�$�0�T��������.+���8�v6��p��G�ݰ��q����4C��]�����%X$�2�e�����5�Kb����C1�2���x�J�I{n_z����i�J^��r��	�SQ�L�o��s��L�����I*�r����C�
��rq<����逃�m�.\��Ժ����I�e��g��Cn����М�:��������t�ߌ���IH�S�f`L�����x�(����%�a9.���-�\6kfp╖M��X�w��J`�|(������Vp�)3�U{��A��v_G�e4��0�4�Lu���A4/f��U���������*	蜜Y�
�f�`yK�s�Az����n���D�\���ح��'�2J�x?���l��\��,�h�Nl�(ݎ��I����N���u�d��#�y��ռ��͆n����c���f�\Y���ٯ��ȃ�22b�\���>=
��d�����c�����[�ޠ�,7a���+0����L�����Je+�4�

TypeError: Cannot read properties of undefined (reading 'value_key')

Describe The Bug:
I am now seeing TypeError: Cannot read properties of undefined (reading 'value_key').

To Reproduce:
Always.

Expected behavior:
Error should not occur.

This was working under previous version of Homebridge and/or this plug-in.

Logs:

[5/28/2023, 3:32:32 PM] [WeatherFlow Tempest Platform] Executed didFinishLaunching callback
[5/28/2023, 3:32:32 PM] [WeatherFlow Tempest Platform] TypeError: Cannot read properties of undefined (reading 'value_key')
    at WeatherFlowTempestPlatform.initAccessory (/homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:223:50)
    at WeatherFlowTempestPlatform.discoverDevices (/homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:210:14)
    at /homebridge/node_modules/homebridge-weatherflow-tempest/src/platform.ts:95:16
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Plugin Config:

{
    "name": "WeatherFlow Tempest Platform",
    "token": "5bAAAAAA-XXXX-ZZZZ-QQQQ-AAAAAAAAAAAA22",
    "station_id": XXXXXX,
    "interval": 10,
    "units": "Standard",
    "sensors": [
        {
            "name": "Backyard Temperature",
            "sensor_type": "Temperature Sensor",
            "temperature_properties": {
                "value_key": "air_temperature"
            }
        },
        {
            "name": "Backyard Feels Like",
            "sensor_type": "Temperature Sensor",
            "temperature_properties": {
                "value_key": "feels_like"
            }
        }
    ],
    "platform": "WeatherFlowTempest"
}

Environment:

  • Plugin Version:
  • Homebridge Version: 1.6.1
  • Node.js Version: 18.3.0>
  • NPM Version:
  • Operating System: Docker on Ubuntu

v4.0.1 fails with TypeError: Cannot read properties of undefined (reading 'toString')

Describe The Bug:
v4.0.1 gives a TypeError, plugin fails to run. Reverting to v4.0.0 resolves.

To Reproduce:
Update a working v4.0.0 to v4.0.1

Logs:

1/5/2024, 11:46:46 AM Weather Bridge starting
1/5/2024, 11:46:50 AM Weather Bridge Loaded plugin 'homebridge-weatherflow-tempest'
1/5/2024, 11:46:50 AM Weather Bridge Loading 1 platforms...
1/5/2024, 11:46:50 AM Weather Bridge WeatherFlow Tempest Platform Finished initializing platform: WeatherFlow Tempest Platform
1/5/2024, 11:46:50 AM Weather Bridge WARNING unhandled rejection: TypeError: Cannot read properties of undefined (reading 'toString')

Plugin Config:

{
    "name": "WeatherFlow Tempest Platform",
    "local_api": true,
    "units": "Standard",
    "sensors": [
        {
            "name": "Temperature",
            "sensor_type": "Temperature Sensor",
            "temperature_properties": {
                "value_key": "air_temperature"
            }
        },
        {
            "name": "Relative Humidity",
            "sensor_type": "Humidity Sensor",
            "humidity_properties": {
                "value_key": "relative_humidity"
            }
        },
        {
            "name": "Light Level",
            "sensor_type": "Light Sensor",
            "light_properties": {
                "value_key": "brightness"
            }
        },
        {
            "name": "Wind Speed",
            "sensor_type": "Fan",
            "fan_properties": {
                "value_key": "wind_avg"
            }
        }
    ],
    "platform": "WeatherFlowTempest"
}

Environment:

  • Plugin Version: 4.0.1
  • Homebridge Version: 1.6.0
  • Node.js Version: 16.20.2
  • NPM Version: 8.19.4
  • Operating System: Linux hoobs 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.