Niles Audio Initial Feedback

Posted on
Sun Dec 08, 2013 11:52 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Niles Audio Initial Feedback

If anyone has any trouble with the installation or operation of the plugin, please let me know... there have been a couple of users doing some initial beta testing and this has been working for me for several weeks in its current form (and several months prior to that in a lesser form).

If anyone is considering a distributed audio system, the Niles Audio Receivers are pretty awesome - but the keypads and zone controllers are very expensive; this plugin was developed because I wanted a quality system without paying for it! :-) I have had great success using the system this way without individual (expensive) keypads on the walls.

Adam

Posted on
Fri Jan 03, 2014 12:16 pm
doug@dynamic.com offline
Posts: 12
Joined: Sep 30, 2012

Re: Niles Audio Initial Feedback

I had been corresponding with Michael a few months back about a Niles Plugin. I have the ICS GXR-2 and have written a background server that pushes and pulls information from the Niles and Indigo. I wrote it as a server, because I know nothing about Python and my Applescript knowledge barely keeps me out of trouble.

The server runs in background and connects to the Niles via RS-232. It auto populates Indigo Variables for each zone and source it finds and updates Indigo whenever anything changes. I use Control Pages to send commands to the server via applescript and shell scripts. When started, the server determines the number and name of each zone, default volumes, doorbell info, max volume, etc. and pushes that to Indigo Variables. It also determines the number of sources, their types and descriptive names as they appear on the keypads.

The server supports commands including - setting the time on the Niles, setting maximum and default volumes, changing sources, mute, party modes, all off, volume up/down, volume to a specific level, etc. It works on the principle of monitoring the automatic reporting modes of the Niles - updating the Indigo Variables for changes to the current source as well as changes to other sources. Metadata (Artist, Song, channel), etc. are also updated for sources that supply metadatasuch as Ipods, NetMusic, XM/Sirius, etc. I have a legacy audio source in the Niles connected to Sonos and Indigo uses the Sonos Indigo Plug-In to update metadata whenever a track changes.

I have begun to expand the control pages to support some of the Niles Keypad Menus - such as XM Channel List; Favorites, change channel, etc.

The coding is based upon the Niles TS232G Protocol Version 2.6.2 which may be found on the ICS website.

I would really like to figure out how to incorporate this server into a real Indigo Plug-In.

Doug at dynamic dot com

Posted on
Fri Jan 03, 2014 2:20 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Niles Audio Initial Feedback

The control protocols for the ICS line seem to be fairly different than their receiver/distribution line -- I looked into it while developing this but determined it was far enough off not to make an easy inclusion; I did sent Mike the plugin along with a brief explanation, but not sure if he got anywhere with it.

The plugin framework that I developed (and use with the Niles Audio Plugin) eliminates much of the Python coding required - there is relatively little code at all in the main class. The vast majority of the work is done in configuring the communication protocol via an XML file... in fact, some of my plugins don't have a single function in the Plugin class. Unfortunately some Python coding will almost definitely be required as the protocol for ICS (if I remember correctly) was kind of dynamic based upon the different sources (such as meta data).

This plugin might give you a starting point, including an idea of some of the devices and configuration, but your best bet is to begin reading through and understanding the plugin guide along with some sample plugins to follow.

I would suggest understanding some of the simpler plugins before jumping right in to one written by a plugin developer for a real device -- the SDK does provide plenty of easy-to-follow examples that don't involve simultaneously trying to read an existing protocol's communications protocol.

Adam

Posted on
Fri Jan 03, 2014 6:52 pm
asw24b offline
Posts: 222
Joined: Dec 30, 2007
Location: Los Altos Hills, CA

Re: Niles Audio Initial Feedback

RogueProeliator wrote:
The control protocols for the ICS line seem to be fairly different than their receiver/distribution line -- I looked into it while developing this but determined it was far enough off not to make an easy inclusion; I did sent Mike the plugin along with a brief explanation, but not sure if he got anywhere with it.



