tommasomarchionni / homebridge-openHAB

Homebridge plugin for openHAB
Apache License 2.0
49 stars 18 forks source link

Contact Status Reversed #23

Open tannebil opened 8 years ago

tannebil commented 8 years ago

I'm monitoring some dry contacts my Omni using the openHAB omnilink binding. When a window is open, it shows as "contact detected" in Home and "Contact: YES" in Eve while the status shows as "open" in openHAB. Maybe it's just semantics but it seems like "contact detected" and "YES" are closer in meaning to "close" than "open". Is there a way to reverse the status display in homebridge-openHAB?

Update 1:

I checked the behavior against other contacts I have in HomeKit/homebridge and they report "contact detected/YES" when window/contact is closed.

Matsuo3rd commented 7 years ago

Same issue with a Z-Wave Sensative Strip (Window contact sensor). When the magnet is placed on the strip ("closed status"), OpenHab correctly reports: _2016-12-17 17:43:20.497 [INFO ] [runtime.busevents ] - WindowDiner1 state updated to CLOSED As well, Homebridge / OpenHab logs: [2016-12-17 17:43:20] [openHAB] OpenHAB WS - message from FenĂȘtre Salon 1: CLOSED

However, iOS Home App reports the sensor as OPEN (shall be CLOSED).

gijoecool commented 7 years ago

Are you in the latest homebridge-openHAB? I ran into the same problem yesterday and saw there was a bug in the code. Updating tho the latest version fixed it.

Matsuo3rd commented 7 years ago

Thanks @gijoecool ! That was indeed the problem. In order to get latest version you need to install it through GitHub (instead of npm package): ./npm install -g https://github.com/tommasomarchionni/homebridge-openHAB

I thought I was running the latest version (0.1.32) but that was not the case (0.1.31). I was using npm to install homebridge-openhab as stated in the documentation: npm install -g homebridge-openhab However, it turns out that plugin author has not commited yet the latest vesion on npm (it is still 0.1.31). Thanks a thousand times!

martinvw commented 7 years ago

I also had to switch to the dev version, time for a new release?

@tommasomarchionni

ghost commented 7 years ago

Can someone provide step-by-step instructions on updating the homebridge-openhab plugin to 0.1.32? I have the same problem with iOS Home displaying contact status reversed. Pretty green here and currently have it working with 0.1.31 but when I try to install the newer version, Homebridge no longer starts up and I ultimately have to restore the SD card (RaspberryPi) with a backup to get things working again.