Universal Controls Option

Posted on
Sat Dec 10, 2016 4:52 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Universal Controls Option

Hey,

a while ago i floated the idea of a universal control option that'd select the relevant command based on the activity (in much the same way as the harmony remotes/app works). I'm curious as to if you think that'll be something implemented in the short, medium or never term.. i don't wanna go to the effort of creating action groups and scripts for each individual command that i want only to find out you're already working on an internal way of doing it. :)

(viewtopic.php?f=212&t=16166&start=150#p124067)

Computer says no.

Posted on
Sat Dec 10, 2016 4:57 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Universal Controls Option

I'll have to look at that again. I'm assuming you mean the same way the volume controls work now?

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

Posted on
Sat Dec 10, 2016 5:05 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Universal Controls Option

Yeah, so essentially a way of mapping different device commands to one control page button and would envolk the right command for the current activity. EG Pressing a NAV UP button on a control page would look to see if i'm currently using the Watch TV activity or Play Xbox then send the relevant command for that device.

Computer says no.

Posted on
Sat Dec 10, 2016 5:50 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Universal Controls Option

I took a look (again) at the config data I get back from the hub, and I have a glimmer of an idea of how to do this. I'm not going to create all the command groups and commands in advance, and then try to map them to devices at run time. That would be a maintenance nightmare. So I need to see if I can create it all on the fly when you attempt to assign an action to a control page button (or whatever). The tricky part is going to be run-time validation for cases where a certain mapping was valid when you created the control page, but no longer is.

If I can do it at all, it'll be within a few weeks. End of them month, anyway.

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

Posted on
Sun Dec 11, 2016 7:29 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Universal Controls Option

Well, this seems to work for me. It needs a lot of testing.

https://github.com/FlyingDiver/Indigo-H ... .1.0-beta1

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

Posted on
Mon Dec 12, 2016 2:04 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Universal Controls Option

Very cool, i'll try it out this evening! Thanks!

Computer says no.

Posted on
Sat Dec 17, 2016 4:16 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Universal Controls Option

Sorry i wasn't able to test sooner, got roped into doing overtime at work!

This is looking awesome. I've had a bit of a play this evening and it looks good. Couple of minor things i may need to make scripts for like the difference between Xbox buttons and PS buttons.. but in general it seems to be doing what i want!

One minor issue is though that if a particular device doesn't support an intended action i get an error like this:

Code: Select all
   Action Group                    zz harmony 668
   Harmony Hub Error               Error in plugin execution ExecuteAction:

Traceback (most recent call last):
  File "plugin.py", line 269, in sendCurrentActivityCommand
TypeError: coercing to Unicode: need string or buffer, NoneType found

Computer says no.

Posted on
Sat Dec 17, 2016 4:28 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Universal Controls Option

Yeah, I forgot to account for that in beta1. This one should fix it:

https://github.com/FlyingDiver/Indigo-H ... .1.0-beta2

What's going on with Xbox vs PS? Is it something that the Harmony knows to do differently?

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

Posted on
Sat Dec 17, 2016 4:35 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Universal Controls Option

Yeah they have different "Command Groups" of "GameType1" for xbox commands (A, B, X, Y) and "GameType2" (Circle, Cross, Triangle, Square) for ps4 and i'm gonna guess others will appear as i add them to the system (not sure how it'll handle also having a PS3 as that's yet to be configured.)

Computer says no.

Posted on
Sat Dec 17, 2016 4:39 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Universal Controls Option

Oops installing that plugin states that it's already installed... same version number as before? (I've replaced it manually and seems to work)

Computer says no.

Posted on
Sat Dec 17, 2016 4:51 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Universal Controls Option

durosity wrote:
Oops installing that plugin states that it's already installed... same version number as before? (I've replaced it manually and seems to work)


Yeah, the betas are all the same version number.

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

Posted on
Sat Dec 17, 2016 4:56 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Universal Controls Option

durosity wrote:
Yeah they have different "Command Groups" of "GameType1" for xbox commands (A, B, X, Y) and "GameType2" (Circle, Cross, Triangle, Square) for ps4 and i'm gonna guess others will appear as i add them to the system (not sure how it'll handle also having a PS3 as that's yet to be configured.)


I see. My Fire TV is GameType3, with just one Action in the group. What a waste. ;)

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

Posted on
Sat Dec 17, 2016 4:58 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Universal Controls Option

Hehe yeah I've got a couple that just have one in them!

Hmm.. that's a thought actually, could the sub folders be stripped just to leave the actual commands? As best I can tell there's no overlap and I don't think it'd cause any confusion as to what they do?

Computer says no.

Posted on
Sat Dec 17, 2016 5:03 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Universal Controls Option

durosity wrote:
Hehe yeah I've got a couple that just have one in them!

Hmm.. that's a thought actually, could the sub folders be stripped just to leave the actual commands? As best I can tell there's no overlap and I don't think it'd cause any confusion as to what they do?


You mean merge the Command Group and Command popups? Yeah, I could, but I won't. I HATE long lists in popups. Programmer's prerogative.

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

Posted on
Sat Dec 17, 2016 5:03 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Universal Controls Option

Fair nuf, thought it might just simply things! No biggie!

Computer says no.

Who is online

Users browsing this forum: No registered users and 2 guests