peledies / homebridge-ambient-weather-sensors

Apache License 2.0
2 stars 2 forks source link

Occasional Plugin Crash #5

Open rcoletti116 opened 8 months ago

rcoletti116 commented 8 months ago

Describe The Bug:

The plugin will occasionally crash on updateData.

To Reproduce:

It's unclear if this is triggered based on certain values.

Expected behavior:

Plugin should update data and not crash.

Logs:

TypeError: Cannot read properties of undefined (reading 'value')
    at TemperatureAccessory.updateData (/usr/local/lib/node_modules/homebridge-ambient-weather-sensors/src/temperatureAccessory.ts:56:29)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

TypeError: Cannot read properties of undefined (reading 'value')
    at HumidityAccessory.updateData (/usr/local/lib/node_modules/homebridge-ambient-weather-sensors/src/humidityAccessory.ts:53:29)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Plugin Config:

{
    "name": "AmbientWeatherSensors",
    "apiKey": "xx",
    "applicationKey": "xx",
    "temperatureSensors": true,
    "humiditySensors": true,
    "solarRadiationSensors": false,
    "platform": "AmbientWeatherSensors",
    "_bridge": {
        "username": "0E:9E:A4:19:5C:3F",
        "port": 39031
    }
}

Screenshots:

Environment:

WotAGitUR commented 7 months ago

I have a similar issue. The plugin makes the API call to ambient and gets this ERROR: invalid json response body at (API call) reason: Unexpected token '<', "<!DOCTYPE "... is not valid JSON Followed by TypeError: Cannot read properties of undefined (reading 'filter') at TemperatureAccessory.updateData (/var/lib/homebridge/node_modules/homebridge-ambient-weather-sensors/src/temperatureAccessory.ts:52:28) at processTicksAndRejections (node:internal/process/task_queues:95:5) At which point it stops making further requests and the only option is to restart Homebridge :(