[OBSOLETE] Russound Multi-Zone Controller Integration

Sorry should have been more specific. Yes C5 series.

I deleted the app, and made the changes as outlined and i am not getting the devices in smart things to setup now…

I will send a live logging if this helps

65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:57 PM: trace Russound RNET event: index:06, mac:78E7D17F860B, headers:Tk9USUZZIC9ub3RpZnkgSFRUUC8xLjENCkNPTlRFTlQtVFlQRTogYXBwbGljYXRpb24vanNvbg0KQ09OVEVOVC1MRU5HVEg6IDIwNg0Kc3RucC1wbHVnaW46IHJuZXQNCkhvc3Q6IDE5Mi4xNjguNS45OjM5NTAwDQpDb25uZWN0aW9uOiBjbG9zZQ==, body:eyJ0eXBlIjoiZGlzY292ZXIiLCJ6b25lcyI6W3siem9uZSI6MCwibmFtZSI6Ik1hc3RlciBCZWRyb29tIn0seyJ6b25lIjoxLCJuYW1lIjoiS2l0Y2hlbiBhbmQgTGl2aW5nIn0seyJ6b25lIjoyLCJuYW1lIjoiT2ZmaWNlIn0seyJ6b25lIjozLCJuYW1lIjoiRGVjayJ9LHsiem9uZSI6NCwibmFtZSI6Ikd5bSJ9LHsiem9uZSI6NSwibmFtZSI6IkdhcmFnZSJ9XX0=
65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:57 PM: trace Body: [zones:[[name:Master Bedroom, zone:0], [name:Kitchen and Living, zone:1], [name:Office, zone:2], [name:Deck, zone:3], [name:Gym, zone:4], [name:Garage, zone:5]], type:discover]
65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:57 PM: trace Headers: [NOTIFY /notify HTTP/1.1:, CONTENT-TYPE:application/json, CONTENT-LENGTH:206, stnp-plugin:rnet, Host:192.168.5.9, Connection:close]
65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:57 PM: trace SmartThings Node Proxy: index:06, mac:78E7D17F860B, headers:Tk9USUZZIC9ub3RpZnkgSFRUUC8xLjENCkNPTlRFTlQtVFlQRTogYXBwbGljYXRpb24vanNvbg0KQ09OVEVOVC1MRU5HVEg6IDIwNg0Kc3RucC1wbHVnaW46IHJuZXQNCkhvc3Q6IDE5Mi4xNjguNS45OjM5NTAwDQpDb25uZWN0aW9uOiBjbG9zZQ==, body:eyJ0eXBlIjoiZGlzY292ZXIiLCJ6b25lcyI6W3siem9uZSI6MCwibmFtZSI6Ik1hc3RlciBCZWRyb29tIn0seyJ6b25lIjoxLCJuYW1lIjoiS2l0Y2hlbiBhbmQgTGl2aW5nIn0seyJ6b25lIjoyLCJuYW1lIjoiT2ZmaWNlIn0seyJ6b25lIjozLCJuYW1lIjoiRGVjayJ9LHsiem9uZSI6NCwibmFtZSI6Ikd5bSJ9LHsiem9uZSI6NSwibmFtZSI6IkdhcmFnZSJ9XX0=
65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:57 PM: trace Body: null
65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:57 PM: trace Headers: [HTTP/1.1 200 OK:, X-Powered-By:Express, Date:Sun, 23 Apr 2017 22, Connection:keep-alive, Content-Length:0]
65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:57 PM: trace SmartThings Node Proxy: index:18, mac:78E7D17F860B, ip:C0A8053D, port:1F90, requestId:fd83bd14-a88e-4094-8ecc-c58b88c69796, headers:SFRUUC8xLjEgMjAwIE9LDQpYLVBvd2VyZWQtQnk6IEV4cHJlc3MNCkRhdGU6IFN1biwgMjMgQXByIDIwMTcgMjI6MDI6MjkgR01UDQpDb25uZWN0aW9uOiBrZWVwLWFsaXZlDQpDb250ZW50LUxlbmd0aDogMA==, body:
65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:57 PM: trace Body: null
65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:57 PM: trace Headers: [HTTP/1.1 200 OK:, X-Powered-By:Express, Date:Sun, 23 Apr 2017 22, Connection:keep-alive, Content-Length:0]
65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:57 PM: trace SmartThings Node Proxy: index:17, mac:78E7D17F860B, ip:C0A8053D, port:1F90, requestId:ad586a4a-904b-420a-8df4-429308c08841, headers:SFRUUC8xLjEgMjAwIE9LDQpYLVBvd2VyZWQtQnk6IEV4cHJlc3MNCkRhdGU6IFN1biwgMjMgQXByIDIwMTcgMjI6MDI6MjkgR01UDQpDb25uZWN0aW9uOiBrZWVwLWFsaXZlDQpDb250ZW50LUxlbmd0aDogMA==, body:
65786f77-61d6-4dc6-9b38-7e889f54bedb 4:02:25 PM: debug getChildDevices(true), children=0

