Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garage Door State Always "Closed" #11

Open
lepolt opened this issue Jan 19, 2016 · 44 comments
Open

Garage Door State Always "Closed" #11

lepolt opened this issue Jan 19, 2016 · 44 comments

Comments

@lepolt
Copy link

lepolt commented Jan 19, 2016

I recently started playing with homebridge, and after successfully configuring things told Siri to open my garage door. She did, but the plugin always thinks that the door is closed (state===2)

@GaryREM
Copy link

GaryREM commented Jan 22, 2016

Interesting that mine always shows the Current Door State as Open on the MyTouchHome display and Siri says garage doors are open. Messages in terminal show doorstate: undefined. I was able to open and close the door. However, did not see state change.

@AppleTechy
Copy link
Collaborator

AppleTechy commented Jan 22, 2016 via email

@JerGitHub
Copy link

Same issue here - always "Open" even when closed. See #9 . The bummer for me is I had everything working before I updated everything. The Elgato Eve app and the Insteon+ app don't do anything to fix it as far as refreshing either. :(

@GaryREM
Copy link

GaryREM commented Jan 22, 2016

Eve makes no difference. Status always shows open. As I mentioned in previous note, the status on the homebridge application in terminal shows doorstate: undefined so it is the plugin with a problem.

@JerGitHub
Copy link

@GaryREM same here.

@AppleTechy
Copy link
Collaborator

AppleTechy commented Jan 22, 2016 via email

@AppleTechy
Copy link
Collaborator

AppleTechy commented Jan 22, 2016 via email

@GaryREM
Copy link

GaryREM commented Jan 22, 2016

HD920EV. It is a myQ device and, of course, the status is correct in the Chamberlain app.

@lepolt
Copy link
Author

lepolt commented Jan 22, 2016

I have a newer model LiftMaster (unsure of model number), but the status is correct in the iOS app.

@JerGitHub
Copy link

Liftmaster MyQ 8360 with the Liftmaster Internet Gateway 828LM

@jkoehl
Copy link

jkoehl commented Jan 22, 2016

Liftmaster 8557 with 828LM and status is not correct either. In the debug output on homebridge the state actually says "undefined".

Looking at the JSON coming back in the MyLIftmaster.com site I see this on the GetALlDevices endpoint. Not sure if this helps...

State: "2"
StateName: "Closed"
Statesince: 1453473562309
ToggleAttributeName: "desireddoorstate"
ToggleAttributeValue: "1"

@JerGitHub
Copy link

Oh and obviously since I have all Liftmaster - I use the Liftmaster iOS app and not the Chamberlain one. Liftmaster iOS app has worked fine from day 1 - no issues with the Liftmaster iOS app as far as status, etc.

@jkoehl
Copy link

jkoehl commented Jan 22, 2016

Yeah me too. The MyLiftMaster site and iOS app all report proper status.

@AppleTechy
Copy link
Collaborator

Ok so clearly the issue isn't with the specific unit... Hmm I have an idea but I won't be able to test my theory unit a little bit later.. I will let you know if it is successful or not

@GaryREM
Copy link

GaryREM commented Jan 23, 2016

The logic in the get function looks incorrect. that.deviceState is only set when there is a single door and no DeviceId is specified. There is no attribute scan if you specify a deviceId. I've got 2 openers.

@AppleTechy
Copy link
Collaborator

AppleTechy commented Jan 23, 2016 via email

@jkoehl
Copy link

jkoehl commented Jan 23, 2016

@GaryREM I noticed the same issue in the logic and just ran it in the debugger. I have specified two accessories in my config.json (each with the device ID for the device). I noticed the logic bypasses all of the state logic if a deviceID is set.

[Edit] Ok now I see what the issue is. The code being pulled down from NPM as 0.1.1 is NOT the latest code in GitHub. I see a commit that has code that would actually fix this issue as the latest commit and I do not have that version and my NPM claims I already have 0.1.1

Maybe the version didn't get bumped for NPM?

@GaryREM
Copy link

GaryREM commented Jan 23, 2016

I thought I was. Modified the plugin to set the door state.

Looking through the code, the latest version was not installed when I did it from npm.

So now I'm getting the 'always closed' issue (was showing 'always open') using Eve.

@jkoehl
Copy link

jkoehl commented Jan 23, 2016