Not yet... I know what I need to add, but I need to get the CES death march out of the way...

(The old version of the plug in works, with 2 simple hacks, with ICS.)


Mike

Posted on
Sun Jan 05, 2014 7:26 am
Sanderkoers offline
Posts: 43
Joined: Sep 03, 2010

Re: Niles Audio Initial Feedback

Hello Adam,

plugin looks great, i am trying to get it working with my ZR4.

i have the following problems;

- after installing, i receive a mail that i need to upgrade to version 1.0.4 but when i follow the link in the mail it downloads the v0.9.4.
- how did you configure the RS232 interface ? i am using a keyspan usb to RS232, i can select this but it does not communicate with the zr4. i think i need to set the baud rate somewhere ??

thanks a lot !

Posted on
Sun Jan 05, 2014 10:06 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Niles Audio Initial Feedback

I'll have to check this afternoon when I get home, but it is possible I forgot to update the link in the email - what version is it saying is installed for you (in the Indigo Plugin's menu)?

Just to be clear - the plugin does pick up that the USB/RS232 is installed and allows you to select it, but then you cannot connect? Can you turn on debugging then restart the plugin and see if there is an error in the log? The plugin configures all of the serial port behind-the-scenes, but if the ZR4 is different than the ZR-6 then I may need to expose that as an option for you to set.

One way you can check the settings and USB-to-RS232 is to try to connect to it outside of Indigo. I used CoolTerm (IIRC) because it was free and easy to use... Just attempt to open a connection - my saved CoolTerm has these settings (though if your ZR-4 has any specific information, use that instead!):
Baud: 38400
Data Bits: 8
Parity: none
Stop Bits: 1
[No flow control checked]
Terminal Mode: Raw
Enter Key Emulation: CR

An example if you connect is to type in "znc,5" without the quotes... this should get you a string of letters/numbers representing information about the current zone.

Let me know if that gets you anywhere - I can better help this afternoon or evening.

Adam

Posted on
Sun Jan 05, 2014 1:02 pm
Sanderkoers offline
Posts: 43
Joined: Sep 03, 2010

Re: Niles Audio Initial Feedback

Thanks in advance,

