State of the MyQ plugin

Posted on
Fri Feb 05, 2021 4:42 pm
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

State of the MyQ plugin

As I'm sure all the MyQ plugin users know, the plugin has a tendency to stop working when the MyQ cloud servers are updated. This isn't really surprising, considering it's a reverse-engineered API with no official support or blessing from the MyQ system.

MyQ is in the process of rolling out their V6 API. When they shut off the V5 API, the plugin will stop working. No one in the HA community knows when that will be.

The plugin is based on an old version (1.2.1) of the pymyq library (https://github.com/arraylabs/pymyq). The library has now been updated (3.0.0) to work with the V6 API. Which is good for all the projects that use it directly, like home-assistant and homebridge (I think). But the Indigo plugin can't, since it's a Python3 only library. :(

I've been looking at the changes and it's going to be very. very difficult (if it's possible at all) to back-port the new authentication system to Python2. It's so heavily dependent on asyncio that I would have to start from scratch. And I don't think I'm interested in doing that.

If we're lucky, MyQ will continue to support V5 for a long time to come. Somehow, I doubt that will happen.

A better alternative would be to figure out how to use the Python3 library. Because if I can do that for this plugin, I can do it for other APIs that are also only supporting Python3. Anyone have an brilliant ideas on that?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Feb 05, 2021 11:44 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: State of the MyQ plugin

I would split it into 2 parts
1. Py2 the plugin
2. Py3 the mqtt part

1 and 2 communicate through io channels
Sending and listening

That should work but it is not trivial to make it work flawlessly

Karl


Sent from my iPhone using Tapatalk

Posted on
Sat Feb 06, 2021 2:19 am
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: State of the MyQ plugin

It is definitely becoming a bigger issue, and potentially a ton of work for little reward given the move to Python 3 which I am sure will be fun, I looked at a number of things that would be useful but not viable for my skill level to manage the conversion, and others when it was pretty trivial (the libraries for my Jaguar / Land Rover plugin largely just worked). A number of others including more modern Samsung TV support I ended up just scripting basic functionality.

Posted on
Sat Feb 06, 2021 6:28 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: State of the MyQ plugin

kw123 wrote:
I would split it into 2 parts
1. Py2 the plugin
2. Py3 the mqtt part

1 and 2 communicate through io channels
Sending and listening


Yeah, there would need to be two parts, but I'm not sure that requiring an MQTT broker in the middle gains anything. The two processes could just use a socket or pipe to communicate. Or was that a typo and you meant MyQ not MQTT?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Feb 06, 2021 8:13 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: State of the MyQ plugin

Yes move your mqtt facing part of the plugin to an external py3. And add a thin layer new plugin in py2


Sent from my iPhone using Tapatalk

Posted on
Sat Feb 06, 2021 8:17 am
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: State of the MyQ plugin

kw123 wrote:
Yes move your mqtt facing part of the plugin to an external py3. And add a thin layer new plugin in py2


Is that auto-correct that keeps changing that on you? We're talking MyQ here, not MQTT. ;)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Feb 06, 2021 8:18 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: State of the MyQ plugin

Yes myq


Sent from my iPhone using Tapatalk

Posted on
Sun Feb 07, 2021 4:28 pm
FlyingDiver offline
User avatar
Posts: 7217
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: State of the MyQ plugin

Well, I bit the bullet and did some major changes to the MyQ plugin to allow use of the new Python3 based V6 API library. This new version has a separate wrapper script that uses the V6 API. The plugin spawns the wrapper as a separate process and communicates with it by sending JSON strings back and forth. Somewhat minimal testing at this point, but I'd like some outside testing.

Bonus - if you have MyQ controlled lights, this version of the API supports them. I haven't added that to the plugin yet, but I will shortly.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest