Dayton Audio Controller Plugin

Plugins to extend Indigo integration to additional hardware and apps to extend Indigo onto other platforms.
User avatar
FlyingDiver
Posts: 7332
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Dayton Audio Controller Plugin

Post by FlyingDiver »

I forked your repository on GitHub, made the changes in that fork, and did a pull request. Trying to save you a little work. ;)

Got a question - It appears that no commands are processed by the amp for a zone if the zone is off. For instance, I can't change the zone source if the zone is off. Is that an artifact of the way the plugin handles the command, or an actual restriction on the hardware?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
RogueProeliator
Posts: 2520
Joined: Tue Nov 13, 2012 3:54 pm
Location: Baton Rouge, LA

Re: Dayton Audio Controller Plugin

Post by RogueProeliator »

Is that an artifact of the way the plugin handles the command, or an actual restriction on the hardware?
Unfortunately that seems to be the hardware; it basically ignores all commands sent without any response indicating it will not process (other than the status not changing for the selected command). I've been toying with having the plugin automatically send a Zone Power On command if you submit another command to a powered-off zone. Thoughts on that?

This is part of the reason that I don't usually turn zones on/off but rather just mute them.
I forked your repository on GitHub, made the changes in that fork, and did a pull request. Trying to save you a little work. ;)
Awesome, thanks... I was literally about to open that to take a look at fixing it and came here to read the forum first. Got it merged in!
User avatar
FlyingDiver
Posts: 7332
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Dayton Audio Controller Plugin

Post by FlyingDiver »

RogueProeliator wrote:Unfortunately that seems to be the hardware; it basically ignores all commands sent without any response indicating it will not process (other than the status not changing for the selected command). I've been toying with having the plugin automatically send a Zone Power On command if you submit another command to a powered-off zone. Thoughts on that?

This is part of the reason that I don't usually turn zones on/off but rather just mute them.
No, I don't think that's a good solution. Might cause the zone to start playing even if you didn't intend to.

I'll probably redo my control pages to put the mute control where I have the power control now, and move the power control to a secondary page.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
RogueProeliator
Posts: 2520
Joined: Tue Nov 13, 2012 3:54 pm
Location: Baton Rouge, LA

Re: Dayton Audio Controller Plugin

Post by RogueProeliator »

No, I don't think that's a good solution. Might cause the zone to start playing even if you didn't intend to.
That's pretty much why I have not done it... but other (similar) hardware behaves such that if you set certain properties the zone automatically turns itself on; for instance, if you change the source of a zone on a Niles Audio receiver, it turns on if not currently powered on.

Since you are the only other one with an opinion and I don't really care that much since I try not to toggle on/off (unless major power failure maybe) then I will leave as-is.

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

Re: Dayton Audio Controller Plugin

Post by FlyingDiver »

Since I'm switching from power on/off to mute on/off on my control pages, I'm going to need to switch icons. All the ones I used previously have reversed meanings. Any suggestions? Unless I add an isNotMuted state, that is. Hmm...
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
RogueProeliator
Posts: 2520
Joined: Tue Nov 13, 2012 3:54 pm
Location: Baton Rouge, LA

Re: Dayton Audio Controller Plugin

Post by RogueProeliator »

Since I'm switching from power on/off to mute on/off on my control pages, I'm going to need to switch icons. All the ones I used previously have reversed meanings. Any suggestions? Unless I add an isNotMuted state, that is. Hmm...
I would just duplicate the icons and reverse the value of the +on / +off state under a new name. I think it is better to keep the states and properties a more "normal" meaning and change the name/look of the graphics. Otherwise triggers/conditions/scripts are a bit confusing (e.g. if states["isNotMute"] == True is sort of hard to read and understand)
User avatar
FlyingDiver
Posts: 7332
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Dayton Audio Controller Plugin

Post by FlyingDiver »

RogueProeliator wrote:I would just duplicate the icons and reverse the value of the +on / +off state under a new name. I think it is better to keep the states and properties a more "normal" meaning and change the name/look of the graphics. Otherwise triggers/conditions/scripts are a bit confusing (e.g. if states["isNotMute"] == True is sort of hard to read and understand)
Yeah, that's what I just did. I would like to find some nice looking Muted/NotMuted icons though.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7332
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Dayton Audio Controller Plugin

Post by FlyingDiver »

My testing this afternoon shows I can't change sources or volume when a zone is muted. Can you?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
RogueProeliator
Posts: 2520
Joined: Tue Nov 13, 2012 3:54 pm
Location: Baton Rouge, LA

