SmartThings Community

[RELEASE] Russound Multi-Zone Controller Integration

smartapp_av
russound
dth_av

(David Coburn) #347

First off I would like to thank everyone that has contributed to this topic. I have two Monprice MPR-6ZHMAUT amps. I’ve managed to get everything set up and working with an RPi, and even managed to get control with Alexa. The problem I’m having is I cannot get control of the second controller (Zones 7-12). I’ve tried multiple ways of writing the config.jason file. Does anyone have a two controller setup with the Monoprice amps, that would be willing to share their config.json file to assist me? Thanks again.


(Steve Davies) #348

Very new Smartthings user, but experienced Russound tinkerer attempting to migrate control of my CAV66 from OpenRemote to Smartthings. I’ve created the SmartApp, Device Handler, Node, etc. but I’m struggling to get it all to work on a Windows 10 box.

I can see that the Com port is connected, but that’s where the challenges begin. Greatly appreciate any suggestions you may have.

rnet plugin loads, detects serial port and connects to RNET on COM4, then receive the following errors:
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! smartthings-nodeproxy@1.0.0 start script.

config.json
{
“port”: 8088,
“authCode”: “0114”,

"rnet": {
    "c-series": false,
    "serialPort": "COM4",
    "sources": [
        "Music 1",
        "JRiver 2",
        "JRiver 3",
        "Source 4",
        "Source 5",
        "Source 6"
    ],
    "controllerConfig": {
        "type": "discover",
        "controllers": [{
                "controller": 0,
                "zones": [
                    {"zone": 0, "name": "Kitchen"},
                    {"zone": 1, "name": "Den"},
                    {"zone": 2, "name": "Entrance"},
                    {"zone": 3, "name": "Bedroom"},
                    {"zone": 4, "name": "Bathroom"},
                    {"zone": 5, "name": "Patio"}
                ]
            }]
    }
}

}

Thank you!


(Steve Davies) #349

Log filed below:
1 verbose cli ‘run’,
1 verbose cli ‘start’ ]
2 info using npm@5.4.2
3 info using node@v8.7.0
4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
5 info lifecycle smartthings-nodeproxy@1.0.0~prestart: smartthings-nodeproxy@1.0.0
6 info lifecycle smartthings-nodeproxy@1.0.0~start: smartthings-nodeproxy@1.0.0
7 verbose lifecycle smartthings-nodeproxy@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle smartthings-nodeproxy@1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\smartthings-nodeproxy\node_modules.bin;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Users\HTPC\AppData\Local\Smartbar\Application;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\EaseUS\Todo Backup\bin;C:\Program Files\nodejs;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Users\HTPC\AppData\Local\Microsoft\WindowsApps;C:\Users\HTPC\AppData\Roaming\npm
9 verbose lifecycle smartthings-nodeproxy@1.0.0~start: CWD: C:\smartthings-nodeproxy
10 silly lifecycle smartthings-nodeproxy@1.0.0~start: Args: [ ‘/d /s /c’, ‘node server.js’ ]
11 silly lifecycle smartthings-nodeproxy@1.0.0~start: Returned: code: 3221225477 signal: null
12 info lifecycle smartthings-nodeproxy@1.0.0~start: Failed to exec start script
13 verbose stack Error: smartthings-nodeproxy@1.0.0 start: node server.js
13 verbose stack Exit status 3221225477
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:927:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid smartthings-nodeproxy@1.0.0
15 verbose cwd C:\smartthings-nodeproxy
16 verbose Windows_NT 10.0.15063
17 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” "start"
18 verbose node v8.7.0
19 verbose npm v5.4.2
20 error code ELIFECYCLE
21 error errno 3221225477
22 error smartthings-nodeproxy@1.0.0 start: node server.js
22 error Exit status 3221225477
23 error Failed at the smartthings-nodeproxy@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225477, true ]


#350

What was the output of running npm run install:rnet


#351

Can you share your config.json? You should have two controller sections under controllers.


(David Coburn) #352

After seven hours and about 100 different config.json tests I did figure it out. In case anyone else runs into this issue I’ll post the config.json setup that worked for me. I appreciate your response.

