thkl / homebridge-homematic

Homematic plugin for homebridge: https://github.com/nfarina/homebridge
180 stars 51 forks source link

Homebridge 1.3 not able to read CCU3 HM-Sec-SC-2 window sensor or HM-Sec-SD-2 Smoke Detector #655

Closed BerndGewehr closed 3 years ago

BerndGewehr commented 3 years ago

Not sure whether this relates to bridge or plugin... Error appeared after 1.3 update for the first time. (See also https://github.com/homebridge/homebridge/issues/2821)

Describe The Bug:

HM-Sec-SC-2 window sensors and HM-Sec-SD-2 smoke detectors causes an error in HB1.3 The devices are inactive in Homekit

Logs:

[2/20/2021, 1:51:10 PM] [homebridge-homematic] This plugin generated a warning from the characteristic 'Contact Sensor State': Unhandled error thrown inside read handler for characteristic: Error: characteristic value NaN is not contained in valid values array!
    at ContactSensorState.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2028:15)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1490:24
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at /homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitContactService.js:241:9
    at HomeMaticHomeKitContactService.query (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeKitGenericService.js:404:11)
    at ContactSensorState.<anonymous> (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitContactService.js:234:12)
    at ContactSensorState.emit (events.js:315:20)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1466:14
    at new Promise (<anonymous>)
    at ContactSensorState.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1464:12)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:113:16)
    at ContactSensorState.Characteristic.handleGetRequest (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Characteristic.js:632:24)
    at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1507:27)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:113:16) See https://git.io/JtMGR for more info.
[2/20/2021, 2:04:21 PM] [homebridge-homematic] This plugin generated a warning from the characteristic 'Smoke Detected': Unhandled error thrown inside read handler for characteristic: Error: characteristic value NaN is not contained in valid values array!
    at SmokeDetected.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2028:15)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1490:24
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at /homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitSmokeDetectorService.js:18:23
    at HomeMaticHomeKitSmokeDetectorService.query (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeKitGenericService.js:404:11)
    at SmokeDetected.<anonymous> (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitSmokeDetectorService.js:17:12)
    at SmokeDetected.emit (events.js:315:20)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1466:14
    at new Promise (<anonymous>)
    at SmokeDetected.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1464:12)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:113:16)
    at SmokeDetected.Characteristic.handleGetRequest (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Characteristic.js:632:24)
    at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1507:27)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:113:16) See https://git.io/JtMGR for more info.
BerndGewehr commented 3 years ago

See https://github.com/homebridge/homebridge/wiki/Characteristic-Warnings#this-plugin-generated-a-warning-from-the-characteristic for details

BerndGewehr commented 3 years ago

For a little more detail: see here the debug output from homebridge:

[2/20/2021, 6:25:47 PM] [HomeMatic CCU] [Generic] query STATE
[2/20/2021, 6:25:47 PM] [HomeMatic CCU] [Generic] transformDatapoint STATE
[2/20/2021, 6:25:47 PM] [HomeMatic CCU] [Cache] hit on BidCos-RF.LEQ0138659:1.STATE false
[2/20/2021, 6:25:47 PM] [HomeMatic CCU] [Contact] normal mode false
[2/20/2021, 6:25:47 PM] [homebridge-homematic] This plugin generated a warning from the characteristic 'Contact Sensor State': Unhandled error thrown inside read handler for characteristic: Error: characteristic value NaN is not contained in valid values array!
    at ContactSensorState.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2028:15)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1490:24
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at /homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitContactService.js:241:9
    at HomeMaticHomeKitContactService.query (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeKitGenericService.js:404:11)
    at ContactSensorState.<anonymous> (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitContactService.js:234:12)
    at ContactSensorState.emit (events.js:315:20)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1466:14
    at new Promise (<anonymous>)
    at ContactSensorState.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1464:12)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:113:16)
    at ContactSensorState.Characteristic.handleGetRequest (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Characteristic.js:632:24)
    at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1507:27)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:113:16) See https://git.io/JtMGR for more info.