You may need to update the SmartApp and Device Handler code too if you haven’t… I’ll send you a PM

I reloaded my RaspberryPi this weekend and installed the Node Proxy app. Has anyone found a way to start the node proxy on the Raspberry Pi on startup? I’ve tried using pm2 and that seemed to work, but it seems to hang when trying to refresh. Something else, I setup each zone and renamed them, MPR:Deck to Deck Audio, for example and added “thing” to their specific room on the the SmartThings app. I did this to be able to use my Amazon Echo to turn the zones on/off. My problem is when I go into the app and reconnect they all get reset back to MPR:Deck. Is there a way to remove the “MPR:” and if I can when I re-connect the app will it create new “Things” every time.

Ken

1 Like

Does this support the RIO protocol used by the C Series controllers? I am looking for a solution that does not require using anything but the SmartThings hub.

Couple different options… I just use forever to run it as a background process but that works for me cause the machine never goes down. If you want to make sure it comes back if the RPi reboots, check the following out:

Do you have the latest SmartApp?? It has a toggle button “Discover Zones” which you can turn off after the zones have been installed and configured by you… this will prevent the zones from being deleted/recreated with the “MPR:” label.

No RIO… C Series controller support through SmartThings Node Proxy, speaking RNET through RS232.

So I was able to get nodeproxy to start on boot, 2 steps:
1 - create a scripts in the home folder of the pi user “/home/pi” by
vi nodep.sh
"#!/bin/sh
cd /nodeproxy
node server.js"
Remove the double quotes…

save the file, then chmod 777 nodep.sh
2- Then modify the /etc/rc.local file, you have to do this as root, add this line before the exit 0:

/home/pi/nodep.sh

save the file.

I manually started the nodeproxy just to make sure it was working, then rebooted the RSPi and it worked.

I tried to run the node server.js in the rc.local file, the issue it could not find the config file.

@redloro I don’t think I do, I thought I grabbed the latest/greatest.

Thanks!

1 Like

Is this the latest?

https://raw.githubusercontent.com/redloro/smartthings/master/smartapps/redloro-smartthings/monoprice-sg6z.src/monoprice-sg6z.groovy

It was… realized that while I had added the discovery switch to the Russound SmartApp, I forgot to add it to the Monoprice SmartApp… it’s there now. Update the SmartApp to the latest and you should now be able to reconfigure the SmartApp without recreating your Zones.

Thanks for the update! That worked!

Hello Redloro/Ken,

First off. Let me thank you for all the amazing work. You guys rock! I am trying to install MP6 zone with ST using a RasPi3 and USBToSerial cable.

I installed node js and get a response to nodejs ver command. but having issues with npm
Here is what I get - Please help.

smartthings-nodeproxy $ npm install

> socketwatcher@0.3.0 install /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/socketwatcher
> node-gyp rebuild

make: Entering directory ‘/home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/socketwatcher/build’
_ CXX(target) Release/obj.target/socketwatcher/socket_watcher.o_
…/socket_watcher.cpp: In static member function ‘static void SocketWatcher::New(const Nan::FunctionCallbackInfov8::Value&)’:
…/socket_watcher.cpp:104:49: warning: ‘v8::Localv8::Object v8::Function::NewInstance() const’ is deprecated (declared at /home/pi/.node-gyp/7.10.0/include/node/v8.h:3662): Use maybe version [-Wdeprecated-declarations]
_ info.GetReturnValue().Set(cons->NewInstance());_
_ ^_
_ SOLINK_MODULE(target) Release/obj.target/socketwatcher.node_
_ COPY Release/socketwatcher.node_
make: Leaving directory ‘/home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/socketwatcher/build’