this is in the event log;
Niles Audio Receiver Plugin Debug Version check initiated
Niles Audio Receiver Plugin Debug Version File Url:https://www.rogueproeliator.com/IndigoPlugins/NilesAudioReceiver/NilesAudioReceiverVersionInfo.html
Niles Audio Receiver Plugin Error You are running v0.9.4. A newer version, v1.0.4 is available
Niles Audio Receiver Plugin Debug Version notification already emailed to the user about this version
Niles Audio Receiver Plugin Debug Entering deviceStartComm for AUDIO NILES ZR4; ID=459594108
Niles Audio Receiver Plugin Debug Read device state config... isConnected: 'isConnected'; connectionState: 'connectionState'
Niles Audio Receiver Plugin Debug Establishing connection to /dev/cu.KeySerial1
Niles Audio Receiver Plugin Debug Returning default GUIConfigValue for nilesAudioReceiver:deviceIsChildDevice
Niles Audio Receiver Plugin Debug Returning default GUIConfigValue for nilesAudioReceiver:deviceIsChildDevice
Niles Audio Receiver Plugin Debug Exiting deviceStartComm for AUDIO NILES ZR4
Niles Audio Receiver Plugin Debug Entering deviceStartComm for AUDIO Z1; ID=820184553
Niles Audio Receiver Plugin Debug Device is child object, attempting to find parent
Niles Audio Receiver Plugin Debug Found parent ID of device 820184553: 459594108
Niles Audio Receiver Plugin Debug Parent object found, adding this child device now
Niles Audio Receiver Plugin Debug Adding child device 820184553 to 459594108
Niles Audio Receiver Plugin Debug Created device key:1
Niles Audio Receiver Plugin Debug Returning default GUIConfigValue for nilesAudioReceiver:deviceIsChildDevice
Niles Audio Receiver Plugin Debug Exiting deviceStartComm for AUDIO Z1
Niles Audio Receiver Plugin Debug Entering deviceStartComm for AUDIO Z2; ID=120498734
Niles Audio Receiver Plugin Debug Device is child object, attempting to find parent
Niles Audio Receiver Plugin Debug Found parent ID of device 120498734: 459594108
Niles Audio Receiver Plugin Debug Parent object found, adding this child device now
Niles Audio Receiver Plugin Debug Adding child device 120498734 to 459594108
Niles Audio Receiver Plugin Debug Created device key:2
Niles Audio Receiver Plugin Debug Returning default GUIConfigValue for nilesAudioReceiver:deviceIsChildDevice
Niles Audio Receiver Plugin Debug Exiting deviceStartComm for AUDIO Z2
Niles Audio Receiver Plugin Debug Entering deviceStartComm for AUDIO Z3; ID=1743982641
Niles Audio Receiver Plugin Debug Device is child object, attempting to find parent
Niles Audio Receiver Plugin Debug Found parent ID of device 1743982641: 459594108
Niles Audio Receiver Plugin Debug Parent object found, adding this child device now
Niles Audio Receiver Plugin Debug Adding child device 1743982641 to 459594108
Niles Audio Receiver Plugin Debug Created device key:3
Niles Audio Receiver Plugin Debug Returning default GUIConfigValue for nilesAudioReceiver:deviceIsChildDevice
Niles Audio Receiver Plugin Debug Exiting deviceStartComm for AUDIO Z3
Niles Audio Receiver Plugin Debug Entering deviceStartComm for AUDIO Z4-KEUKEN; ID=281421761
Niles Audio Receiver Plugin Debug Device is child object, attempting to find parent
Niles Audio Receiver Plugin Debug Found parent ID of device 281421761: 459594108
Niles Audio Receiver Plugin Debug Parent object found, adding this child device now
Niles Audio Receiver Plugin Debug Adding child device 281421761 to 459594108
Niles Audio Receiver Plugin Debug Created device key:4
Niles Audio Receiver Plugin Debug Returning default GUIConfigValue for nilesAudioReceiver:deviceIsChildDevice
Niles Audio Receiver Plugin Debug Exiting deviceStartComm for AUDIO Z4-KEUKEN
Niles Audio Receiver Plugin Debug Connection established
Niles Audio Receiver Plugin Debug Returning default GUIConfigValue for nilesAudioReceiver:telnetConnectionEOLString
Niles Audio Receiver Plugin Debug Returning default GUIConfigValue for nilesAudioReceiver:telnetConnectionStringEncoding
Niles Audio Receiver Plugin Debug Returning default GUIConfigValue for nilesAudioReceiver:telnetConnectionRequiresLoginProperty
Niles Audio Receiver Plugin Debug Command queue has 1 command(s) waiting
Niles Audio Receiver Plugin Debug Create connection command de-queued
Niles Audio Receiver Plugin Debug Command queue has 1 command(s) waiting
Niles Audio Receiver Plugin Debug Executing full status update request...
Niles Audio Receiver Plugin Debug Command queue has 1 command(s) waiting
Niles Audio Receiver Plugin Debug Command queue has 8 command(s) waiting
Niles Audio Receiver Plugin Debug Writing activate zone request for zone 1
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 7 command(s) waiting
Niles Audio Receiver Plugin Debug Sending command: znc,5
Niles Audio Receiver Plugin Debug Write command completed.
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 6 command(s) waiting
Niles Audio Receiver Plugin Debug Writing activate zone request for zone 3
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 5 command(s) waiting
Niles Audio Receiver Plugin Debug Sending command: znc,5
Niles Audio Receiver Plugin Debug Write command completed.
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 4 command(s) waiting
Niles Audio Receiver Plugin Debug Writing activate zone request for zone 2
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 3 command(s) waiting
Niles Audio Receiver Plugin Debug Sending command: znc,5
Niles Audio Receiver Plugin Debug Write command completed.
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 2 command(s) waiting
Niles Audio Receiver Plugin Debug Writing activate zone request for zone 4
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 1 command(s) waiting
Niles Audio Receiver Plugin Debug Sending command: znc,5
Niles Audio Receiver Plugin Debug Write command completed.
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 1 command(s) waiting
Niles Audio Receiver Plugin Debug Executing full status update request...
Niles Audio Receiver Plugin Debug Command queue has 1 command(s) waiting
Niles Audio Receiver Plugin Debug Command queue has 8 command(s) waiting
Niles Audio Receiver Plugin Debug Writing activate zone request for zone 1
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 7 command(s) waiting
Niles Audio Receiver Plugin Debug Sending command: znc,5
Niles Audio Receiver Plugin Debug Write command completed.
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 6 command(s) waiting
Niles Audio Receiver Plugin Debug Writing activate zone request for zone 3
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 5 command(s) waiting
Niles Audio Receiver Plugin Debug Sending command: znc,5
Niles Audio Receiver Plugin Debug Write command completed.
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 4 command(s) waiting
Niles Audio Receiver Plugin Debug Writing activate zone request for zone 2
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 3 command(s) waiting
Niles Audio Receiver Plugin Debug Sending command: znc,5
Niles Audio Receiver Plugin Debug Write command completed.
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 2 command(s) waiting
Niles Audio Receiver Plugin Debug Writing activate zone request for zone 4
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 1 command(s) waiting
Niles Audio Receiver Plugin Debug Sending command: znc,5
Niles Audio Receiver Plugin Debug Write command completed.
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 1 command(s) waiting
Niles Audio Receiver Plugin Debug Executing full status update request...
Niles Audio Receiver Plugin Debug Command queue has 1 command(s) waiting
Niles Audio Receiver Plugin Debug Command queue has 8 command(s) waiting
Niles Audio Receiver Plugin Debug Writing activate zone request for zone 1
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 7 command(s) waiting
Niles Audio Receiver Plugin Debug Sending command: znc,5
Niles Audio Receiver Plugin Debug Write command completed.
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 6 command(s) waiting
Niles Audio Receiver Plugin Debug Writing activate zone request for zone 3
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1
Niles Audio Receiver Plugin Debug Command queue has 5 command(s) waiting
Niles Audio Receiver Plugin Debug Sending command: znc,5
Niles Audio Receiver Plugin Debug Write command completed.
Niles Audio Receiver Plugin Debug Post Command Pause: 0.1

