thkl / hap-homematic

a AddOn for HomeMatic CCU3 (Raspberrymatic) that will bring HomeKit to your CCU
MIT License
222 stars 24 forks source link

Cannot start hap-homematic after initial config #531

Open juangamnik opened 2 years ago

juangamnik commented 2 years ago

Please describe your problem Which Homematic actor/sensor you want to control ?

Which settings y've choosen for this actor/sensor in hap-homematic ?

Just initial setup (chosen a room where they are in and selected them to be published to HomeKit

What happened

Startup crashes with error:

Error log : Sat Feb 12 2022 12:34:43 GMT+0100 (Central European Standard Time)

TypeError: Cannot set properties of undefined (setting 'lockEvents')
    at /home/pi/hap-homematic/node_modules/hap-homematic/lib/services/HomeMaticKeyMaticIPAccessory.js:176:30
    at /home/pi/hap-homematic/node_modules/hap-homematic/lib/HomeMaticCCU.js:832:9
    at Array.map (<anonymous>)
    at HomeMaticCCU.fireEvent (/home/pi/hap-homematic/node_modules/hap-homematic/lib/HomeMaticCCU.js:831:14)
    at /home/pi/hap-homematic/node_modules/hap-homematic/lib/HomeMaticCCU.js:532:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

What should have happened

Startup works and I can use the devices in HomeKit


I use DebMatic with the corresponding installation guide.

juangamnik commented 2 years ago

I am using "hap-homematic": "^0.0.63" with debmatic. I took a look at the following code line:

$HOME/hap-homematic/node_modules/hap-homematic/lib/services/HomeMaticKeyMaticIPAccessory.js:176

I changed the following in that line:

-  self.self.lockEvents
+  self.lockEvents = false

It works afterwards, but I am unsure, whether the "fix" is a "real fix".

juangamnik commented 2 years ago

And just for the record: the HmIP-SWDO-I are not part of the „problem“. I cleaned up ~/.hap-homematic/, and started with the window sensors… no issue, added HmIP-DLD.. problem was there again. With the abovementioned fix in the code it works with HmIP-DLD and HmIP-SWDO-I for the time being.

juangamnik commented 2 years ago

Any news on this?

ChrWi commented 8 months ago

Honestly I don‘t get your issue. Is it working in general with your fix independently from the device? maybe this is deb specific. Have you crosschecked with #492 ?