On a separate note, I’m using SmartThings along with Alexa but can’t get Alexa to manage the volume of the zones. I noticed that when the zones are imported to Alexa it does not show up as a dimable device. I am also using the Yamaha Amp integration App you wrote, (Thanks again for this one) and those show up as a dimable device which I can control the volume through Alexa. I haven’t had the time to compare the codes to see if I can add the dimable feature into the Monoprice amp zones yet. Wondering since you wrote it would you be able to direct me how to do it?

redloro, thank you again for contributing.

{
“port”: 8080,
“authCode”: “XXXX”,

“mpr6z”: {
“serialPort”: “/dev/ttyUSB0”,
“baudRate”: 9600,
“sources”: [
“Not Assigned”,
“Not Assigned”,
“Music 1”,
“Music 2”,
“Music 3”,
“Music 4”
],
“controllerConfig”: {
“type”: “discover”,
“controllers”: [
{“controller”: 1,
“zones”: [
{“zone”: 1, “name”: “Bathroom”},
{“zone”: 2, “name”: “Craft Room”},
{“zone”: 3, “name”: “Outside”},
{“zone”: 4, “name”: “Garage”},
{“zone”: 5, “name”: “Room 1”},
{“zone”: 6, “name”: “Room 2”}
]
},
{“controller”: 2,
“zones”: [
{“zone”: 1, “name”: “Bathroom 2”},
{“zone”: 2, “name”: “Bathroom 3”},
{“zone”: 3, “name”: “Bathroom 4”},
{“zone”: 4, “name”: “Room 4”},
{“zone”: 5, “name”: “Living Room”},
{“zone”: 6, “name”: “Upstairs”}
]
}
]
}
},

“notify”: {
“address”: “192.168.1.222”,
“port”: “39500”
}
}


(Steve Davies) #353


#354

Check the latest device handler code from GitHub… added one line which should allow you to control volume from Alexa.


#355

What happens if you run?

node server.js

(Steve Davies) #356

There is only server.js in the smartthings-nodeproxy folder. It generates an error:
Line: 19
Char: 1
Error: Object expected
Code: 800A138F
Source Microsoft JScript runtime error

As far as I can tell, this error occurs on the first line of the code - var express


#357

Something is not right… you shouldn’t see anything about Microsoft JScript.

Can you make sure that you have NodeJS installed from here: https://nodejs.org/en/download/current/

And that you can type node -v from the command line and get a response.


(Steve Davies) #358

Reinstalled and ran node -v as suggested. It executes, but results in some errors:

Following this, I re-executed server.js and resulted in the same error as before…


#359

Not sure what is going on here cause I don’t have a Windows machine, but Node is not installed right. What version of Windows do you have and can you uninstall anything Node and then reinstall from the link provided above? Be sure to install NodeJS version 7 or 8. When you run

C:\> node -v

from the command line it should return the version of NodeJS installed. What you are seeing I have no clue… :slight_smile:


(Steve Davies) #360

Well I typed too fast - I can get the node -v to reply with v.8.8. But still no luck with npm run start…

Anyone with a Win10 box, let me know if you have any thoughts!

Thanks.


#361

How did you get node -v to work? Use that same method and run node server.js … assuming you can run node from the command line, it should start right up.


#362

Actually just realized that the npm script probably will not run on Windows… run this from the directory where STNP is installed (ie. where server.js is located)…

npm install
npm install serialport
node server.js  -OR-  npm run start

(Steve Davies) #363

Some success. npm run start gives the same errors as before. node server.js executes but terminates after connect to COM4:

Perhaps its an issue with the USB to Serial cable? Seems odd though in that I can interact with the Russound with their PC Powertools program along with Openremote.


#364

Hmmm that’s weird… I’ve never seen it die just like that. Let’s try a couple things…

  1. Run the command line as Administrator
  2. Make sure that no other application or process is using COM4 and retry

(Steve Davies) #365

Ran as administrator and the same result - terminated after COM4.


#366

And nothing else is attached to COM4? Try COM1 for kicks??