brbeaird / SmartThings_MyQ

Integrate SmartThings with MyQ (Obsolete)
https://github.com/brbeaird/SmartThings-MyQ-Edge
Apache License 2.0
411 stars 898 forks source link

Receiving warnings on Smarthings app on device #115

Closed ericadamkatz1 closed 3 years ago

ericadamkatz1 commented 3 years ago

Within the last 2 days, I have started getting a new warning notification on my device:

Warning: MyQ command failed for Garage Door Opener(close) - groovy.net.http.HttpResponseException: InternalServerError

I updated the SmartApp to 3.1.5 last night, but got this error again today.

Thanks much.

brbeaird commented 3 years ago

I also noticed getting that error once last night after the update, but when I have tried testing this morning, everything works fine. Not quite sure what the deal is.

ericadamkatz1 commented 3 years ago

Thanks for getting back to me, I'll continue to watch it, I think it is happening when trying to run the automation rules.

ericadamkatz1 commented 3 years ago

Still happening, failed when the open garage rule fired when my wife came home, same error, except event in parenthesis is "open".

brbeaird commented 3 years ago

Can you reproduce it if you try to manually open or close it? I'd like to confirm the exact URL's yours is trying to hit. The "activity" and "device" pieces should be all lower case. I have not seen any errors from mine yet today.

ericadamkatz1 commented 3 years ago

It's seems really intermittent. Yesterday when coming home, which I have a rule for to open the garage, it worked ok, no errors. And I was able to manually control it through the ST app. Today, I'm getting the error on my phone again, and and am unable to control it manually.

QWin15 commented 3 years ago

I'm getting the error regularly, however, the command actually is succeeding so I'm curious if the success callback is failing for some reason

brbeaird commented 3 years ago

It's still happening to me occasionally, too. When the error happens for me, the command really does fail. But if I immediately retry the command manually, it works. So far have not been able to reliably reproduce. I thought maybe it could be the SmartApp trying to use an expired token, but I have it set to expire after 5 minutes, and this normally happens hours after the last API interaction. Plus, I'm pretty sure we'd get a 401 status if that was the case. I have not seen this reported in any of the other repositories on git that do similar MyQ integrations, so I'm not sure if it's something specific to my code here.

I may add a bit more logging to test if I can come up with some more theories.

ericadamkatz1 commented 3 years ago

Thanks for investigating Brian, I'm a software engineer too, I completely understand how frustrating intermittent problems can be to debug.

QWin15 commented 3 years ago

Another tidbit, I was on older versions of this app and device handler and the error notification was happening to me. I updated this morning to see if that would fix it. So presumably this isn't something you recently introduced, but likely a change on Chamberlains side?

brbeaird commented 3 years ago

So presumably this isn't something you recently introduced

Correct. I made the recent update because I had already started seeing this and thought it might help. But in fact, I don't think it made much difference either way. I am guessing it's something on the MyQ side, but I'm still not exactly sure.

mjn3000git commented 3 years ago

Hi Brian,

I install the update for the MyQ system yesterday and now it’s not working. I had no issues prior Any idea how to revert back to the previous version?

Thanks On Fri, Jan 8, 2021 at 10:50 AM Brian Beaird notifications@github.com wrote:

So presumably this isn't something you recently introduced

Correct. I made the recent update because I had already started seeing this and thought it might help. But in fact, I don't think it made much difference either way. I am guessing it's something on the MyQ side, but I'm still not exactly sure.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brbeaird/SmartThings_MyQ/issues/115#issuecomment-756828730, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF6VUU7FRYHPKZRKKERUNHDSY4SVPANCNFSM4VXUUX7A .

brbeaird commented 3 years ago

I have confirmation from the pymyq repo that they are also seeing these intermittent errors. Apparently the MyQ API is going through an upgrade from v5 to v6. Work has begun on figuring out the details on that.

Hi Brian, I install the update for the MyQ system yesterday and now it’s not working. I had no issues prior Any idea how to revert back to the previous version? Thanks

Hey @mjn3000git - you can always go to the Commits link in github and view the code from an earlier commit. However, I do not believe an older version will make much difference. We know at least some errors are happening due to MyQ changes, although for most of us, things are generally still working. Are you seeing any error messages in the app or live logging in the IDE?

SpazShark commented 3 years ago

Hi Brian,

I updated to the 3.1.5 app last night and sorry to say that I'm getting the same error:

Warning: MyQ command failed for Garage Door Opener(close) - groovy.net.http.HttpResponseException: InternalServerError

The actions still appear to be working, but I'm intermittently getting the error code. I'll try to catch the logs in the IDE app.

Thanks again for all your hard work on this!

EDIT: I was able to catch the problem in the logs:

WORKING 9:40:47 AM: debug Garage door close command called. 9:40:48 AM: debug Got response: STATUS: 204

NOT WORKING 9:38:23 AM: debug Garage door close command called. 9:38:24 AM: error API PUT Error: groovyx.net.http.HttpResponseException: Internal Server Error

In this case the garage door failed to close entirely.

brbeaird commented 3 years ago

Yes - the intermittent error is happening for everyone right now, including other MyQ project integrations. Not much we can do until we get the reverse-engineered details of the new API version.

SpazShark commented 3 years ago

Ok - thanks for the response Brian. Happy to do any testing once more information is known.

mixpix commented 3 years ago

I'm seeing this same error as well. Definitely intermittent.

I opened and closed the garage twice this morning. The first time the error appeared the first time I tried to close it. The second time it was when I tried to open it the second time around.

Is it possible that there is a slow server connection somewhere and the script just errors due to a slow response?

I opened and closed the door the first time directly with the SmartThings app and the second time I did it with Google Assistant on my phone.

If you need specific testing done in the future let me know.

brbeaird commented 3 years ago

It seems MyQ made some changes on their end a couple days ago that has resolved these errors. I will keep watching for details on the V6 API upgrade, but for now, I think we are good.

SpazShark commented 3 years ago

Thanks Brian - I'll keep using and let you know if I see the error again. Unfortunately with the pandemic I find I'm using the cars and garage door a lot less!

ericadamkatz1 commented 3 years ago

Thanks for all your help Brian. It does seem to working reliably again, haven't gotten the error in a few days. Hopefully they have their codebase stabilized again.