Closed skug67 closed 4 years ago
I've been running the new MyQ for several days and haven't seen this. Are you seeing it consistently?
I do get it consistently. I've even tried directly running the sample script (for get all devices) from https://github.com/arraylabs/pymyq as a check (within the virtualenv where homeassistant is running) and that throws the same errors as well.....
Thanks for the info, @skug67. Let's do some debugging.
Open up a terminal and do the following:
$ curl -X "POST" "https://api.myqdevice.com/api/v5/Login" \
-H 'Content-Type: application/json' \
-H 'User-Agent: Chamberlain/10482 CFNetwork/978.0.7 Darwin/18.6.0' \
-H 'MyQApplicationId: JVM/G9Nwih5BwKgNCjLxiFUQxQijAebyyg8QUHr7JOrP+tuPb8iHfRHKwTmDzHOu' \
-d $'{
"username": "<YOUR USERNAME/EMAIL>",
"password": "<YOUR PASSWORD>"
}'
This should return a JSON response with a security token. Don't post that token here – rather, copy it into another cURL request:
$ curl "https://api.myqdevice.com/api/v5/My?expand=account" \
-H 'Content-Type: application/json' \
-H 'User-Agent: Chamberlain/10482 CFNetwork/978.0.7 Darwin/18.6.0' \
-H 'MyQApplicationId: JVM/G9Nwih5BwKgNCjLxiFUQxQijAebyyg8QUHr7JOrP+tuPb8iHfRHKwTmDzHOu' \
-H 'SecurityToken: <YOUR SECURITY TOKEN>'
This should return a JSON response with your account info. Find your account ID (Account -> Id
) and use that (along with the security token) in one final cURL request:
$ curl "https://api.myqdevice.com/api/v5/Accounts/<YOUR ACCOUNT ID>" \
-H 'Content-Type: application/json' \
-H 'User-Agent: Chamberlain/10482 CFNetwork/978.0.7 Darwin/18.6.0' \
-H 'MyQApplicationId: JVM/G9Nwih5BwKgNCjLxiFUQxQijAebyyg8QUHr7JOrP+tuPb8iHfRHKwTmDzHOu' \
-H 'SecurityToken: <YOUR SECURITY TOKEN>' \
Do any of these requests return something other than JSON (which is what your error seems to indicate)?
OK. So this is really weird. When I run that on the machine that's got homeassistant on it (which is at a remote location and I'm accessing via ssh over a VPN) I get the following:
On the other hand, if I run it from a server at home it works just fine....
Fascinating. 😆 The only times I've seen that type of message is when an ad blocker/parental control thing/etc. blocks a request; any chance your HASS machine has something like that running?
It sits behind a netgear orbi router. I've disabled parental controls, but I also seem to be unable to reach its web interface so I think there's something screwy going on there. I'll assume for now that's what's driving the wacky behavior.
Thanks for the guidance.
Same problems are recurring. And I'm now getting the same error message from my local machine which I know is not behind any kind of urlblocker/parental control device (connected directly to the FIOS ONT w/o even a Verizon router).
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
HomeAssistant 0.100.3 running in virtualenv/python3.7/debian
Following error when trying to contact myq: