SmartThings Community

[RELEASE] Russound Multi-Zone Controller Integration

smartapp_av
russound
dth_av

#487

Yeah you can’t do that… limitation of ST DTH… It may have changed, but you couldn’t do it a year ago… I tried a ton of things to get around it, but in the end had to settle. That’s why I set the source in the SECONDARY_CONTROL… so that if you haven’t manually edited the DTH and changed the source names, at least you’ll see the source name somewhere on the screen. Let me know if you crack this one!


#488

First off, thanks again redloro for this and for the help in getting it working. I’ve managed to have it start on bootup and continually run, and have no issues since. This was definitely the start of my smart home/home audio enthusiasm.

I have two questions. One, within Smartthings, is it possible to trigger an event/routine/etc. and select the source in addition to turning on the speaker switch? Second, I am just starting to tinker with Home Assistant and wanted to know if you or anyone had any experience with integrating Russound RNET?


(Brad Moriarity) #489

I’ve spent some time looking at the RNET RS-232 codes and at the Russound CAM6.6T user manual, it looks like there is no direct RS-232 codes for the tuner itself, but rather that the built-in tuner appears to be controlled using standard key press commands from the UNO keypads (S1, S2 or TS2).

I’ve copied the UNO-S2 control scheme below. It looks like basic tuner commands are accomplished through the +, -, PLAY, SEEK >, and SEEK < buttons.

I’ve also copied the RS-232 commands for the UNO keypad events below, and it looks like those buttons can all be mapped directly using the codes below.


(Toby D) #490

Hey hey! Somehow I missed this email. I have not. It appears the the server
is hanging up after I start it. My brother writes software for his own
company and tried to help me, but I think he was “over complicating
things”. He stated he liked your script and was easy to understand. But
he’s never seen a RPi and it was frustrating him. I’m pretty sure the
serial is up and running, and Smartthings “sees” apparently. But again this
is my first venture on this… And I think I picked a fun one to try out

Toby


(Toby D) #491

@redloro

I was under the impression I did not need the “rnet” items installed or running since I’m using the Monoprice.
This is what I get after starting the server.

I open my command window and “cd smartthings-nodeproxy”.

it just sits there. smartthings will not talk to the Pi no the Monoprice via app or virtual machine on the web app.


(CanAmMan) #492

Edit - I have figured out the issue, I tried to use the previous commit from Github from Oct 24th and it worked. Not sure why the latest commit with Bass & Treble support causes it to fail.

Hello Everyone,

I am hoping someone can help me out with this issue connecting my MPR6Z. I have spent several hours attempting to resolve but have been unable to find a solution. I had RedLoro’s smart app installed and everything was working from back several months but I wanted to reinstall my installation and now I can not seem to get the tiles to populate back in the app. I have attached my config for reference as well as the commands and results below from the console. I had to rewrite as it was previously in the old format without the discover or controller number. I have also ensured that all the code for both the Smartapp and the Device handler match the latest GitHub groovy files. It does not seem like the nodeproxy is passing the tile information to the SmartApp. Any advise would be much appreciated.

{
“port”: 8082,
“authCode”: “password”,
“mpr6z”: {
“serialPort”: “/dev/ttyUSB0”,
“baudRate”: 9600,
“sources”: [
“Chromecast”,
“Aux2”,
“Aux3”,
“Aux4”,
“Server”,
“Aux5”
],
“controllerConfig”: {
“type”: “discover”,
“controllers”: [
{
“controller”: 1,
“zones”: [
{
“zone”: 1,
“name”: “Living Room”
},
{
“zone”: 2,
“name”: “Bonus Room”
},
{
“zone”: 3,
“name”: “Bedroom”
},
{
“zone”: 4,
“name”: “Garage”
},
{
“zone”: 5,
“name”: “Basement”
},
{
“zone”: 6,
“name”: “Patio”
}
]
}
]
}
},
“notify”: {
“address”: “192.168.0.12”,
“port”: “39500”
}
}

home@HOMECTLR:~/smartthings-nodeproxy$ sudo npm run start

smartthings-nodeproxy@1.0.0 start /home/home/smartthings-nodeproxy
node server.js

[2018-01-11T20:55:36.764Z] [stnp] SmartThings Node Proxy listening at http://:::8082
[2018-01-11T20:55:36.860Z] [stnp] Loaded plugin: mpr-sg6z
[2018-01-11T20:55:36.871Z] [mpr6] Connected to MPR6Z: /dev/ttyUSB0
[2018-01-11T20:55:37.038Z] [mpr6] Detected serial ports: ["/dev/ttyUSB0","/dev/ttyS0","/dev/ttyS1","/dev/ttyS10","/dev/ttyS11","/dev/ttyS12","/dev/ttyS13","/dev/ttyS14","/dev/ttyS15","/dev/ttyS16","/dev/ttyS17","/dev/ttyS18","/dev/ttyS19","/dev/ttyS2","/dev/ttyS20","/dev/ttyS21","/dev/ttyS22","/dev/ttyS23","/dev/ttyS24","/dev/ttyS25","/dev/ttyS26","/dev/ttyS27","/dev/ttyS28","/dev/ttyS29","/dev/ttyS3","/dev/ttyS30","/dev/ttyS31","/dev/ttyS4","/dev/ttyS5","/dev/ttyS6","/dev/ttyS7","/dev/ttyS8","/dev/ttyS9"]
[2018-01-11T20:56:02.155Z] [stnp] ::ffff:192.168.0.12 GET /subscribe/192.168.0.12:39500
[2018-01-11T20:56:07.555Z] [stnp] ::ffff:192.168.0.12 GET /plugins/mpr-sg6z/discover
[2018-01-11T20:56:07.571Z] [mpr6] Completed controller discovery


#493

Hmm, I’ll have to go apply what was committed of my bass and treble mods and see what’s failing. I’m using my DTH dev code but not what was actually committed.


#494

Edit line 18 in the device handler from this:

definition (name: “MPR6Z Zone - bass & treble”, namespace: “redloro-smartthings”, author: "tcjennings@hotmail.com") {

to this:

definition (name: “MPR6Z Zone”, namespace: “redloro-smartthings”, author: "tcjennings@hotmail.com") {

If your error was the same as mine, it was stumbling over a namespace change from a 12/26/2017 commit:

physicalgraph.app.exception.UnknownDeviceTypeException: Device type ‘MPR6Z Zone’ in namespace ‘redloro-smartthings’ not found. @line 145 (doCall)

(from live log)


#495

I transitioned to a new network. I changed the IP address in the JSON config file, and tried to change it in the ST app. I get errors in the app saying i need to remove all RNET devices (basically reinstall)

I changed the IP and it did save, and it works (sort of), on the JSON Server i get

::ffff:192.168.6.18 GET /plugins/rnet/controllers/0/zones/1/state/1
[2018-02-10T15:46:13.608Z] [rnet] {“type”:“zone”,“controller”:0,“zone”:1,“state”:1}
[2018-02-10T15:46:14.634Z] [stnp] Notify error: Error: connect ECONNREFUSED 192.168.6.30:39500

The russound comes on, but it then shows in smartthings as off.

Any work around to this, without having to reinstall? I have alot of integration into different smartapps.

Thanks

Jeff


#496

@redloro I’m having the exact same issue as @cuedup - I have rebuilt everything multiple times and spent hours trying to get this to work. It is connecting to the MPRZ and controller discovery completes but, exactly like @cuedup it just completes without finding any zones. I’ve gone through my config file very carefully and I suspect this has something to do with the SmartApp - line 134 though doesn’t look like what you’re suggesting here it is a “}”, the line above, line 133 is " addChildDevices(it.controller, it.zones)" which I suspect is the line that you say is supposed to be replaced to read "addChildDevice(“redloro-smartthings”, “MPR6Z Zone”, deviceId, hostHub.id, [“name”: it.name, label: "MPR: “+it.name, completedSetup: true])”? Even making this change, nothing is different - it still doesn’t find any zones. I’ve literally spent hours trying to get this to work and would sincerely appreciate your help fixing this. I had this working perfectly most of last year before the pi lost power and I had to restart it and tried to upgrade the files. I really hope to get this working again - thank you!


#497

@ccruzen I’m having the exact same issue as you and @cuedup (see my previous post) - would you mind posting the code (as you’ve modified it) here for the device handler and smartapp? I can’t seem to get this to work and suspect that your problem is the same issue I’m having - it would be a huge help - thank you!


#498

Ran live logging during discovery and found the following error: “physicalgraph.app.exception.UnknownDeviceTypeException: Device type ‘MPR6Z Zone’ in namespace ‘redloro-smartthings’ not found. @line 145 (doCall)”


(Chad Cruzen) #499

@AndyC I’m sorry, mine isn’t working anymore either. The change I believe I made previously was changing “line 134”. I’ve got mine so that it discovers the zones, but Smartthings doesn’t show any Things.
Here’s my config just to be clear what I’ve got set:

config.json

{
“port”: 8080,
“authCode”: “password”,
“mpr6z”: {
“serialPort”: “COM3”,
“baudRate”: 9600,
“sources”: [
“N/A”,
“Vinyl”,
“N/A”,
“N/A”,
“Artax”,
“Rockbiter”
],
“controllerConfig”: {
“type”: “discover”,
“controllers”: [
{
“controller”: 1,
“zones”: [
{
“zone”: 1,
“name”: “Living Room”
},
{
“zone”: 2,
“name”: “Kitchen”
},
{
“zone”: 3,
“name”: “Deck”
},
{
“zone”: 4,
“name”: “Patio”
},
{
“zone”: 5,
“name”: “Dining Room”
},
{
“zone”: 6,
“name”: “N/A”
}
]
}
]
}
},
“notify”: {
“address”: “192.168.1.151”,
“port”: “39500”
}
}


#500

@ccruzen Thank you for responding so quickly. I’m sorry it isn’t working for you now either.

I made some progress just now: by changing, around line 148 of the smartapp, the reference from "addChildDevice(“redloro-smartthings”, “MPR6Z Zone”, deviceId, hostHub.id, [“name”: it.name, label: "MPR: “+it.name, completedSetup: true])” to "addChildDevice(“redloro-smartthings”, “MPR6Z Zone - bass & treble”, deviceId, hostHub.id, [“name”: it.name, label: "MPR: “+it.name, completedSetup: true])” - note the change from “MPR6Z” to “MPR6Z Zone - bass & treble” - I was able to get the zones recognized as things and it seems to be working. I think this works because the new DTH name is no longer “MPR6Z” but now “MPR6Z Zone - bass & treble”.

Note that I did not modify the code around line 134, so that still reads " addChildDevices(it.controller, it.zones)". I may try tweaking that as you described with the change I just discovered to the device name and will see what that does.

Also note, that I am regularly getting an error in the live log saying “error java.lang.NullPointerException: Cannot invoke method getValue() on null object @line 318 (getVolume)” so will have to figure out what’s causing that…


(Jim) #501

@redloro

I’m new to ST and STNP, but I think I have most of it installed and running correctly. I think my issue is that the Serial device is not talking to the MCA-C3. I’m using an iMac as the controller with an FDTI usb to serial adapter. I get the following output when I run npm run install:rnet

smartthings-nodeproxy@1.0.0 install:rnet /Users/jamesthacker/local/smartthings-master/smartthings-nodeproxy
npm install && npm install serialport@5.0.0

up to date in 1.49s

serialport@5.0.0 install /Users/jamesthacker/local/smartthings-master/smartthings-nodeproxy/node_modules/serialport
node-pre-gyp install --fallback-to-build

