This page last changed on Dec 26, 2014 by franka.

Hi all,

i am struggling to get the OpenRemote SW to work with my Russound system. Here is my setup:

  • Using RS232 directly (straight through cable, 19200 baud rate) with a Raspberry Pi as controller
  • I have a level shifter board and a straight through cable between the Raspberry and the CAS
  • On the Russound device i have set the "CPU mode switch" to "Update" ... the documentation of CAS44 suggest that "run" is used for SW updates
  • I installed native RXTX libraries on the controller
  • Running with /dev/ttyS0 that links to /dev/ttyAMA0 to work around "port not found" issue caused by access rights
  • Controller version 2.1.0_SNAPSHOT-2013-06-17
  • Remote is a iPhone with latest app from the AppStore
  • Simple UI design, i started with POWER-ON/OFF for all 4 zones and loudness control for zone 1
  • I used the online designer and synchronized the controller.xml through the controller web interface

From what i see the Russound system does not react at all to input on the remote.

I debugged for 3 days now, here is what i know:

  • The serial interface works, i tested with loopback and minicom
  • The remote connects to the controller, when i switch on the remote app i see some logs
  • The controller initiates transfers on the RS232 after hitting a remote UI button (I can see the TX lamp on the serial level shifter board)
  • I cannot observer the RX lamp, so i don't know about that
  • I have only one ERROR in my logs (related to VeraClient "Host name may not be null") ... i read in some forum it should not matter for me
  • I have some DEBUG messages in dev.log which i hope are okay "A switch sensor (Name = '<some zone command>, ID=...) has an incomplete <state> element mapping, the value attribute is missing in <state name = on/> ... same message once more with name = off at the end.

Once everything is up and i start to connect from the iPhone, here is what i see in the dev.log

...
2014-12-26 20:21:14,586 INFO main: Registered sensor : Range Sensor (Name = 'Zone1 TurnOnVolume', ID = '5846168', Min: 0, Max: 100)
2014-12-26 20:21:14,589 INFO main: Registered sensor : Range Sensor (Name = 'Zone1 Treble Level', ID = '5846169', Min: -10, Max: 10)
2014-12-26 20:21:14,593 INFO main: Registered sensor : Range Sensor (Name = 'Zone1 Source', ID = '5846170', Min: -10, Max: 10)
2014-12-26 20:21:14,611 INFO main: Registered sensor : Switch Sensor (Name = 'Zone1 Loudness', ID = '5846171')
2014-12-26 20:21:14,683 INFO main: Startup complete.
2014-12-26 20:21:14,688 INFO main: Controller Definition File Watcher for Default Deployer started.
2014-12-26 20:21:35,615 INFO HTTP\-Thread\-1: Querying changed state from ChangedStatus table...
2014-12-26 20:21:35,621 INFO HTTP\-Thread\-1: Not Found: [device => FFFFFFFFC798DA809EE34377B4CCBD77ABCB37CC, sensorIDs => 5846167, 5846172, 5846180, 5846188, 5846196] in ChangedStatus table.
2014-12-26 20:21:35,627 INFO HTTP\-Thread\-1: ChangedStatusRecord:FFFFFFFFC798DA809EE34377B4CCBD77ABCB37CC-5846167, 5846172, 5846180, 5846188, 5846196 sensorID:5846167, 5846172, 5846180, 5846188, 5846196 statusChangedSensorID:[]Waiting...
2014-12-26 20:22:25,635 INFO HTTP\-Thread\-1: Had timeout for waiting status change.
2014-12-26 20:22:25,640 INFO HTTP\-Thread\-1: Finished polling at 2014-12-26 20:22:25

2014-12-26 20:22:30,711 INFO HTTP\-Thread\-1: Querying changed state from ChangedStatus table...
2014-12-26 20:22:30,729 INFO HTTP\-Thread\-1: Found: [device => FFFFFFFFC798DA809EE34377B4CCBD77ABCB37CC, sensorIDs => 5846167, 5846172, 5846180, 5846188, 5846196] in ChangedStatus table.
2014-12-26 20:22:30,731 INFO HTTP\-Thread\-1: ChangedStatusRecord:FFFFFFFFC798DA809EE34377B4CCBD77ABCB37CC-5846167, 5846172, 5846180, 5846188, 5846196 sensorID:5846167, 5846172, 5846180, 5846188, 5846196 statusChangedSensorID:[]Waiting...
2014-12-26 20:23:20,733 INFO HTTP\-Thread\-1: Had timeout for waiting status change.
2014-12-26 20:23:20,736 INFO HTTP\-Thread\-1: Finished polling at 2014-12-26 20:23:20

