Custom Widget: Russound Controller

Thanks for getting back to me on this. I wish I had the know how, but still taking baby steps.

I am controlling my CAM6 Rnet amplifiers with a custom rnet library written in C#. I assume the code would need to be converted to Java. The C# code is fairly robust with dependency injection and Owin and whatnot. Iā€™m not sure how that would impact the ease of conversion. I think the core logic can be easily stripeed of all the utilities if needed for a binding. If anyone has the necessary Java and C# knowledge and would like to discuss the app with me, Iā€™d be happy to share what I know. I didnā€™t write the code, but Iā€™m somewhat familiar with it.

Tim, those widgets look amazing.

I have an rnet binding for russound I created for openhab 1. I use it with openhab 2 currently. It really only supports power, volume and source at this time.

I will take a look and see if I can migrate the rnet protocol handling into this binding.

here are example items:

Switch RussoundAudioGreatRoom_power "Gt Room Power [%s]" 	(gAudio_GreatRoom,AudioZonesMain,GroupSwitch)	{russound="0/5/power"}
Dimmer RussoundAudioGreatRoom_volume	"Volume [%d%%]"	(gAudio_GreatRoom,AudioZonesMain)	{russound="0/5/volume"}
Number RussoundAudio_GreatRoom_source "Source Id [%.0f]"	(gAudio_GreatRoom)	{russound="0/5/source"}

and config, I use ser2sock to enable remote access to a PI connected to my resound receivers, but serial port should work too. (services/russound.cfg)

host=192.168.1.30
port=7777

The issue really isnā€™t the protocol as I have the full protocol documentation for RNET - the issue really is my time in doing it. RNET functionality is actually a subset of RIO functionality and much of the work that Iā€™ve done could be copied and adapted. The biggest issues (code wise) are:

  1. SMS3 - totally different beast. Uses XML protocol (not RNET or RIO) and I donā€™t have an SMS3 to test with.
  2. CAV - has the video RNET protocol that nothing else has (again, I donā€™t have it to test with).
  3. Weā€™d need a different widget for HABPANEL as this one supports stuff in RIO that doesnā€™t exist in RNET (or exists in a different way). Youā€™d almost need a simplified version of it.

The MCA does support RNET and I could test with it - but couldnā€™t do SMS3 or CAV functionality.

If you feel up to the task, start reviewing all the protocol documentation (let me know if you donā€™t have it - I can send you a copy). My latest changes are still pending review by Kai (although I expect it to be merged sometime this week) - so donā€™t bother looking at the existing code yet.

Note: the other option is to wait until I have the Sony binding in testing state - then Iā€™d have time to start looking into RNET myself (although Iā€™m good with doing joint development as well!).

Tim

Just as a side interest - could you all state which product you have and any source equipment attached to it (like SMS, etc)ā€¦

Ok, so there seems to be a way to get this to work for RNET.

I have a Russound CAV6.6 multizone system. I assume these are mostly used for audio, not much video (well at least i dont use video). I sadly am unable to code, but am happy to test at your will.

I am running on a Raspberry Pi, and really only use Airplay right now to send audio - eventually want to stream from Pi.

craigh,

Once i go over some tutorials on opneHAB, i will hope to try out your binding.

Can you tell me, how do you communicate from the Pi to Russond RS-232? Do you use USB to Serial cable with some code to allow them to speak? Or do you use say a IP2SL (Global iTach) outside of the Pi? I would like to use USB to Serial, but had issues when trying HASS so giving a shot here.

Thanks

Tim,

Couple things. I have two CAA66s chained together.

I connect a pi with a usb->serial into the first CAA66. Then I use ser2sock to expose the serial port via tcp. My russounds are connected to a PI which is NOT running openhab. This allowed me to connect via your tcp connection already in the existing code.

Now, before you mentioned that you had a PR in with changes, I decided to take a look and see if I could hook in RNET.

Here is a commit on my GitHub

The RNET protocol is via bytes, not string as for RIO. So, basically I broke out the ProcessReader class, and parameterized it to handle either Byte[] or String. Then I dropped in my byte processing code I had from my version 1.x binding. I have those RNET messages now being passed on to the dispatcher. I donā€™t have RIO so I canā€™t tell if I may have broken something while making those changes.

If you like, maybe take a look and see if you think it is going in the correct direction, or feel free to give suggestions.

You look like you are doing what I envisioned for RNET! Two notes:

  1. You really need to wait until the PR goes through (should be any day [including today but probably overnight unless I messed up a rebase]). Some of those classes changed quite a bit (mainly the session and session listener ones). You may be better off dropping your code and recreating from the newest code rather than trying to figure out how to merge them.
  2. Iā€™d really think about defining different session implementations for different transports. I could see two different ones - direct/native serial and ip2serial that would be really handy. If you donā€™t have an ip2serial, I could test on my system (I do have one [not connected to russound but I can do that for testing]).

Note: you can find my tree at tmrobert8/openhab2-addonsā€¦

Feel free to ask me any questions about the codeā€¦

Note: can we move this conversation over to a new thread in the bindings forum (maybe a new ā€œRussound RNETā€ rather than my old ā€œRussound RIOā€ one)? This subforum is for habpanelā€¦

Tim

Hi @tmrobert8, when this widget (which looks awesome by the way, looks like you invested a lot of time in this :astonished:) is ready Iā€™d like to help you package it as an installable bundle like this one, itā€™s definitely a good candidate for the new feature :wink:
Let me know.

Wow - not sure how I missed that but that would be excellant! Widget is pretty much done - just waiting for the PR for the binding to be merged.

1 Like

Looks awesome! Something at this level for Squeezebox would be pretty cool.

craigh,

I dont want to stray too much, but i have not found much on using ser2sock on OH2, to connect from a Pi (using USB) to serial device (Russound with RS-232). Would you be able to give a short tutorial, from what packages/bindings are needed and config required? I could then try to test it with Packet Sender, or another method.

Thank you.
TD

Would you mind posting this on the Russound RNET thread rather than the widget thread? Thanks
Tim

I am wondering if someone could post screenshots of their Russound Widget Settings (within the HABPanel Interface) as well as relevant items file. I am assuming the Zone Channel Name is incorrect in the widget or the underlying item is incorrect.

I have Russound communicating to OpenHab through other widgets.

@Natalie_Nielsen

Please check out https://github.com/tmrobert8/RussoundHabPanel

The readme should describe what channel are needed and the naming format of the channels. Let me know if that is not helpful or does not solve your issue.

Tim

1 Like

Hi Tim,

Iā€™m new to openHAB. Iā€™m trying to get this setup but Iā€™m clearly doing something wrong. Iā€™ve added you binding and it found my xZONE4ā€™s so I added one of them and them linked all the channels. Iā€™m trying to get this custom widget up and running. I imported the widget from your github. What exactly do I do next? Iā€™ve tried messing with the settings but Iā€™m not really sure what to do.

@grimmace92

The panel requires the channels to be named in a very specific manner. Look at the readme for details on the naming. Once you have everything named properly - all you do is specify the zone name channel in the habpanel setup for the widget and it should link everything up for you.

BTW - Iā€™ve not tried this with xZones (all I have are my MCAs) so I donā€™t know if they support everything that is required for the panel. But give it a try and see what happensā€¦

Great widget and app. Saved my hours and hours. thanks so much for sharing. Good instructions too. that makes such a difference for those that arenā€™t experts.

I got the last month more and more issues with frozen keypads or controller - I was reading that some people prefer to use RS232 instead of IP connection, somebody can confirm that? And how is it possible to use the RS232 with the C5? I donĀ“t see any switches to setup the binding via RS232