> pcap@2.0.0 install /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/pcap
> node-gyp rebuild

make: Entering directory ‘/home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/pcap/build’
_ CXX(target) Release/obj.target/pcap_binding/pcap_binding.o_
…/pcap_binding.cc:2:23: fatal error: pcap/pcap.h: No such file or directory
_ #include <pcap/pcap.h>_
_ ^_
compilation terminated.
pcap_binding.target.mk:93: recipe for target ‘Release/obj.target/pcap_binding/pcap_binding.o’ failed
make: *** [Release/obj.target/pcap_binding/pcap_binding.o] Error 1
make: Leaving directory ‘/home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/pcap/build’
_gyp ERR! build error _
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
_gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.50-v7+
gyp ERR! command “/usr/bin/nodejs” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/pcap
gyp ERR! node -v v7.10.0
gyp ERR! node-gyp -v v3.5.0
_gyp ERR! not ok _
npm ERR! Linux 4.4.50-v7+
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” "install"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! pcap@2.0.0 install: node-gyp rebuild
npm ERR! Exit status 1
_npm ERR! _
npm ERR! Failed at the pcap@2.0.0 install script ‘node-gyp rebuild’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pcap package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pcap
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls pcap
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
_npm ERR! /home/pi/.npm/logs/2017-05-05T23_47_21_681Z-debug.log

My config looks like this - (somehow its loosing all the indentations in pasting it here)

config.json
{
“mpr6z”: {
“serialPort”: “/dev/usbser”,
“baudRate”: 9600,
“sources”: [
“Sonos”,
“Airplay”,
“Apple TV”,
“Source 4”,
“Source 5”,
“Source 6”
],
“controllerConfig”: {
“type”: “discover”,
“zones”: [
{
“zone”: 11,
“name”: “Family Room”
},
{
“zone”: 12,
“name”: “Kitchen”
},
{
“zone”: 13,
“name”: “Living Room”
},
{
“zone”: 14,
“name”: “Patio”
},
{
“zone”: 15,
“name”: “Dining Room”
},
{
“zone”: 16,
“name”: “Office”
}
]
}
}
}

When I try to run node proxy - this si the log that I get -

2017-05-06T00:00:53.372Z] [stnp] SmartThings Node Proxy listening at http://:::8080
/home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/bindings/bindings.js:91
_ throw err_
_ ^_

Error: Could not locate the bindings file. Tried:
_ → /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/build/serialport.node_
_ → /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/build/Debug/serialport.node_
_ → /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/build/Release/serialport.node_
_ → /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/out/Debug/serialport.node_
_ → /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/Debug/serialport.node_
_ → /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/out/Release/serialport.node_
_ → /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/Release/serialport.node_
_ → /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/build/default/serialport.node_
_ → /home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/compiled/7.10.0/linux/arm/serialport.node_
_ at bindings (/home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/bindings/bindings.js:88:9)_
_ at Object. (/home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/lib/bindings.js:3:35)_
_ at Module.compile (module.js:571:32)
_ at Object.Module.extensions…js (module.js:580:10)
_ at Module.load (module.js:488:32)_
_ at tryModuleLoad (module.js:447:12)_
_ at Function.Module.load (module.js:439:3)
_ at Module.require (module.js:498:17)_
_ at require (internal/module.js:20:19)_
_ at Object. (/home/pi/nodeproxy/smartthings-master/smartthings-nodeproxy/node_modules/serialport/lib/serialport.js:12:25)_
error: Forever detected script exited with code: 1

Hey - did you get the npm install to work without error? The old github package had a bunch of dependencies for other plugins… I just updated it so that it’s much cleaner.

So if you haven’t gotten npm install to work right, just download the new package.json from github and do the following:

  1. Download new package.json and place in your stnp folder (replace the old file)
  2. Run: npm run install:mpr-sg6z
  3. When that finishes successfully… run: npm run start

And you should be good.

1 Like

Redloro - appreciate your response! this worked to get me one step closer! npm install worked good! now getting an error in the run. I suspect that the usbser in my config.json is causing it.

node server.js

