State of the MyQ plugin

User avatar
FlyingDiver
Posts: 7823
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

State of the MyQ plugin

Post by FlyingDiver »

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
User avatar
kw123
Posts: 8685
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: State of the MyQ plugin

Post by kw123 »

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
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: State of the MyQ plugin

Post by neilk »

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.
User avatar
FlyingDiver
Posts: 7823
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: State of the MyQ plugin

Post by FlyingDiver »

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
User avatar
kw123
Posts: 8685
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: State of the MyQ plugin

Post by kw123 »

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
User avatar
FlyingDiver
Posts: 7823
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: State of the MyQ plugin

Post by FlyingDiver »

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
User avatar
kw123
Posts: 8685
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: State of the MyQ plugin

Post by kw123 »

Yes myq


Sent from my iPhone using Tapatalk
User avatar
FlyingDiver
Posts: 7823
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: State of the MyQ plugin

Post by FlyingDiver »

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
Locked

Return to “MyQ”