Posted on
Sun Jan 05, 2014 1:03 pm
Sanderkoers offline
Posts: 43
Joined: Sep 03, 2010

Re: Niles Audio Initial Feedback

when i give the all off command it replies;

Action Group AUDIO ALL OFF
Niles Audio Receiver Plugin Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Niles Audio Receiver.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkPlugin.py", line 712, in executeAction
<type 'exceptions.TypeError'>: cannot concatenate 'str' and 'int' objects

Posted on
Sun Jan 05, 2014 1:46 pm
Sanderkoers offline
Posts: 43
Joined: Sep 03, 2010

Re: Niles Audio Initial Feedback

i used cooltherm to send something, this was the response;

r.............................znc,5,FAIL,2

Posted on
Sun Jan 05, 2014 1:47 pm
Sanderkoers offline
Posts: 43
Joined: Sep 03, 2010

Re: Niles Audio Initial Feedback

when i send znc,4 and znc,3

usc,2,2,1,0,60,0,0,0
rznc,3,2,6,Zone 2

Posted on
Sun Jan 05, 2014 1:59 pm
Sanderkoers offline
Posts: 43
Joined: Sep 03, 2010

Re: Niles Audio Initial Feedback

Hello Adam,

i can control the ZR4 using cooltherm, but not on a baud rate of 38400 but only on 9600.

