Made the necessary changes (and pull request) to add the update() method to get rid of the errors.
@kylerw The changes have been merged (also added the init closed status mentioned in the request comments). Added note about original code from Misterwil as I didn’t really write any of this except for adding the header lines and putting it up on github for others to find easily. If attribution should be added for others that helped create the original code please let me know as I want to give credit deserved.
Awesome!
Does the self._status='closed'
work ok? I haven’t dug in but I think it may need to be:
self._status = STATE_CLOSED
I definitely had to change mine to:
self._status = STATE_CLOSED
to get the status to show correctly on the dashboard.
My logs are still being quite insistent about this:
homeassistant.helpers.entity: Updating state for cover.garagedooropener_2 took 2.262 seconds. Please report platform to the developers at Platforms that do I/O inside properties · Issue #4210 · home-assistant/core · GitHub
Hmm, I don’t see any more errors after making the updates.
- You grabbed the whole file which includes the update() method at the very bottom, correct?
- You restarted?
- Errors are recent?
Yes to all
Retracted.
I grabbed this guy:
https://raw.githubusercontent.com/arraylabs/myq/master/myq.py
but I’m not seeing an update() in there.
interesting, mine works with
self._status = 'closed'
the very last few lines look like this.
def update(self):
self._status = self.myq.get_status(self.device_id)
Yeah, that’s the one.
The ‘closed’ should not stop anything from working just may not initialize the door as closed but will be updated quite quickly. It’s not 100% necessary but more a ‘nice to have’.
All the changes have been made to the version on github. All working for me.
Just tried to set this up and nothing is showing up in HASS. Moved the myq to the correct path, added the section to configuration.yaml. But nothing shows up, and I dont see myq listed under current entities. Is there soemthing additional I need to be doing that I skipped?
Should show in enties as “cover.name_of_device”. I mention it because I was initially looking for something like “myq.name_of_device”.
I dont have any entities under cover. I must have done something wrong but Im not sure what.
Are there any additional steps you needed to do aside from editing the yaml and adding the myq to the proper location? Perhaps its a permissions issue or something?
And just to make sure Im not doing something dumb…the custom_components folder should be in the same place as configuration.yaml, correct?
I have a Liftmaster 8550W if it makes any difference
Are you running HA in a docker container or normally? Also should be “custom_components/cover/myq.py” just to be sure.
No, normally.
Right, I have it set up like this…tell me if Im correct:
/homeassitant (where configuration.yaml resides)/custom_components/cover/myq.py
The weird thing is, I dont even see anything like an error in the log that shows it tried to fire it.
Also, I dont think this would be the issue…but I just copied everything over (and created folders) via SAMBA
No, should be in the homeassistant folder that also contains the “components” folder. The configuration.yaml is in the “config” folder. On my system (although in docker) the full path is “/usr/src/app/homeassistant/custom_components/cover/myq.py”.
I have my custom_components directory in ~hass/.homeassistant/ (where my configuration.yaml is) and it works fine. This makes it easier for me since I’ll automatically get it from my github config repo if I need to set up a new device for hass to run on.
I installed with the AIO installer, that directory doesnt appear to exist. Any idea where else it would be?
jhn, did you have to do anything different to get it working in that location?
Here is my entire configuration.yaml in case im screwing something obvious up…
homeassistant:
name: Overview
unit_system: imperial
time_zone: America/Denver
customize: !include customize.yaml
frontend:
http:
api_password: !secret http_password
ssl_certificate: !secret ssl_certificate
ssl_key: !secret ssl_key
updater:
discovery:
#conversation:
history:
logbook:
automation: !include automation.yaml
group: !include group.yaml
sensor:
- platform: speedtest
monitored_conditions:
- download
- upload
- platform: yr
cover:
- platform: myq
name: Garage Door
username: [email protected]
password: mypassword
brand: liftmaster
zwave:
usb_path: /dev/ttyACM0
config_path: /srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config
polling_interval: 10000 # Polling speed in miliseconds
ecobee:
api_key: !secret ecobee_key
hold_temp: False