2014-12-26 20:23:20,858 INFO HTTP\-Thread\-1: Querying changed state from ChangedStatus table...
2014-12-26 20:23:20,865 INFO HTTP\-Thread\-1: Found: [device => FFFFFFFFC798DA809EE34377B4CCBD77ABCB37CC, sensorIDs => 5846167, 5846172, 5846180, 5846188, 5846196] in ChangedStatus table.
2014-12-26 20:23:20,868 INFO HTTP\-Thread\-1: ChangedStatusRecord:FFFFFFFFC798DA809EE34377B4CCBD77ABCB37CC-5846167, 5846172, 5846180, 5846188, 5846196 sensorID:5846167, 5846172, 5846180, 5846188, 5846196 statusChangedSensorID:[]Waiting...
...
<NO other MESSAGEs>

I am happy to try any suggestion i receive as i run out of options on my side.

Thanks,

Frank

Did you check out http://svn.code.sf.net/p/openremote/code/tags/snapshot/Controller_2_1_0_FM_SNAPSHOT-20130617 ?

Can you provide you Russound settings from the file config.properties?

I suggest you fix this Vera problem. At least I did as I merged with Controller_2_1_0_FM_SNAPSHOT-20130617. It appears that without it the Vera thread starts with bad configuration. The result is an error with every iteration of the main loop. Perhaps your Rasp can't cope.

My solution is found on svn+ssh://tosterdahl@svn.code.sf.net/p/openremote/code/workspace/toesterdahl/Controller_2_1_0_Integration, revision 9985.

As a not to any dev's on the thread. I think we need some common minimum standards for the behaviour of protocol implementations. Two tests that would apply to this case is:

  • Do some validation of the protocol configuration. If configuration is obviously not valid, exit with a informative message. Do not start any threads.
  • In particular if there is no configuration at all - exit nicely.

Cheers,
Torbjörn

Posted by toesterdahl at Dec 27, 2014 09:34

Hi Torbjörn,

thanks for the quick reply (my config is further down in this reply). So far I used this package from the downloads page (OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17.zip). I cannot find any similar zip file with the FM in the name.

  • Torbjörn, is it worth trying this one (OpenRemote-Controller-2.1.0_FM_SNAPSHOT-2013-07-18). Its the closest to what you suggest?
  • How can i avoid the Vera issue (is there anything i can read about it)? Can i remove all the none Russound "Plug-ins"?
  • the only "hook" i found is the config section in the controller.xml. It is generated by the designer and i did not touch it so far.
  • Here is my current config section.

<config>
<property name="controller.roundrobin.multicast.port" value="10000" />
<property name="controller.roundrobin.tcpserver.port" value="20000" />
<property name="controller.groupname" value="floor20" />
<property name="multicast.port" value="3333" />
<property name="controller.groupmember.autodetect.on" value="true" />
<property name="amx_ni.port" value="50000" />
<property name="zwave.commLayer" value="" />
<property name="copy.lircd.conf.on" value="true" />
<property name="irsend.path" value="/usr/local/bin/irsend" />
<property name="controller.applicationname" value="controller" />
<property name="multicast.address" value="224.0.1.100" />
<property name="Macro.IR.Execution.Delay" value="500" />
<property name="controller.roundrobin.multicast.address" value="224.0.1.200" />
<property name="zwave.comPort" value="" />
<property name="zwave.pad.port" value="7876" />
<property name="lutron_homeworks.password" value="openremote" />
<property name="lagarto_network.broadcast" value="tcp://127.0.0.1:5001" />
<property name="lircd.conf.path" value="/etc/lircd.conf" />
<property name="lutron_homeworks.port" value="23" />
<property name="lutron_homeworks.address" value="192.168.1.1" />
<property name="zwave.pad.host" value="localhost" />
<property name="lutron_homeworks.username" value="openremote" />
<property name="webapp.port" value="8080" />
<property name="protocol.zwave.classname" value="org.openremote.controller.protocol.zwave.ZWaveCommandBuilder" />
<property name="resource.upload.enable" value="true" />
<property name="amx_ni.address" value="192.168.1.1" />
<property name="enocean.commLayer" value="" />
<property name="enocean.serialProtocol" value="ESP3" />
<property name="enocean.comPort" value="" />
<property name="irsend.path" value="/usr/local/bin/irsend" />
<property name="controller.applicationname" value="controller" />
<property name="multicast.address" value="224.0.1.100" />
<property name="Macro.IR.Execution.Delay" value="500" />
<property name="controller.roundrobin.multicast.address" value="224.0.1.200" />
<property name="zwave.comPort" value="" />
<property name="zwave.pad.port" value="7876" />
<property name="lutron_homeworks.password" value="openremote" />
<property name="lagarto_network.broadcast" value="tcp://127.0.0.1:5001" />
<property name="lircd.conf.path" value="/etc/lircd.conf" />
<property name="lutron_homeworks.port" value="23" />
<property name="lutron_homeworks.address" value="192.168.1.1" />
<property name="zwave.pad.host" value="localhost" />
<property name="lutron_homeworks.username" value="openremote" />
<property name="webapp.port" value="8080" />
<property name="protocol.zwave.classname" value="org.openremote.controller.protocol.zwave.ZWaveCommandBuilder" />
<property name="resource.upload.enable" value="true" />
<property name="amx_ni.address" value="192.168.1.1" />
<property name="enocean.commLayer" value="" />
<property name="enocean.serialProtocol" value="ESP3" />
<property name="enocean.comPort" value="" />
<property name="vera.address" value="" />
<property name="domintell.port" value="17481" />
<property name="protocol.vera.classname" value="org.openremote.controller.protocol.vera.VeraCommandBuilder" />
<property name="domintell.address" value="192.168.1.1" />
</config>

