Dayton Audio has a new version of there distributed audio amp now available which I plan on using in the new house. https://www.daytonaudio.com/product/185 ... dio-system Any chance you can integrate the plugin with this amp. The new version is set up very similar to the old version so hopefully it may work. The new version now has 8 -zone 8-source and 80 watt per channel. Still has the RS232 serial controller with added WiFi and hard wired ethernet. Added Matrio™ mobile app, streaming audio and Air-Play .
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"])})
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.
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})
I forked your repository on GitHub, made the changes in that fork, and did a pull request. Trying to save you a little work.
str((int(%dp:zoneNumber% / 6)) + 1) + str(%dp:zoneNumber% % 6)
str((int((%dp:zoneNumber% - 1) / 6)) + 1) + str(((%dp:zoneNumber% - 1) % 6) + 1)
Also, since the output zones are defined as dimmer devices, would it be possible to scale the volume setting between 0-100 instead of the unit's native 0-38?
RogueProeliator wrote:The mapping between zone control and indigo dimmer device has some issues. On/off works, but the zone status isn't correct. The only way to get the zone to show as off is to turn the volume (brightness) all the way down. So the UI shows the zone as on even if it's actually off (isPoweredOn = false).
I'll take a quick peak - I never turn things off so probably why I haven't noticed anything amiss. I end up switching to a computer source so that announcements can be heard when not playing music. Probably an easy bug to squash.
Also, since the output zones are defined as dimmer devices, would it be possible to scale the volume setting between 0-100 instead of the unit's native 0-38?
The mapping between zone control and indigo dimmer device has some issues. On/off works, but the zone status isn't correct. The only way to get the zone to show as off is to turn the volume (brightness) all the way down. So the UI shows the zone as on even if it's actually off (isPoweredOn = false).