rodtoll / homebridge-isy-js

Homebridge platform plugin for the ISY series of home controllers from Universal Devices.
MIT License
22 stars 27 forks source link

When garage door is open when you startup and motor is activated homebridge may be confused as to interim state #24

Open rodtoll opened 8 years ago

rodtoll commented 8 years ago

When you start up HomeBridge with the door open, and the motor is activated through the relay, HomeBridge doesn't know what state the door is in. Is it opening or closing? It's not clear, it depends on what last happened with the door before HomeBridge was started.

rodtoll commented 8 years ago

In the case where the door is closed when you start this all works. Because the sensor state changes to open so we know the garage door is opening. This is true regardless of how the open is initiated. (Remote control, ISY, wall control, program).

The issue here is in the case where the door is open and the user initiates a close outside of homebridge-isy.

If the user uses a garage door remote control or some kind of hardwired control then there is no way for the plugin to know. The relay doesn't get signaled so the state won't change until the door closes which triggers the open/close sensor. No way to fix this.

The one case we could make better is when the user uses an ISY based control to trigger the relay. That is the case where this bug is tracking. If we see the relay trigger we could assume the door is closing. This is a bit of a corner case so dropping in priority BUT still on the worklist.

markleepgh commented 7 years ago

Hi Rod, just to clarify: Should the ISY show "ON" or "OFF" when the garage door is closed? Please pardon my ignorance...

rodtoll commented 7 years ago

@markleepgh - Sorry I never replied to this. The device which is detecting the state of the garage door should be "OFF" when the garage door is closed. As per the notice on README.md I am discontinuing support so I won't be able to help beyond this. Thank you for your interest.

TheSwartz commented 6 years ago

I think my question is related to this? Homebridge shows my garage doors as "Open" when they are closed, and vice versa. I've tried setting up in Latching Mode and Momentary A. What could be reversing this?

PaulWieland commented 6 years ago

@TheSwartz are you sure the garage doors were physically closed when Homebridge was started?

PaulWieland commented 6 years ago

@TheSwartz Assuming your door was closed when you started homebridge, I believe you can reverse the open/close boolean logic in the config file by specifying "alternate": true in your garage door configuration. The efault is undefined or "alternate": false.

See https://github.com/rodtoll/homebridge-isy-js/blob/d57a50c828f07f7d47d508121824359b16020c6a/index.js#L949

and the function at line 961

TheSwartz commented 6 years ago

@fahrvergnuugen

Yep, have started up with them closed.

I have two garage doors, so experimented with adding that line to one of them. What is listed as "Bike Garage Door" now shows correctly. So, I will add the line to both entries.

Thanks!

"garageDoors": [{
                    "address": "3D 50 A7 1",
                    "name": "Car Garage Door",
                    "timeToOpen": 12000
                },
                {
                    "address": "3D 51 DB 1",
                    "name": "Bike Garage Door",
                    "timeToOpen": 12000,
                    "alternate": true
                }