Here is some additional data:

  • the startup seems to continue without issues after Vera error

DEBUG 2014-12-26 20:45:37,763 : Deployer 'Default Deployer' initialized.
DEBUG 2014-12-26 20:45:39,499 : Runtime object model has not been initialized. Using default configuration only.
DEBUG 2014-12-26 20:45:39,666 : Runtime object model has not been initialized. Using default configuration only.
DEBUG 2014-12-26 20:45:39,689 : Runtime object model has not been initialized. Using default configuration only.
DEBUG 2014-12-26 20:45:39,769 : Runtime object model has not been initialized. Using default configuration only.
INFO 2014-12-26 20:45:39,833 :

--------------------------------------------------------------------

DEPLOYING NEW CONTROLLER RUNTIME...

--------------------------------------------------------------------

!!!!!! <Vera error comes here> !!!!

DEBUG 2014-12-26 20:45:45,549 : Created object model for Command( ID = 17, Type = russound, Properties :

Unknown macro: {name=Zone1 Power (OFF), command=POWER_OFF, controller=1, zone=1}
).
DEBUG 2014-12-26 20:45:45,586 : Created object model for Command( ID = 18, Type = russound, Properties :
Unknown macro: {name=Zone1 Treble Level (SET), command=SET_TREBLE_LEVEL, controller=1, zone=1}
).
...

INFO 2014-12-26 20:45:59,833 : Registered sensor : Switch Sensor (Name = 'Zone1 Loudness', ID = '5846171')
INFO 2014-12-26 20:45:59,916 : Startup complete.
INFO 2014-12-26 20:45:59,921 : Controller Definition File Watcher for Default Deployer started.

My configuration file looks like this (i removed all comments):

resource.upload.allowed=true
resource.path=/home/pi/openremote/OpenRemote-Controller-2.1.0_SNAPSHOT-2013-06-17/webapps/controller

irsend.path=/usr/local/bin/irsend

lircd.conf.path=/etc/lircd.conf

copy.lircd.conf.on=true

com.port=/dev/ttyS0

knx.ip.interface.hostname=
knx.ip.interface.port=3671

isy99.hostname=192.168.41.12
isy99.username=admin
isy99.password=admin

samsungTV.interface.ip=192.168.100.15

russound.ip=
russound.port=1234
russound.keypadId=
russound.serialDevice=/dev/ttyS0
russound.statusPollingInterval=

hsc40.interface.ip=192.168.100.14
hsc40.interface.port=1001

lagarto_network.broadcast=tcp://127.0.0.1:5001

webapp.ip=
webapp.port=8080

Macro.IR.Execution.Delay=500

multicast.address=224.0.1.100
multicast.port=3333

controller.applicationname=controller
beehive.REST.Root.Url = http://beehive.openremote.org/3.0/alpha5/rest/
controller.performBeehiveSyncing=false
beehiveAccountService.REST.Root.Url = http://localhost:8080/uas/rest/
beehiveDeviceDiscoveryService.REST.Root.Url = http://localhost:8080/dds/rest/

Bye,

Frank

Posted by franka at Dec 27, 2014 11:49

Hi again ...

the "unknown macro" text comes in my message as Wiki seems to try to interpret the bracket. No such text is in my real log.

Frank

Posted by franka at Dec 27, 2014 11:51

In the configuration.xml config section above you have the properties 'protocol.vera.classname' and 'vera.adress'. You could try removing those, it should disable Vera completely.

You could also try setting the 'russound.keypadId' property to the value 70 (the dafault value). There was once a bug that the protocol did not start if this property was not set. I seems that it was resolved in the build you are using, but who knows.

Did you enable russound logging in log4j.xml? You can add logging to an existing appender using the following line

log4j.logger.OpenRemote.Controller.protocol.russound = ALL, openremote-console, file.

If you enable logging but you see no response at all, then I would assume that a vital thread is locked-up. Most people would attach a debugger then to figure out which thread. Depending on your JVM you can also send it a signal to generate a thread-dump, where you should see what each tread is doing.