[2017-05-06T16:34:31.639Z] [stnp] SmartThings Node Proxy listening at http://:::8080
[2017-05-06T16:34:31.773Z] [stnp] Loaded plugin: mpr-sg6z
[2017-05-06T16:34:31.801Z] [mpr6] MPR6Z connection error: Error: Error: No such file or directory, cannot open /dev/usbser
[2017-05-06T16:34:31.899Z] [mpr6] Detected serial ports: [“/dev/ttyAMA0”,“/dev/ttyS0”,“/dev/ttyUSB0”]

Config.json
{
“mpr6z”: {
“serialPort”: “/dev/usbser”,
“baudRate”: 9600,
“sources”: [
“Sonos”,
“Airplay”,
“Apple TV”,
“Source 4”,
“Source 5”,
“Source 6”
],
“controllerConfig”: {
“type”: “discover”,
“zones”: [
{
“zone”: 11,
“name”: “Family Room”
},
{
“zone”: 12,
“name”: “Kitchen”
},
{
“zone”: 13,
“name”: “Living Room”
},
{
“zone”: 14,
“name”: “Patio”
},
{
“zone”: 15,
“name”: “Dining Room”
},
{
“zone”: 16,
“name”: “Office”
}
]
}
}
}

I am using a USB to Serial cable to connect to the MPR6Z from the RasPi3.

The value in your config.json for serialPort is incorrect… Refer to the last line of the log you shared… Those are the detected ports and the only ones available to use… You need to change the value in your config.json to one of those.

Super That worked! Thanks for pointing it out! Now onto the next step!

Quick question - the groovy indicated at the beginning of this topic is the right one to pick - correct?I think I see the groovy for Smart App int eh link just above - but I do not see a seperate device handler groovy for the MPR6Z. - Should I be using the Russound one?

The link above is for the Russound one… You want the Monoprice one which is one folder up… Look at the SmartApps and Device folders and get the Monoprice ones.

Ok I tried to use the device types from this link that you provided. All seems to be ok and the app is added and shows under smarpapps.
It also seems to connect to NodeProxy as I can see the activity on the console.

But nothing is appearing in the things screen for the amplifier. Am I missing a step?

This is what I see on the console -

node server.js

[2017-05-07T01:38:12.621Z] [stnp] SmartThings Node Proxy listening at http://:::8080
[2017-05-07T01:38:12.722Z] [stnp] Loaded plugin: mpr-sg6z
[2017-05-07T01:38:12.745Z] [mpr6] Connected to MPR6Z: /dev/ttyUSB0
[2017-05-07T01:38:12.847Z] [mpr6] Detected serial ports: [“/dev/ttyAMA0”,“/dev/ttyS0”,“/dev/ttyUSB0”]
[2017-05-07T01:38:30.297Z] [stnp] ::ffff:192.168.1.6 GET /subscribe/192.168.1.6:39500
[2017-05-07T01:39:47.380Z] [stnp] ::ffff:192.168.1.6 GET /subscribe/192.168.1.6:39500
[2017-05-07T01:39:53.397Z] [stnp] ::ffff:192.168.1.6 GET /plugins/mpr-sg6z/discover
[2017-05-07T01:39:53.455Z] [mpr6] Completed controller discovery
[2017-05-07T01:43:03.389Z] [stnp] ::ffff:192.168.1.6 GET /subscribe/192.168.1.6:39500
[2017-05-07T01:43:08.841Z] [stnp] ::ffff:192.168.1.6 GET /plugins/mpr-sg6z/discover
[2017-05-07T01:43:08.850Z] [mpr6] Completed controller discovery
[2017-05-07T01:54:22.184Z] [stnp] ::ffff:192.168.1.6 GET /subscribe/192.168.1.6:39500
[2017-05-07T01:59:44.040Z] [stnp] ::ffff:192.168.1.6 GET /subscribe/192.168.1.6:39500
[2017-05-07T01:59:49.609Z] [stnp] ::ffff:192.168.1.6 GET /plugins/mpr-sg6z/discover
[2017-05-07T01:59:49.614Z] [mpr6] Completed controller discovery
[2017-05-07T02:39:05.931Z] [stnp] ::ffff:192.168.1.6 GET /subscribe/192.168.1.6:39500
[2017-05-07T02:39:10.697Z] [stnp] ::ffff:192.168.1.6 GET /plugins/mpr-sg6z/discover
[2017-05-07T02:39:10.702Z] [mpr6] Completed controller discovery