MyQ - Change User-Agent to pymyq

In case anyone else, besides myself, that didn’t understand what those of us with HassOS on an RPi4 needed to do to change User-Agent to pymyq here is what I found thanks to the question being asked here.

  1. Go to Supervisor and then select SSH & Web Terminal (make sure it the correct one). If it is not installed yet go to the Addon Store in Supervisor then look for it under Home Assistant Community Add-ons.
  2. Turn off Protection mode in SSH & Web Terminal. If it was already running with protection mode on then restart. Otherwise click Start.
  3. Click on Open Web UI
  4. Copy the following command then paste it into the Web UI for SSH & Web Terminal then hit Enter
docker exec -it homeassistant sed -i 's/okhttp\/3.10.0/pymyq/g' /usr/local/lib/python3.8/site-packages/pymyq/api.py

The command is from https://github.com/arraylabs/pymyq/pull/54#issuecomment-748236539

  1. Exit the SSH session then click on Stop within the SSH & Web Terminal page then turn protection mode back on.
  2. Go to Configuration > Server Controls > Server management > click on restart
  3. Test your MyQ in HA or go to Integrations > MyQ > click on device(s) > Verify MyQ Gateway shows connected
5 Likes

HA ver 2020.12.2 fixed the problem so my post is no longer relevant to the issue if you have that version or newer. A newer intermittent connect problem started last night ( see MYQ not working again) and still hasn’t been resolved as far as I know.