Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Received error from get handler Error: Undefined characteristic value for batteryStatus #204

Open
seanson opened this issue Dec 12, 2024 · 0 comments · May be fixed by #205
Open

Received error from get handler Error: Undefined characteristic value for batteryStatus #204

seanson opened this issue Dec 12, 2024 · 0 comments · May be fixed by #205

Comments

@seanson
Copy link

seanson commented Dec 12, 2024

Been working flawlessly for ages. I had this issue and through some investigation found out about the overall issue in some upstream issues:

In the current noble fork:
abandonware/noble#341

And resolved in an upstream fork:
stoprocent/noble#4

Expected Behavior

Bluetooth LE events come through as normal, accessories are updated.

Current Behavior

Existing accessories stay at 0 temp/humidity/battery.
hcitool lescan receives beacons as normal.

Steps to Reproduce (for bugs)

Upgrade to newer Linux Kernel 6.8 / Ubuntu LTS 24.04.01, run homebridge and plugin as normal.
See Received error from get handler Error: Undefined characteristic value for batteryStatus in logs.

Versions

  • homebridge: 1.8.5
  • homebridge-mi-hygrothermograph: -- homebridge-mi-hygrothermograph@3.4.2
  • node: v20.18.0
  • OS: Ubuntu 24.04.1 LTS - Linux 6.8.0-49-generic #49-Ubuntu SMP PREEMPT_DYNAMIC x86_64

Configuration

        {
            "name": "Office",
            "type": "Hygrotermograph",
            "address": "<snip>",
            "temperatureName": "Office Temperature",
            "humidityName": "Office Humidity",
            "moistureName": "Moisture",
            "fertilityName": "Fertility",
            "illuminanceName": "Illuminance",
            "fakeGatoEnabled": false,
            "timeout": 15,
            "forceDiscovering": true,
            "forceDiscoveringDelay": 2500,
            "disableBatteryLevel": false,
            "lowBattery": 10,
            "temperatureOffset": 0,
            "humidityOffset": 0,
            "moistureOffset": 0,
            "fertilityOffset": 0,
            "illuminanceOffset": 0,
            "bindKey": "<snip>",
            "accessory": "Hygrotermograph"
        }

Homebridge Log / Command Output

2024-12-12T01:39:55.155Z HAP-NodeJS:Characteristic [Status Low Battery] Received error from get handler Error: Undefined characteristic value for batteryStatus
    at HygrothermographAccessory.onCharacteristicGetValue (/homebridge/git/homebridge-mi-hygrothermograph/lib/accessory.js:563:16)
    at StatusLowBattery.emit (node:events:519:28)
    at /homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2468:14
    at new Promise (<anonymous>)
    at StatusLowBattery.<anonymous> (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2466:12)
    at step (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:196:27)
    at Object.next (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:177:57)
    at /homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:170:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:166:16)
2024-12-12T01:39:55.156Z HAP-NodeJS:Characteristic [Battery Level] Received error from get handler Error: Undefined characteristic value for batteryLevel
    at HygrothermographAccessory.onCharacteristicGetValue (/homebridge/git/homebridge-mi-hygrothermograph/lib/accessory.js:563:16)
    at BatteryLevel.emit (node:events:519:28)
    at /homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2468:14
    at new Promise (<anonymous>)
    at BatteryLevel.<anonymous> (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2466:12)
    at step (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:196:27)
    at Object.next (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:177:57)
    at /homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:170:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:166:16)
2024-12-12T01:39:55.156Z HAP-NodeJS:Characteristic [Current Temperature] Received error from get handler Error: Undefined characteristic value for temperature
    at HygrothermographAccessory.onCharacteristicGetValue (/homebridge/git/homebridge-mi-hygrothermograph/lib/accessory.js:563:16)
    at CurrentTemperature.emit (node:events:519:28)
    at /homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2468:14
    at new Promise (<anonymous>)
    at CurrentTemperature.<anonymous> (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2466:12)
    at step (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:196:27)
    at Object.next (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:177:57)
    at /homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:170:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:166:16)
2024-12-12T01:39:55.157Z HAP-NodeJS:Characteristic [Current Relative Humidity] Received error from get handler Error: Undefined characteristic value for humidity
    at HygrothermographAccessory.onCharacteristicGetValue (/homebridge/git/homebridge-mi-hygrothermograph/lib/accessory.js:563:16)
    at CurrentRelativeHumidity.emit (node:events:519:28)
    at /homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2468:14
    at new Promise (<anonymous>)
    at CurrentRelativeHumidity.<anonymous> (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2466:12)
    at step (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:196:27)
    at Object.next (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:177:57)
    at /homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:170:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/homebridge/node_modules/homebridge/node_modules/tslib/tslib.js:166:16)
@seanson seanson linked a pull request Dec 12, 2024 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant