spenwall / myq-alexa

A simple alexa skill to open and close myq enabled garage door
25 stars 14 forks source link

Door is undefined #4

Closed Jeff-Rand closed 3 years ago

Jeff-Rand commented 3 years ago

I followed all of the directions but when I tried anything, Alexa would say "door is undefined".

I found that line 28 of index.js had this: return result.devices[1].serial_number;

I only have one garage door opener, so I changed the line to this: return result.devices[0].serial_number;

Everything then works as expected. I would suggest a change that would loop through each of the devices and return the serial number of the first garage door opener it finds.

jincollingo commented 3 years ago

Thanks Spencer for publishing the code and thanks to Jeff-Rand for finding the 1 character that kept this from working for me. Finally got my garage door working with Alexa again. This code does result in a conflict on the close utterance but that doesn't seem to interfere with my ability to have Alexa close the door.

Jeff-Rand commented 3 years ago

The skill stopped working again a few days ago, saying "door is undefined", but this time the lambda function was saying "Host Unreachable". After examining the code, I noticed that it relies on a "myq-api" code that was not included in this skill. I found that Spencer forked a myq-api from https://github.com/thomasmunduchira/myq-api. The original was updated to version 2.0.3 at around the same time this skilled stopped working. So, I changed line 15 of the package.json from this: "myq-api": "^2.0.2" to this: "myq-api": "^2.0.3"

After doing this the skill is once again working. I hope this helps anyone using this skill.

jincollingo commented 3 years ago

Thanks again Jeff! Minor code change fixed it for me. I don't have your troubleshooting skills so it's appreciated that you update this thread.

Jerry

Jeff-Rand commented 3 years ago

You are welcome. Thanks for the feedback. I'm glad this is helping others with the same issues. I wish Chamberlain would just write an official Alexa skill, but I guess that is too much to ask.

spenwall commented 3 years ago

Thanks for catching this. I have added the updated package

josequirozramos commented 2 years ago

I wonder if the myQ api changed recently. "The door is undefined" is back

jincollingo commented 2 years ago

There has been work by another GitHib member to interface Alexa to the MyQ garage door opener that has instructions for the modern UI on the Amazon Developer Console. After getting the "Door is Undefined" error every few months I decided to give the other solution a try. The link is here --> https://github.com/rjcohn/alexa-pymyq
If posting this link violates any rules please accept my apologies and remove,

Thanks, Jerry