thkl / homebridge-homematic

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

error(s) in hombridge beta v1.3.0 #634

Closed j-p-l closed 3 years ago

j-p-l commented 3 years ago

Ich habe aktuell die homebridge-homematic v0.1.230 beta laufen und bekomme folgenden Fehler, wenn ich in die hombridge auf die beta v1.3.0 upgrade:

Error: characteristic value NaN is not contained in valid values array!
at Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1683:15)
at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1155: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:229:11
at /homebridge/node_modules/homebridge-homematic/ChannelServices/HomeKitGenericService.js:473:13
at /homebridge/node_modules/homebridge-homematic/ChannelServices/HomeKitGenericService.js:685:13
at /homebridge/node_modules/homebridge-homematic/HomeMaticCCU.js:124:11
at /homebridge/node_modules/homebridge-homematic/HomeMaticRegaRequest.js:66:9
at IncomingMessage.<anonymous> (/homebridge/node_modules/homebridge-homematic/HomeMaticRegaRequest.js:42:9)
at IncomingMessage.emit (events.js:327:22)

Wenn ich auf die homebridge-homematic v0.1.331 gehe, bekomme ich diesen Fehler:

TypeError: Cannot read property 'split' of undefined
at HomeMaticHomeKitValveService.createDeviceService (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitValveService.js:16:21)
at HomeMaticHomeKitValveService.HomeKitGenericService (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeKitGenericService.js:110:8)
at new HomeMaticHomeKitValveService (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitValveService.js:7:39)
at HomeMaticServiceClassLoader.loadChannelService (/homebridge/node_modules/homebridge-homematic/HomeMaticServiceClassLoader.js:130:23)
at /homebridge/node_modules/homebridge-homematic/index.js:383:29
at Array.map (<anonymous>)
at /homebridge/node_modules/homebridge-homematic/index.js:343:25
at Array.map (<anonymous>)
at HomeMaticPlatform.buildaccesories (/homebridge/node_modules/homebridge-homematic/index.js:331:18)
at /homebridge/node_modules/homebridge-homematic/index.js:278:12

Ich hatte gestern einmal bei homebridge ein issue augemacht und da kam der Vorschalg hier mal reinzuschauen: https://github.com/thkl/homebridge-homematic/blob/35ad0f21331b23935d51a93c4c7ce5c1282f80c2/ChannelServices/HomeMaticHomeKitValveService.js#L16

Hier der Link zu dem issue: https://github.com/homebridge/homebridge/issues/2713

Hat jemand eine Idee?

j-p-l commented 3 years ago

@thkl, hast du zufällig eine Idee?

j-p-l commented 3 years ago

Bin ich der einzige mit diesem Setup/Problem? Sollte ich besser eine neue Lösung suchen?

Samfox2 commented 3 years ago

Ich habe das gleiche Problem.

dkrizic commented 3 years ago

Es gibt keine Grund mehr diese Lösung zu nutzen, wenn es https://github.com/thkl/hap-homematic gibt.

j-p-l commented 3 years ago

HI @dkrizic, da bin ich tendenziell bei dir, allerdings benutze ich https://github.com/alexreinert/debmatic und leider ist dieses Addon noch nicht nutzbar.

@Samfox2: falls du auch debmatic nutzen solltest: https://github.com/alexreinert/debmatic/issues/170

thkl commented 3 years ago

Der Erste Fehler sollte mit dem Commit oben behoben sein.

Der 2. Ich habe das mal ausprobiert. es geht ja hier um die Special Valve class. Diese braucht einen Channel Parameter, der wird bei der Klasse mit in der .homebridge/homematic_Homematic_config.json Datei festgelegt.

 "special":[
            {
                "name" : "ValveDummyTest",
                "type" : "HM-SPECIAL-VALVE",
                "parameter" : {
                    "channel":"BidCos-RF.SERIAL:1"
                }
            }
            ],
            "services": [
                {
                    "type" : "HM-SPECIAL-VALVE",
                    "service":"HomeMaticHomeKitValveService"
                }
            ]
}

Wenn der channel Parameter nicht da ist crasht es halt.

Derzeit stecke ich allerdings mehr Effort in der hap-homematic Projekt und nicht mehr sehr viel hier rein. Da ich hier komplett von einer 3rd party Institution abhängig bin. Wenn Homebridge was ändert hab ich ein Problem ;(

j-p-l commented 3 years ago

Super, danke dir!!! Wird hier automatisch eine neue NPM Version erstellt? Ich teste das am Wochenende mal.

j-p-l commented 3 years ago

Es kommt leider ein neuer Fehler:

(node:2894) UnhandledPromiseRejectionWarning: TypeError: Class constructor HomeKitGenericService cannot be invoked without 'new'
    at new HomeMaticHomeKitContactService (/homebridge/node_modules/homebridge-homematic/ChannelServices/HomeMaticHomeKitContactService.js:12:41)
    at HomeMaticServiceClassLoader.loadChannelService (/homebridge/node_modules/homebridge-homematic/HomeMaticServiceClassLoader.js:154:29)
    at /homebridge/node_modules/homebridge-homematic/index.js:302:36
    at Array.map (<anonymous>)
    at /homebridge/node_modules/homebridge-homematic/index.js:239:27
    at Array.map (<anonymous>)
    at HomeMaticPlatform.updateAccesories (/homebridge/node_modules/homebridge-homematic/index.js:236:32)
    at HomeMaticPlatform.buildAccessories (/homebridge/node_modules/homebridge-homematic/index.js:218:12)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2894) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2894) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Da du dich auf das Addon konzentrierst, sollten wir das besser auch tun. Vielen Dank für deine Hilfe!