Myq componenet issues

Any idea if we need to replace instances of garage_door in the myq.py file as well as the configuration.yaml?

Now that we’ve been able to get myq working under garage door, what do we need to do to convert it to the cover component?

Here’s my current updated script to work with the new Cover component: http://pastebin.com/02u8jR2U

I went ahead and refactored it a bit to be a little friendlier to use overall. This means that you need to modify your yaml as well to include a new “brand” configuration option, which can accept ‘chamberlain’, ‘liftmaster’, or ‘craftmaster’.

The only thing I haven’t figured out yet is if I like the new UP, STOP, DOWN buttons and how to show the current state. It updates the state, it just appears that there isn’t actually a place this is shown on the UI.

2 Likes

Thank you very much for the updated script. Nice work!
But… I seem to be a little lost on the configuration for cover. Can you show me what you have set up for cover, please?

I placed the above py file in: /home/hass/.homeassistant/custom_components/cover/myq.py

My configuration.yaml:

cover:
  - platform: myq
    name: Garage Door
    username: !env_var MYQ_USERNAME
    password: !env_var MYQ_PASSWORD
    brand: chamberlain
1 Like

Playing around with it a bit more, I implemented the current_cover_position property which allows the OPEN and CLOSE buttons to enable and disable based upon it being closed (0) and open (100). This at least shows the current state of the garage door in some way, but it has the side effect of enabling the position slider in the popup status dialog.

This entire cover refactoring feels like it needs a lot more work to be fully realized. Even just allowing some configuration properties like can_stop, can_tilt, can_position, and then allowing for statuses like STATE_OPENING, STATE_CLOSING, or STATE_TRANSITIONING would be a massive improvement.

Anyways, this is the latest myq.py file: http://pastebin.com/qVszax1t

1 Like

I have a question, does anyone know if there’s a way we can use the MyQ names for these nodes? I have two garage door openers and it just names them for me and I’d prefer to at least assign the friendly name from MyQ instead of them both being the same.

Thank you, the problem turned out to be that I had forgotten to rename the directory from garage_door to cover.
Thank you again.

@MisterWil thank you very much for updating the myq.py! I will say that for whatever reason, I still need to use “VGDO” as my MyQDeviceName, but other than that, it worked like a charm!

Does anyone know how to change the images on this component? I would like to use one image at a time dependent on the state. An image of a closed garage door for when it’s closed, and as crazy as it sounds, an open garage door for when it’s open. Pardon my sarcasm here, but this was so much better before the change to cover.

Thanks for the updated script, @MisterWil! Took a bit of time, but I finally got things working.

I had to change MyQDeviceTypeName to “Garage Door Opener WGDO” in order to get things working. I have a newer Chamberlain garage door opener with WiFi built in.

Hope this helps anyone else that has issues with trying to get the node/component to show up in HA.

for device in devices: if device['MyQDeviceTypeName'] == 'Garage Door Opener WGDO': garage_doors.append(device['DeviceId'])

1 Like

I am messing around with this today to see if I can get the Garage door names to be used insead of a genereic myQ friendly name.

Thanks all for your work on this one - was just able to finally get my myQ Liftmaster up and running thanks to this.

Did you ever figure out how to add friendly names? I’ve not had a chance to sit down and mess with it yet.

Under your Homeassistant: section in your configuration.yaml, add Customize:, and under that you would have something like this.

cover.garage_doors:
  friendly_name: Main Garage Door
cover.garage_doors_2:
  friendly_name: Second Garage Door

We are not just after the friendly name, but the entity name derived from the name in MyQ. It’s not intuitive to have references to cover.garage_door_2 throughout the automation, script, etc. areas of the config but instead have the name we configured, like cover.double_garage, cover.single_garage, cover.gate, etc.

I have not yet. I did do some dirty coding to replace the name with the device ID and then it changes the device ID to a hard coded name. Super dirty but it works for now.

    @property
def name(self):
    """Return the name of the garage door if any."""
    if self.device_id == "1700742700":
     return "myq_Third Bay" 
    elif self.device_id == "1700744000":
     return "myq_First Bay"
    elif self.device_id == "1700744000":
     return "myq_Second Bay"
    else:
     return self.device_id

Here is my attempt at getting the garage door names from the api.

I testing it with Chamberlain garage doors only.

http://pastebin.com/BTs1snt2

I gave this a shot at home yesterday but was unable to get my garage door to show up.

I think it may have to do with setting the correct info in the config file.

I followed what MisterWil mentioned in placing the myq.py file in this location

/home/hass/.homeassistant/custom_components/cover/myq.py

and for the configuration.yaml file adding my username/email address and password but could not get it work.

Also, it seemed Hass would also not start with the beginning !env_var in the username and password field?

I think I got this working by having to change back to VGDO. And I see the Garage door now in my UI, but it seems to show 2 devices? I can control the door up and down from the top 1 shown. But do not know what the bottom one may be trying to do?