Comments (14)
Oh and I have the latest version 0.2.3 of the plugin installed. Installed it yesterday as per the instructions in the read me. I have a chamberlain whisper drive plus if that matters at all.
Thanks for working on this plugin.
from homebridge-liftmaster2.
In looking at index.js i figured it has something to do with this block of code.
// Determine the current door state
var newState;
if (thisDoorState === "2") {
cache.initialState = Characteristic.CurrentDoorState.CLOSED;
newState = Characteristic.CurrentDoorState.CLOSED;
} else if (thisDoorState === "3") {
newState = Characteristic.CurrentDoorState.STOPPED;
} else if (thisDoorState === "5" || (thisDoorState === "8" && cache.initialState === Characteristic.CurrentDoorState.OPEN)) {
newState = Characteristic.CurrentDoorState.CLOSING;
} else if (thisDoorState === "4" || (thisDoorState === "8" && cache.initialState === Characteristic.CurrentDoorState.CLOSED)) {
newState = Characteristic.CurrentDoorState.OPENING;
} else if (thisDoorState === "1" || thisDoorState === "9") {
cache.initialState = Characteristic.CurrentDoorState.OPEN;
newState = Characteristic.CurrentDoorState.OPEN;
}
I'm not sure what a doorstate of 8 means. Is it as simple as reversing check for doorstate of 5 and 4?
from homebridge-liftmaster2.
door state 8 is for some other model. I think the Home app has it's own mechanism of determining opening/closing state. I had that problem, too. Try other HomeKit app such as Hesperus. I had no problem on state reporting with Hesperus. You can remove the doorstate 4 and 5 condition and see if that fixes the problem, too.
from homebridge-liftmaster2.
I checked Hesperus and also the Home app (non apple one by selfcoded.com). Both of those don't show the active opening and closing states. They just show open or closed states. The apple home app shows the extra states of opening and closing. I'll try and switch the 4 and 5 values around and see if the final states work in all apps and it fixes my apple home app issue.
from homebridge-liftmaster2.
Try to remove the condition instead. I believe apple Home app takes care of the transition state.
var newState;
if (thisDoorState === "2") {
cache.initialState = Characteristic.CurrentDoorState.CLOSED;
newState = Characteristic.CurrentDoorState.CLOSED;
} else if (thisDoorState === "3") {
newState = Characteristic.CurrentDoorState.STOPPED;
} else if (thisDoorState === "1" || thisDoorState === "9") {
cache.initialState = Characteristic.CurrentDoorState.OPEN;
newState = Characteristic.CurrentDoorState.OPEN;
}
from homebridge-liftmaster2.
Gave that a try.
Does the trick.
As a side note I checked my particular setup using instructions on how to do so on http://docs.unofficialliftmastermyq.apiary.io/.
It seems my system does receive the doorstate value of 8 while opening and closing. And my "open" state is a value of 9.
from homebridge-liftmaster2.
Since removing the conditions changed the behavior of the home app status the conditions did have an impact.
Do you have any idea why having the opening and closing conditions present would not override whatever the home app logic is correctly?
Just a curiosity now. Since the status works now.
Only time it shows incorrect status now is if i initiate the close or open action and then close the app and open it while it's in the act of opening or closing. If i do that the app will show open or closed instead of telling me it's in the act of opening or closing still.
But that's not a common real world situation so i can live with it.
from homebridge-liftmaster2.
The other states which are not listed are for the MyQ Garage add on for normal garage opener. I am currently using that one. That's why it is implemented in the plugin.
Regarding the the state reporting, I am not entirely sure how the Home app handles state reporting. Looks like it will determine intermediate state, closing or opening, by the app itself instead of querying from HomeKit accessory. For example, if the door is closed and you press the accessory icon, the Home app will report closing by default, without querying the actual state from the accessory, and vice versa. I don't know how the app will handle conflicts.
from homebridge-liftmaster2.
I have pushed an update to improve this issue. Please try 0.3.0
from homebridge-liftmaster2.
I'll give it a try later today.
Also note i am also using the myq garage 0201 add on for a normal garage door opener.
When i used the api call instructions from http://docs.unofficialliftmastermyq.apiary.io/. while door was opening and closing i saw values of 8 and 9 come through. never saw 4 or 5.
Unless i was doing something wrong when i was running the query.
from homebridge-liftmaster2.
For MyQ Garage, 8 means moving (either opening or closing), 9 means opened, and 2 means closed. It cannot differentiate between opening and closing.
from homebridge-liftmaster2.
Update works. Similar to how it worked with the manual edit to remove the extra conditions.
If i open the home app while it's opening or closing i still get inconsistent status of open (while it's actually closing) or status of closing (even though it's opening). But the final state if open or closed is always correct and the initial status of opening or closing when first pressing the accessory button in the IOS home app is correct.
Do you set polling to true in your setup? Any risk of getting my IP banned if i enable it to true and keep default settings? Right now polling is set to default (false) for me.
thanks again for this plugin. Homebridge and developers like you make the connected home actually usable.
from homebridge-liftmaster2.
The current algorithm is that it will only show closed if the door is closed. Therefore, opening, closing, and opened will yield to an open state. It will be too hard to take care of all the scenario providing that I don't know how the Home app actually determine the state. I believe the current implementation is the best for real world situation. Please let me know if you can come up with something else.
I set polling to false. I have heard that people get banned because of constant polling. I just don't want to take the risk. I have also noticed that the MyQ server is becoming more unstable. Not sure if that's because more people are using the plugin with polling. Therefore, I also disabled polling by default.
from homebridge-liftmaster2.
Thanks. I'm good as is. Works great now on all HomeKit apps I've tried including the iOS 10 home app.
from homebridge-liftmaster2.
Related Issues (20)
- Open never works HOT 2
- Error on startup - not finding credentials? HOT 4
- Unable to install Homebridge-Liftmaster2 HOT 4
- Open works, close causes MyQ to repeatedly beep and wonβt close HOT 1
- Filter out some doors HOT 1
- Simply Can't Install This Plugin Successfully HOT 15
- Suggestion: Lights HOT 1
- Syntax Error 0
- Plugin Crashes HomeBridge Instance HOT 1
- Support for Chamberlain version of MyQ hub HOT 2
- Plugin Crashes HomeBridge Server (FIXED) Look how: HOT 1
- UnhandledPromiseRejectionWarning HOT 5
- Same UUID as another bridged accessory HOT 2
- Device keeps being re-added to configuration HOT 5
- Not able to load the homebrigde liftmaster2 plugin
- Door state not updating correctly. HOT 1
- Copious liftmaster2 errors since 5/25/2019 HOT 11
- Support for Locks that are supported by MyQ HOT 2
- TypeError: Cannot read property 'length' of undefined HOT 18
- 0.5.2 not published to npm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-liftmaster2.