[serialport] Success: “/Users/jamesthacker/local/smartthings-master/smartthings-nodeproxy/node_modules/serialport/build/Release/serialport.node” is installed via remote

  • serialport@5.0.0
    updated 1 package in 7.346s

and the following for npm run start

smartthings-nodeproxy@1.0.0 start /Users/jamesthacker/local/smartthings-master/smartthings-nodeproxy
node server.js

[2018-03-05T00:15:09.538Z] [stnp] SmartThings Node Proxy listening at http://:::8080
[2018-03-05T00:15:09.559Z] [stnp] Loaded plugin: rnet
[2018-03-05T00:15:09.562Z] [rnet] Detected serial ports: ["/dev/tty.usbserial-AI05RXAD","/dev/tty.Bluetooth-Incoming-Port"]
[2018-03-05T00:15:09.564Z] [rnet] Connected to RNET: /dev/tty.usbserial-AI05RXAD

But as I change settings through the keypad I get no response in the terminal. Very rarely I will get an error message that says invalid message followed by a bunch of hex numbers. If I open up a separate app that can connect to the serial port, I do see some ASCII characters with valid info like the zone name etc. Below is my config.son file. Any Help would be greatly appreciated.
{
“port”: 8080,
“authCode”: "secrekey”,

“rnet”: {
“c-series”: true,
“serialPort”: “/dev/tty.usbserial-AI05RXAD”,
“baudRate”: 19200,
“sources”: [
“Alexa”,
“DirecTV 1”,
“Apple TV”,
“DirecTV 2”,
“Fire TV”,
“Source 6”
],
“controllerConfig”: {
“type”: “discover”,
“controllers”: [
{
“controller”: 1,
“zones”: [
{
“zone”: 0,
“name”: “Brennan”
},
{
“zone”: 1,
“name”: “Master Bedroom”
},
{
“zone”: 2,
“name”: “Family Room”
},
{
“zone”: 3,
“name”: “Bay & Brody”
},
{
“zone”: 4,
“name”: “Bathroom”
},
{
“zone”: 5,
“name”: “Basement”
}
]
}
]
}
}
}


#502

I don’t claim to have any clue what I’m doing but I have spent a lot of time on this thread and trying to stumble my way through figuring things out and I think (but don’t know) the output line above means it is connected to your receiver. I think others with serial port issues have not gotten this line. May be worth firing up live logging and see if it outputs any errors there when you try these commands. That would tell you if there’s a smartapp or device handler issue…


#503

Interesting - for those trying to troubleshoot and/or may read this post later: I just tried replacing line 134 with "addChildDevice(“redloro-smartthings”, “MPR6Z Zone - bass & treble”, deviceId, hostHub.id, [“name”: it.name, label: "MPR: “+it.name, completedSetup: true])” as suggested in earlier threads referenced above. However, this generated the following new error: “java.lang.IllegalArgumentException: A deviceNetworkId must be specified @line 134 (doCall)”. So that didn’t work at all for me. Returning the line back to “addChildDevices(it.controller, it.zones)” removes the error completely.


(Ken) #504

That is the USB port connect to the Amp
Mine is
"serialPort": “/dev/ttyUSB0”,
not
“serialPort”: “/dev/tty.usbserial-AI05RXAD”,

If you are running a RaspberryPi. Windows would be COM3 or whatever COM port the USB cable is connected if you look in Devices you should be able to see it.

On the RaspberryPi do a “ls /dev/ttyUSB*”


(Jim) #505

So now I see the zones in my smart app but they are all on and I have no control. The sources do not come up as the names, instead as just source 1-6. I saw somewhere in an early post about all zones showing up as on but I can’t find it now. I’m using my Mac at this point maybe once I get it working I will look at the RPi


(Jim) #506

Not using a RPi, just using my Mac. FTDI usb to serial adapter from Mac directly to MCA-C3. Zones are showing up in smart app now. I’m hearing the clicking of the Russound when I connect to it. But it doesn’t seem like the commands from the app are getting to the controller