that seems to be the problem.

Posted on
Sun Jan 05, 2014 2:04 pm
asw24b offline
Posts: 222
Joined: Dec 30, 2007
Location: Los Altos Hills, CA

Re: Niles Audio Initial Feedback

Sanderkoers wrote:
Hello Adam,

i can control the ZR4 using cooltherm, but not on a baud rate of 38400 but only on 9600.

that seems to be the problem.



Just so you know, the Niles ICS system is supposed to work at baud rate of up to 57.6, but I can't get it to work reliably over 9600 baud either.

And, their tech support is rotten.

Mike

Posted on
Sun Jan 05, 2014 2:17 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Niles Audio Initial Feedback

Okay, I just rebuilt the plugin download link for v1.0.4... please download that and give it a try. However, if indeed the issue is the 9600 baud, I'll need to expose that setting in the configuration.

Once you download v1.0.4, if you feel brave, we can edit the XML that controls that baud rate to see if it fixed it for you. Make sure you upgrade first as it will over-write the RPPluginConfig.xml file that you need to edit.

Then, go to your Plugins directory beneath the Indigo directory (normally /Library/Application Support/Perceptive Automation/Indigo 6/Plugins). Then navigate into the Niles Audio Receiver.indigoPlugin -- if in a terminal you can just get into it normally, if in Finder then right click and "Show Package Contents". Navigate the folders until you see a file called RPFrameworkConfig.xml.

Open that file and near the top you will see a setting "serialPortBaud" that you can change. You'll have to restart the plugin for the change to take effect. In the meantime, when I get a chance, I'll try a more permanent fix of allowing that to be a setting. Or I could just default back to 9600...

Adam

Posted on
Sun Jan 05, 2014 2:18 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Niles Audio Initial Feedback

Mike, can you define "reliably"? Just curious if it is failing or what... I find that the ZR-6 can be a bit slow in general and I have noticed an occasional dropped command if I send them too fast. Now I am wondering if that could be the baud setting or it just can't respond all that fast...

Posted on
Sun Jan 05, 2014 2:20 pm
Sanderkoers offline
Posts: 43
Joined: Sep 03, 2010

Re: Niles Audio Initial Feedback

after update;

5 jan. 2014 21:18:59
Stopping plugin "Niles Audio Receiver Plugin" (pid 1261)
Niles Audio Receiver Plugin Error exception in deviceStopComm(AUDIO NILES ZR4): 'RPFrameworkCommand' object has no attribute 'task_done'
Stopped plugin "Niles Audio Receiver Plugin"
Upgrading plugin "Niles Audio Receiver Plugin" to newer version 1.0.4 (previous version moved to trash)
Loading plugin "Niles Audio Receiver Plugin 1.0.4"
Starting plugin "Niles Audio Receiver Plugin 1.0.4" (pid 1282)
Started plugin "Niles Audio Receiver Plugin 1.0.4"
Niles Audio Receiver Plugin Your plugin version, v1.0.4, is current.
Niles Audio Receiver Plugin Error exception in deviceStartComm(AUDIO NILES ZR4)
Niles Audio Receiver Plugin Error exception in deviceStartComm(AUDIO Z1)
Niles Audio Receiver Plugin Error exception in deviceStartComm(AUDIO Z2)
Niles Audio Receiver Plugin Error exception in deviceStartComm(AUDIO Z3)
Niles Audio Receiver Plugin Error exception in deviceStartComm(AUDIO Z4-KEUKEN)

5 jan. 2014 21:19:57
Niles Audio Receiver Plugin Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 849, in deviceUpdated
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Niles Audio Receiver-3.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkPlugin.py", line 374, in deviceStopComm
<type 'exceptions.KeyError'>: (459594108,)

Who is online

Users browsing this forum: No registered users and 2 guests