Posted by toesterdahl at Dec 27, 2014 13:32

Hi again,

thanks again.

  • I disabled the vera related entries and the startup errors goes away
  • I enabled the logging and see the following (but still no reaction by the russound device)
  • can i enable messages from the RX/TX (serial) driver somehow?

2014-12-27 13:45:53,871 INFO HTTP\-Thread\-1: Had timeout for waiting status change.
2014-12-27 13:45:53,886 INFO HTTP\-Thread\-1: Finished polling at 2014-12-27 13:45:53

2014-12-27 13:45:53,991 INFO HTTP\-Thread\-1: Querying changed state from ChangedStatus table...
2014-12-27 13:45:54,013 INFO HTTP\-Thread\-1: Found: [device => FFFFFFFFC798DA809EE34377B4CCBD77ABCB37CC, sensorIDs => 5846167, 5846172, 5846180, 5846188, 5846196] in ChangedStatus table.
2014-12-27 13:45:54,016 INFO HTTP\-Thread\-1: ChangedStatusRecord:FFFFFFFFC798DA809EE34377B4CCBD77ABCB37CC-5846167, 5846172, 5846180, 5846188, 5846196 sensorID:5846167, 5846172, 5846180, 5846188, 5846196 statusChangedSensorID:[]Waiting...
2014-12-27 13:46:09,067 DEBUG HTTP\-Thread\-2: Building Russound command
2014-12-27 13:46:09,067 DEBUG HTTP\-Thread\-2: Building Russound command
2014-12-27 13:46:09,070 DEBUG HTTP\-Thread\-2: Russound command: command = POWER_ON
2014-12-27 13:46:09,070 DEBUG HTTP\-Thread\-2: Russound command: command = POWER_ON
2014-12-27 13:46:09,073 DEBUG HTTP\-Thread\-2: Russound command: controller = 1
2014-12-27 13:46:09,073 DEBUG HTTP\-Thread\-2: Russound command: controller = 1
2014-12-27 13:46:09,076 DEBUG HTTP\-Thread\-2: Russound command: zone = 4
2014-12-27 13:46:09,076 DEBUG HTTP\-Thread\-2: Russound command: zone = 4
2014-12-27 13:46:09,079 DEBUG HTTP\-Thread\-2: Russound command created successfully
2014-12-27 13:46:09,079 DEBUG HTTP\-Thread\-2: Russound command created successfully

There is still no reaction from the Russound device, e.g. switching on a zone. I also tried to switch RX/TX cabling (just in case), but it did not change the behavior.

Any more ideas? Is there a known good controller.xml file for Russound i could try out, to remove a possible issue with that file?

Thanks,

Frank

Posted by franka at Dec 27, 2014 13:53

In that case you know it is running. It is creating messages, messages that it would attempt to write to the serial device. With this version the message is not dumped so we do not expect any more logging. If there were problems in writing to the serial device there should be an error.

I think the software is ok then and you need to look at the rest of you setup. Things that come to mind,

  • What is this setup with "/dev/ttyS0 that links to /dev/ttyAMA0"?.
  • Run switch versus Update. 'Run' seems like the logical option.
  • I am so far not aware of anyone using the CAS-44 Russound controller. According the Russound doc's it should support the same serial protocol, and the SET ZONE ON command.
Posted by toesterdahl at Dec 27, 2014 14:35

Hi Torbjörn,

thanks again. I did check the serial port again. I think below shows the required setup, right?

pi@raspberrypi ~ $ stty -F /dev/ttyS0 -a
speed 19200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 0; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke

Do you know about any diagnostic SW from Russound? Something i can use to send commands from the UNIX shell?

P.S.: I have not found an option to set the serial port property "start bit = 1".

Thanks again,

Frank

Posted by franka at Dec 27, 2014 15:01

In order to get some information out of the CAS you can build of my Integration workspace. You will get hex dumps of all messages - also outgoing. It should indicate if the CAS have accepted the message or not.

The messages are binary which is a bit of shame. With ascii messages it is quite a lot easier to try things out using Minicom or Cutecom.

Posted by toesterdahl at Dec 27, 2014 17:17

Hi Torbjörn,

i finally got it to work. It helped to understand that the controller SW is working.

>> The trick is "NOT" to use a straight through cabling when connecting Russound and the Raspberrry through the 3.3-to-5V level shifter board I used.

The RS 232 level shifter board output (female D9) must be connected with a null-modem connection to the input of the Russound D9.

>> And the "CPU update" switch on the Russound must be set to "Run" even though the Russound docs mention this setting for FW updates.

Thanks again ... now i can start creating the iPhone UI.

Bye,

Frank

Posted by franka at Dec 27, 2014 18:47
Document generated by Confluence on Jun 05, 2016 09:34