Does everything work in the mobile app? I can’t replicate that error in postman no matter how badly i muck up the method, id, username or password. Can you ping myqexternal.myqdevice.com from the HA system?
Yes everything works in the mobile app. I can ping myqexternal.myqdevice.com from the HA system. I’ve tried resetting my password and saying forgot password and having chamberlain do it for me. Still no luck.
Try adding a “cover” folder in “custom_components” and create a myq.py file with the contents from the gist below:
EDIT: File removed as it has known problems
then restart HA.
This has a few updates that I haven’t committed to HA yet, mostly an update interval so the endpoints aren’t getting hit as often, interval defaults to 120 seconds but can be changed in the config by adding a “scan_interval: 300” in the myq config.
Ok, give me a few, I’m updating all my appdaemon apps to account for Not having the zwave node_id after them and printing a new knob for my 3d printer. So I don’t want to restart HA at the moment, but I’ll get to it shortly.
Ok, here is what I get using the myq.py in custom_components/cover. At least this is a Python error and not some strange random error being thrown by chamberlain.
2017-06-24 16:08:45 ERROR (MainThread) [homeassistant.helpers.entity] Update for cover.two_car fails
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 224, in async_update_ha_state
yield from self.hass.async_add_job(self.update)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 302, in wrapper
if force or utcnow() - throttle[1] > self.min_time:
TypeError: unorderable types: datetime.timedelta() > NoneType()
2017-06-24 16:08:45 ERROR (MainThread) [homeassistant.helpers.entity] Update for cover.single_car fails
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 224, in async_update_ha_state
yield from self.hass.async_add_job(self.update)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 302, in wrapper
if force or utcnow() - throttle[1] > self.min_time:
TypeError: unorderable types: datetime.timedelta() > NoneType()
Oh and I’m happy to help debug this anyway you need.
Interesting, wonder if some of those functions are new to Python 3.5 or 3.6. I’m on 3.6 in the docker image. I’m obviously not a Python expert but will see if I can setup a 3.4 install of HA and check out those errors.
Not sure I have any answers for you. Tried the official component on python 3.4.x and 3.5.x and it starts up and controls the door without issue. The custom component (from the gist) does not work in 3.4.x as I get the same errors as you. Probably not going to worry about it as its not published yet and seems HA is pushing for getting on 3.6 soon anyway.
You should probably remove the custom version.
I will put some more thought into your -3333 error with the official component. If you could try hitting the endpoints manually with postman or something similar that may be helpful. Also did you try the username and password directly in config without using !secret? I at a loss for the moment otherwise. Will keep an eye on the forums for others possibly having similar issues.
It was not working prior to 3.6. It wasn’t working after 3.6 either, till I removed the custom component we were playing with. Now it’s working fine on the standard component. If you want me to help out testing the custom component though, I’m happy to help.
Hmmm. It appears that my MqQ has gone wonky, too. When I see the entity in the UI, there are no longer any controls to open or close it. The cover entity is created, but if I manually call cover.open_cover, the service fails. No errors in home-assistant.log related to MyQ or “cover”.
Thanks. That did the trick! Strange. I can understand the cache causing an issue with display – it’s weird that it also caused an issue calling the service manually. Clearing the cache and calling the same exact service call worked fine.
I went ahead and tried the custom component you posted and I’m getting the same python bugs reported by turboc here (Myq failing post 0.47 upgrade - #16 by turboc) which is basically a python typeerror. I’m on Python 3.4.2.
2017-07-29 21:34:54 ERROR (MainThread) [homeassistant.helpers.entity] Update for cover.garage_door_opener fails
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py”, line 225, in async_update_ha_state
yield from self.hass.async_add_job(self.update)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/init.py”, line 302, in wrapper
if force or utcnow() - throttle[1] > self.min_time:
TypeError: unorderable types: datetime.timedelta() > NoneType()
However, despite the errors, I am able to open and close the cover by calling the service through the UI (only open is available since HA thinks its perma closed) or manually. The UI fails to update though. Since I mainly use it for Alexa, I’ll live with this.
The custom component had some issues, especially if not on Python 3.6. It shouldn’t be used and I will go ahead and break the link. Use the standard component and try clearing your cache in the browser.
@alandtse I’ve previously looked into this issue on python 3.4, 3.5 and 3.6 and have been unable to replicate the issue using the standard component in 0.49.1.
The only real change to the standard component recently was adding persistent notifications (notifications that show in the HA gui when something with component config is wrong or it failed to start completely) but no changes in the communications to the myq cloud.
The “Key Error” message in the traceback is basically a result of login not working or a security token not being returned from the myq cloud. I think turboc might have seen the actual return from myq stating the login was invalid. If I intentionally set an incorrect username or password in my config file I get the persistent notification telling me it is wrong, that it needs to be fixed and to restart HA after fixing.
I can manually cause the “-3333” error that turboc mentioned if I send a get device request with an invalid security token.
In other words it’s definitely something related to login, maybe something specific to your username or password.
Try using quotes around the username and password or without quotes if you already have them.
Ok, did an update to 50.1 and moved back to the original component and it’s working again. I’ve made no changes to the configuration file so no idea what could have caused it.