Ok looks like the last fix for the status was fixed AFTER the version bump to 0.1.1.

I think all that needs to be done is the package.json needs updated to 0.1.2 or something.

[Update] I can confirm that with the latest code in this repo both of my doors report proper status so we just need the package.json file version bumped.

@AppleTechy
Copy link
Collaborator

@GaryREM Ok thats good news! Can you query siri asking her if your garage door is open or closed? Then I can determine if you are now facing the problem I think you are.

@AppleTechy
Copy link
Collaborator

@jkoehl I just message @nfarina about getting the package.json version bumped.
***The version number was bumped and now should have the correct version

@AppleTechy
Copy link
Collaborator

@GaryREM Do you have a slack account? Its much easier to go back and forth when debugging stuff on slack. :)

@jkoehl
Copy link

jkoehl commented Jan 23, 2016

I just updated the module using npm and it got the new version. So as far as my setup goes everything is now working!

Thanks @AppleTechy @nfarina

@GaryREM
Copy link

GaryREM commented Jan 23, 2016

Yes, new version is working!

Eve does not appear to update status correctly, but when I asked Siri if garage doors were closed (after closing a door and waiting several minutes for Eve to change status from Open to Closed) Siri said the doors were closed and the Eve display changed to Closed.

@jkoehl
Copy link

jkoehl commented Jan 23, 2016

@GaryREM I found that with the Eve app I had to pull to refresh the status and then it did show the door status as expected. Not sure why it isn't "live" updating but may just be their app.

@tideline3d
Copy link

I was experiencing this problem as well, even after the update.

Turns out that there still seems to be a bug if you don't specify a device ID in config.json. I configured my device, though I only have 1 door, and everything seems to be working.

@JerGitHub
Copy link

Just updated homebridge-liftmaster from 0.1.1 to 0.1.2 and it's working again! woo-hoo! Just opened one of my garage doors with Siri and closed it too. Reporting correctly in Eve and Insteon+ too. Thanks for sticking with this.

@nfarina
Copy link
Owner

nfarina commented Jan 25, 2016

👍

@JerGitHub
Copy link

OK - I might have spoken a little too soon after more testing. So the "Open" and "Closed" status is working however, having more than 1 garage door may be causing issues. If I ask to open any one of the 3 garage doors by saying "Open John's garage door" or "Open Jane's garage door" or "Open Suzie's garage door" - Siri always comes back with this. Any ideas what to check for?
img_4586

@tideline3d
Copy link

@JerGitHub I've found that Siri doesn't like items that aren't in a room. You may try adding them to the 'Garage' room, or even a room for each one. For example, I have a 'Breakfast Area Light' but if I leave it in the default room and say 'Siri, turn on the breakfast area light' she responds 'Sorry, I didn't understand all of that. Would you like me to turn on all the lights?'. I put the 'Breakfast Area Light' in the 'Breakfast Area' room, and now the same phrase works reliably.

@JerGitHub
Copy link

@JW59 - Already have that all setup in Eve/Insteon+. It's in a "Garage" room. I wonder if I need to delete the homebridge .persist folder, reboot, etc. when I upgraded the plugin?

@jkoehl
Copy link

jkoehl commented Jan 25, 2016

One thing I did that helped was change the default "Siri Name" for each
door to be unique. In my case I made it just "left" and "right" and that
seemed to help my setup. So if I say "open the left garage door" it seems
to work now.

The default was both doors seemed to show the same "Garage Door Opener"
name for each door before I did that in the Eve app.

On Mon, Jan 25, 2016 at 3:44 PM, JerGitHub notifications@github.com wrote:

@JW59 https://github.com/jw59 - Already have that all setup in
Eve/Insteon+. It's in a "Garage" room. I wonder if I need to delete the
homebridge .persist folder, reboot, etc. when I upgraded the plugin?


Reply to this email directly or view it on GitHub
#11 (comment)
.

@JerGitHub
Copy link

OK - I figured it out. It's the same naming issue that I am having with my Nests. It's not so intuitive how HomeKit handles all of its naming - definitely not an Apple-like easy-to-use experience yet.

I have Garage set as a Room and John's Garage Door is set from the liftmaster-plugin since I named it that in the Liftmaster App. But when you go into Eve/Insteon+ it shows the Room as Garage and the Siri Name/Siri Control as Garage Door for all three of my garage doors and the Accessory Name as each one of the 3 names it gathers when loading the plugin from the Liftmaster site.