Re: Dayton Audio Controller Plugin

Post by RogueProeliator »

My testing this afternoon shows I can't change sources or volume when a zone is muted. Can you?
Doesn't look like it... can't say that I had tried doing changes muted before (or rather hadn't paid attention at least). Volume not being set while muted is not all that unusual, but don't really see the point of not allowing source changes while muted. Still, ideally should be able to change ANY settings in any state if the receiver is active and responding.

These API's always seem to be a secondary thought for nearly every hardware company. :(
User avatar
FlyingDiver
Posts: 7332
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Dayton Audio Controller Plugin

Post by FlyingDiver »

Is the plugin scriptable?

Normally I could answer that question by looking at the plugin code, but with your custom framework I really can't tell.

I was trying to write an Action Group that would save the current source for a zone, change it, play an announcement, then change it back. As far as I can tell, there's no way with the defined actions to set a zone to a value saved in a variable. There's a menu command for sending an arbitrary command, but it's not exposed as an Action.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
RogueProeliator
Posts: 2520
Joined: Tue Nov 13, 2012 3:54 pm
Location: Baton Rouge, LA

Re: Dayton Audio Controller Plugin

Post by RogueProeliator »

Is the plugin scriptable?
Of course, it is a standard plugin, so you can write scripts to call actions in the standard way.
I was trying to write an Action Group that would save the current source for a zone, change it, play an announcement, then change it back. As far as I can tell, there's no way with the defined actions to set a zone to a value saved in a variable. There's a menu command for sending an arbitrary command, but it's not exposed as an Action.
I would use python script action... something like this should work:

Code: Select all

targetZoneDeviceId =123456789
zoneDev = indigo.devices[targetZoneDeviceId]
oldSource = zoneDev.states["source"]

daytonPlugin = indigo.server.getPlugin("com.duncanware.daytonAudioController")
daytonPlugin.executeAction("changeZoneSource", targetZoneDeviceId, props={"zoneSource":2})

... announcement code or other action or whatever...

daytonPlugin.executeAction("changeZoneSource", targetZoneDeviceId, props={"zoneSource":oldSource})
User avatar
FlyingDiver
Posts: 7332
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Dayton Audio Controller Plugin

Post by FlyingDiver »

Great, thanks.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7332
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Dayton Audio Controller Plugin

Post by FlyingDiver »

Final script, if anyone else is interested in doing something similar:

Code: Select all

alertSource = indigo.variables[430326258].value
alertText = indigo.variables[1786407594].value

daytonPlugin = indigo.server.getPlugin("com.duncanware.daytonAudioController")
if not daytonPlugin.isEnabled():
	return

devList = []
for device in indigo.devices.iter():
	if device.deviceTypeId == "daytonAudioZone":
		devList.append(device)
		daytonPlugin.executeAction("changeZoneSource", device.id, props={"zoneSource": alertSource})

indigo.server.speak(alertText, waitUntilDone=True)

for device in devList:
	daytonPlugin.executeAction("changeZoneSource", device.id, props={"zoneSource": str(device.states["source"])})
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
alphaboy
Posts: 10
Joined: Tue Dec 01, 2009 7:43 am
Location: Montreal, Canada

Re: Dayton Audio Controller Plugin

Post by alphaboy »

Seems like there might be a bug... I'm using 6 zone monoprice receiver and can't seem to set "Set Source (all Zones)" action group. The menu is completely blank- while I'm able to set individual source select action groups.

Any idea why this might be happening? Everything else seems to work!

Thanks for sharing this great plug-in!


Screen Shot 2017-04-08 at 11.24.53 AM.jpg
Screen Shot 2017-04-08 at 11.24.53 AM.jpg (371.4 KiB) Viewed 15839 times
Screen Shot 2017-04-08 at 11.24.07 AM.jpg
Screen Shot 2017-04-08 at 11.24.07 AM.jpg (390.75 KiB) Viewed 15839 times
User avatar
RogueProeliator
Posts: 2520
Joined: Tue Nov 13, 2012 3:54 pm
Location: Baton Rouge, LA

Re: Dayton Audio Controller Plugin

Post by RogueProeliator »

Sorry for the delay, was out of town for the weekend. I think that I found the issue -- I'll see if I can get a new version up tonight or tomorrow and will post to let you know.
Post Reply

Return to “RogueProeliator's Plugins and Apps”