Dayton Audio Controller Plugin
- FlyingDiver
- Posts: 7332
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Dayton Audio Controller Plugin
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?
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
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- RogueProeliator
- Posts: 2520
- Joined: Tue Nov 13, 2012 3:54 pm
- Location: Baton Rouge, LA
Re: Dayton Audio Controller Plugin
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?Is that an artifact of the way the plugin handles the command, or an actual restriction on the hardware?
This is part of the reason that I don't usually turn zones on/off but rather just mute them.
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!I forked your repository on GitHub, made the changes in that fork, and did a pull request. Trying to save you a little work.
- FlyingDiver
- Posts: 7332
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Dayton Audio Controller Plugin
No, I don't think that's a good solution. Might cause the zone to start playing even if you didn't intend to.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.
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
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- RogueProeliator
- Posts: 2520
- Joined: Tue Nov 13, 2012 3:54 pm
- Location: Baton Rouge, LA
Re: Dayton Audio Controller Plugin
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.No, I don't think that's a good solution. Might cause the zone to start playing even if you didn't intend to.
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
- FlyingDiver
- Posts: 7332
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Dayton Audio Controller Plugin
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
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- RogueProeliator
- Posts: 2520
- Joined: Tue Nov 13, 2012 3:54 pm
- Location: Baton Rouge, LA
Re: Dayton Audio Controller Plugin
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)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...
- FlyingDiver
- Posts: 7332
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Dayton Audio Controller Plugin
Yeah, that's what I just did. I would like to find some nice looking Muted/NotMuted icons though.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)
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- FlyingDiver
- Posts: 7332
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Dayton Audio Controller Plugin
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
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- RogueProeliator
- Posts: 2520
- Joined: Tue Nov 13, 2012 3:54 pm
- Location: Baton Rouge, LA
Re: Dayton Audio Controller Plugin
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.My testing this afternoon shows I can't change sources or volume when a zone is muted. Can you?
These API's always seem to be a secondary thought for nearly every hardware company.
- FlyingDiver
- Posts: 7332
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Dayton Audio Controller Plugin
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.
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
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- RogueProeliator
- Posts: 2520
- Joined: Tue Nov 13, 2012 3:54 pm
- Location: Baton Rouge, LA
Re: Dayton Audio Controller Plugin
Of course, it is a standard plugin, so you can write scripts to call actions in the standard way.Is the plugin scriptable?
I would use python script action... something like this should work: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.
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})
- FlyingDiver
- Posts: 7332
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Dayton Audio Controller Plugin
Great, thanks.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- FlyingDiver
- Posts: 7332
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Dayton Audio Controller Plugin
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
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Dayton Audio Controller Plugin
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!
Any idea why this might be happening? Everything else seems to work!
Thanks for sharing this great plug-in!
- RogueProeliator
- Posts: 2520
- Joined: Tue Nov 13, 2012 3:54 pm
- Location: Baton Rouge, LA
Re: Dayton Audio Controller Plugin
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.