[2/20/2021, 6:25:47 PM] [homebridge-homematic] Error: 
    at ContactSensorState.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2063:79)
DannyBoyKN commented 3 years ago

I think I have the same problem since todays (watchtower updated home bridge container) update to v1.3.0. The log error is similar to above:

...
Starting to advertise 'Homebridge B7D2' using bonjour-hap backend!
[2/20/2021, 6:31:50 PM] Homebridge v1.3.0 (Homebridge) is running on port 51826.
...
[2/20/2021, 6:31:50 PM] [HomeMatic CCU2] [Core] will cache ccu response to /homebridge/ccu.json
[2/20/2021, 6:31:52 PM] [homebridge-homematic] This plugin generated a warning from the characteristic 'Contact Sensor State': Unhandled error thrown inside read handler for characteristic: Error: characteristic value NaN is not contained in valid values array!
    at ContactSensorState.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2028:15)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1490:24
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at /homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitContactService.js:241:9
    at HomeMaticHomeKitContactService.query (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeKitGenericService.js:404:11)
    at ContactSensorState.<anonymous> (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitContactService.js:234:12)
    at ContactSensorState.emit (events.js:315:20)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1466:14
    at new Promise (<anonymous>)
    at ContactSensorState.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1464:12)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:143:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:124:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:113:16)
    at ContactSensorState.Characteristic.handleGetRequest (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Characteristic.js:632:24) See https://git.io/JtMGR for more info.

[2/20/2021, 6:31:52 PM] [FHEM]   value: 0
[2/20/2021, 6:31:52 PM] [FHEM] HM_HmIP_BWTH_000C9A49A7DA9A_Bad-1.SET_POINT_MODE value 0 not handled in values
[2/20/2021, 6:31:52 PM] [homebridge-fhem] This plugin generated a warning from the characteristic 'Target Heating Cooling State': characteristic was supplied illegal value: undefined! This might throw errors in the future! See https://git.io/JtMGR for more info.

From time to time it just stops and docker is restarting the container back and back again ...

chrkan commented 3 years ago

the problem is the same for me it is with the 1.30 following [2021-2-20 18:14:12] [homebridge-homematic] This plugin generated a warning from the characteristic 'Smoke Detected': Unhandled error thrown inside read handler for characteristic: Error: characteristic value NaN is not contained in valid values array! at SmokeDetected.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2028:15) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1490:24 at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18 at /usr/lib/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitSmokeDetectorService.js:18:23 at HomeMaticHomeKitSmokeDetectorService.query (/usr/lib/node_modules/homebridge-homematic/ChannelServices/HomeKitGenericService.js:404:11) at SmokeDetected.<anonymous> (/usr/lib/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitSmokeDetectorService.js:17:12) at SmokeDetected.emit (events.js:310:20) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1466:14 at new Promise (<anonymous>) at SmokeDetected.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1464:12) See https://git.io/JtMGR for more info.

thkl commented 3 years ago

das sollte mit Version 0.2.224 erledigt sein / the version 0.2.224 should fix this issue

bgewehr commented 3 years ago

confirmed. Issue solved.

TiiFuchs commented 3 years ago

Ich habe Version 0.2.226 im Einsatz und erhalte den Fehler trotzdem noch für diese Charakteristiken:

[2021-2-22 8:48:44] [homebridge-homematic] This plugin generated a warning from the characteristic 'Current Position': characteristic was supplied illegal value: number 10000 exceeded maximum of 100. See https://git.io/JtMGR for more info.
[2021-2-22 8:48:44] [homebridge-homematic] This plugin generated a warning from the characteristic 'Target Position': characteristic was supplied illegal value: number 10000 exceeded maximum of 100. See https://git.io/JtMGR for more info.
BerndGewehr commented 3 years ago

Sieht für mich nach Kommafehler aus -> 100,00 = 10000 statt 100.00

thkl commented 3 years ago

Ja, aber der Contact Sensor und der Smoke Detector haben keine Current oder Target Position.

Das könnte aber aus der Rollo Klasse kommen. Was sind das ggf für welche ?

TiiFuchs commented 3 years ago

Siehe #662