core: myQ: Unexpected error fetching myq devices data: Expecting ',' delimiter: line 4 column 66 (char 115)
The problem
MyQ is unresponsive within HA but the MyQ app is working, so I know that the service is up.
Environment
Home Assistant on Docker; Ubuntu 18.04; using HA version .111.4
- Home Assistant Core release with the issue:
- Last working Home Assistant Core release (if known):
- Operating environment (OS/Container/Supervised/Core):
- Integration causing this issue:
- Link to integration documentation on our website:
Problem-relevant configuration.yaml
None. Using integrations page to connect.
Traceback/Error logs
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 136, in async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 124, in _async_update_data
return await self.update_method()
File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 149, in update_device_info
"get", "Accounts/{0}/Devices".format(self.account_id), api_version=DEVICES_API_VERSION
File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 92, in request
data = await resp.json(content_type=None)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 1040, in json
return loads(stripped.decode(encoding))
File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.7/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 4 column 66 (char 115)
Additional information
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 27
- Comments: 32 (9 by maintainers)
yep, that’s what I did too. a little different technique with a standard Home Assistant install - but easily doable.
docker exec -t -i homeassistant /bin/bash vi /usr/local/lib/python3.7/site-packages/pymyq/api.py
then change: DEFAULT_USER_AGENT = “myQ/14041 CFNetwork/1107.1 Darwin/19.0.0” to: DEFAULT_USER_AGENT = “myQ/19569 CFNetwork/1107.1 Darwin/19.0.0”
save, and restart HA
Wonder about trying to have the user agent as config option so one could work around this locally until an update to the pymq and ha core are released.
If you have the myq 819LMB controller with homekit support, you can use homekit_controller instead https://www.home-assistant.io/integrations/homekit_controller/
No more cloud or api access needed
seems to me that Chamberlain is using this as a method to dissuade use of their API without a subscription. I am very close to replacing it a DIY solution that I know does not change 😦 But hats off to the developers keeping this going! here and in pymyq!
I got the same error, so I started just trying to access the MyQ api with
curl
. The problem is the User-Agent again. Just used thecurl/7.68.0
User-Agent and all was well.@broyuken Don’t give MyQ any more money with the “Homekit” bridge, it’s a terrible piece of hardware. They had sent it to me for free since I had bought the MyQ bridge within a month or so of it coming out but it’s complete garbage. It’s a nightmare to pair and the support is terrible. In the end, I couldn’t get it re-paired after something failed, spent hours on the phone with support, they had to escalate the issue to 2nd and 3rd level support but to no avail. They blamed it on the fact I was using an iPhone to pair. Umm…how can a HomeKit device not work with an iPhone??? Now I’m just relying on the home assistant integration. Once this is gone, I’m done with Chamberlain for good!
For $70 I’ll just buy a local Z-wave opener, I’m done with MyQ.
On Fri, Jun 26, 2020, 13:42 David Radcliffe notifications@github.com wrote:
If you want to play with authenticating on myQ, here’s the curl command that will grab you an access token and the very command pymyq is failing with its current User-Agent. This command sends an empty User-Agent header and still works.
Here’s the broken call pymyq is doing for reference:
You get the exact same error. If you want to see the malformed json response itself just drop the
| python -m json.tool
at the end of the command.Do you need a HomeKit hub like an Apple TV or an iPad or does it connect directly to HA?
so is this pretty much going to go on like this, or will they slow down…I guess my issue with it is that there should be an option to allow the local control. I would gladly give up MyQ for local integration into HA. I just don’t want to add yet another hub. I am limiting myself to zigbee (thanks IKEA) and wifi. Not knowing how they are killing it, is this sustainable?