SphtKr / homebridge-zway

Homebridge plugin for (better) HomeKit support of RaZBerry and Z-Way Server
ISC License
85 stars 37 forks source link

Sporadic little problems when having lots of several sensors / devices #56

Closed joergs-git closed 7 years ago

joergs-git commented 7 years ago

I was wondering from time to time, why sometimes certain devices (e.g. sensors, light-switches) simply didn't showed up in Homekit / eve - App. After playing around a while I noticed, that it simply didn't initialized (or maybe dumped the response from zway) maybe because of timing problems? So I temporarily deactivated homebridge-people, netatmo, roomba and soundtouch. After that I least got a first error-message, where homebridge-zway stopped: "ZWayServer ERROR! Failed to configure required characteristic "Contact Sensor State"! +1ms"

So I simply appended that that to the line as follows: map[(new Characteristic.ContactSensorState).UUID] = ["sensorBinary","sensorBinary.Door/Window","sensorBinary.alarmSensor_general_purpose"];

Since then it works fine. (now again 40 devices working instead of only 17 devices).

Next would be adding: #53 because I have plenty of waiting here... ;-)

SphtKr commented 7 years ago

Which device was this? Was it your device number 32? What manufacturer/model is this? I didn't know there was a Z-Way device that has a motion sensor and contact sensor in once device...

SphtKr commented 7 years ago

@klaasjoerg So, two things.

One is I had a bug where it should have actually returned a failure value and not configured the service--instead it hit an undefined value and blew up. So I'm fixing that.

Second though, really the problem is that the Z-Way plugin can't know whether a sensorBinary/general_purpose is a contact sensor, motion sensor, or leak sensor, or something else. This is talked about a bit in the docs, and you should specify a tag to tell the plugin what kind of sensor it is...it may not be a Contact Sensor, which is just the undefined default.

It still shouldn't simply explode, so I'm fixing that. You might go over your devices again though and see if you want to tag them with more specific device types.

joergs-git commented 7 years ago

Okay, thanks for letting me know. Since then I didn't have had any further problems. However I just added some certain tags to try this functionality, and it seem to work fine. But I also noticed that, if I try to tag the fibaro motion sensor (eye) as Homebridge.Service.Type:MotionSensor homebridge "freezes" again and stucks. So I removed that tag for the three fibaro eyes again, and it works. So, this as another hint/information for you....

SphtKr commented 7 years ago

Believed fixed in 9d163e6, reopen or create a new issue if not fixed.