So what I had to do was go in and rename all of the Siri Name/Siri Control's to a different name to take out the word "garage" in it. So for each one of my 3 garage doors, it is now and seems to work:
Room = Garage
Siri Name/Control = John Door
Accessory Name = John Garage Door

Room = Garage
Siri Name/Control = Jane Door
Accessory Name = Jane Garage Door

Room = Garage
Siri Name/Control = Suzie Door
Accessory Name = Suzie Garage Door

@JerGitHub
Copy link

@jkoehl looks like we wrote at the same time! Not a fan of how Apple is handling the naming in HomeKit. It's definitely confusing. Not sure why the Accessory Name can't be the Siri/Control name? Same thing happened with the new homebridge-nest plugin that pulls all of my Nest names as the Accessory Name and doesn't allow me to query correctly with Siri/HomeKit until I change all the Siri/Control Names.

@u2jrmw
Copy link
Contributor

u2jrmw commented Jan 30, 2016

I have the older MyQ which is built in to the opener and has a hub. It does not appear to even offer a door status...

I spat out all the device.Attributes display names and this is my list:

[Garage Door] online
[Garage Door] gatewayID
[Garage Door] desc

This might explain why my door never reports the right status (it always reports closed which is the default setting in the code)

Of course the MyQ app works just fine to show the open/closed status. and Homebridge works to open and close the door, no matter the status. Just a shame I can't get an accurate read via Homekit.

@u2jrmw
Copy link
Contributor

u2jrmw commented Jan 30, 2016

OK, I think I fixed it, but its 2 am so I'm trying to limit the testing of opening and closing the garage door...

The culprit for my setup is in this code:

            if (thisAttributeSet.AttributeDisplayName == "desc") {
              thisDoorName = thisAttributeSet.Value;

              break;
            }

That break is killing the loop before it gets to the door status. Maybe on other configurations door status always comes before desc, but not for me. Once I comment out that break, my status starts working!

I assume the break was added to minimize the number of elements the loop went through (my json has 9 attributes on the opener), but it broke too early for me.

I'm pretty pleased with myself right now. Hopefully the author can make that change in the production code.

@BrianNewell
Copy link

FYI... I also had this issue until I added the "deviceID" to config.json.
[using "homebridge-liftmaster@0.1.2", single opener/door]

@dipesh9414
Copy link

I am new to Homebridge and have recently added this plugin and works great but I do have a question. I am using Home app for triggers and they work when the garage door is opened or closed with the Home app but triggers are not working when the door is opened using the remote opener or the keypad. Is that the limitation on how this works? What I am trying to do is turn on my kitchen and bedroom lamp when the garage door is open and shut off the lights when the door is closed. Again it works just fine when i give instructions to open or close with Siri but not when it is manually closed through the traditional remotes.

@nfarina
Copy link
Owner

nfarina commented May 9, 2016

@dipesh9414 Yes this is expected - Homebridge doesn't "know" that your door has changed until it gets around to querying the web API to see what's new, so it's not really useful for triggers in this case.

@dipesh9414
Copy link

thanks for the quick reply. quick check whether it is worth trying out the MyQ plugin as I have the MyQ bridge also. will that work with what i am trying to do?

@AppleTechy
Copy link
Collaborator

The MYQ plugin is the exact same just a less developed version. If you join
the LiftMaster Slack channel we have been working on a newer more accurate
plugin. Though it is still in development as we are trying to get more
users to verify success using it.

On Monday, May 9, 2016, dipesh9414 notifications@github.com wrote:

thanks for the quick reply. quick check whether it is worth trying out the
MyQ plugin as I have the MyQ bridge also. will that work with what i am
trying to do?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#11 (comment)

@kcharwood
Copy link

I just got Homebridge setup with my MyQ device. Joined the slack channel as well. I'm seeing the state stuck in Close.

Happy to help a test a new version if one is available.

@u2jrmw
Copy link
Contributor

u2jrmw commented May 30, 2016

You could try my fix a few comments up. Worked great for me. I submitted it for inclusion in the product but haven't seen that happen yet.

@brianwarehime
Copy link

Has anyone else tried @u2jrmw's fix? My status is stuck in "Open" and it's rather annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests