Custom Widget: Russound Controller

widget
widgetgallery
Tags: #<Tag:0x00007f6ce8853bb0> #<Tag:0x00007f6ce88539f8>

(Tim Roberts) #1

This is more of an application than a widget but here is the official Russound widget (strictly to be used with the Russound Binding) to control any Russound MCA or X system (any RIO based system atleast).

Screen Shots

Supports all russound source types (AM/FM Tuners, Airplay, Spotify, Pandora, Sirius XM, TuneIn, vTuner, DLNA and USB). All images below have been reduced to make this post easier to read…

The following is an example of how the AM/FM Tuner and Pandora looks like (note: the other streaming services are similar to Pandora - just different options presented):

   

The widget also supports a horizontal layout (instead of a vertical layout):

   

Russound controls are built in by pressing/clicking on various icons (source selection, zone selection, favorite management, bank/preset management). Note: the widget can be locked to a specific zone (if you have a dedicated pad for a zone):
         

And finally - the widget supports all the DYNAMIC UI pages (media management functions) of Russound - allowing you to interact with the Russound system for source setup/management. The following are examples of the context menu (for Pandora) and the general session menu

   

and the follow are examples of the dynamic information and input pages

   

All panels are responsive (up to a limit) to the size of the container - allowing you to fully customize how big or small the widget is (mainly increases/decreases the image size).

Channels

This widget deals with too many channels to individually setup each one of them in the settings. Instead, you will specify the zone name channel and the other channels are inferred from that channel. Specifically, the channels names must use the following formats:

  • System Channels: russound_rio_(sysId)_(name)
  • Source Channels: russound_source_(sysId)_(sourceId)_(name)
  • Controller Channels: russound_controller_(sysId)_(controllerId)_(name)
  • Zone Channels: russound_zone_(sysId)_(controllerId)_(zoneId)_(name)

Example: the ‘bass’ channel on zone 6, controller 2, system id 192168124 would be: russound_zone_192168124_2_6_bass

If you autodiscovered the device and have ‘Simple Mode’ linking set to on - the channels will be named properly to begin with

The following table lists what channels should be linked to fully support the widget:

  • System: lang, allon, sources
  • Controller: zones
  • Source (tuner): name, type, channel, channelname, artistname, albumname, songname, mode, programservicename, radiotext, radiotext2, radiotext3, radiotext4, banks
  • Source (non-tuner): name, type, channel, channelname, artistname, albumname, coverarturl, playlistname, songname, rating, mode, shufflemode, repeatmode, mmscreen, mmtitle, mmmenu, mmattr, mmmenubuttonoktext,mmmenubuttonbacktest, mminfotext,mmhelptext, mmtextfield
  • Zone: name, source, bass, treble, balance, loudness, turnonvolume, donotdisturb, partymode, status, volume, mute, repeat, shuffle, rating, keyrelease, keycode, event, systemfavorites, zonefavorites, presets, mminit, mmcontextmenu

Installation

Please follow the instructions at https://github.com/tmrobert8/RussoundHabPanel for details


New feature: globally provisioned widgets (i.e. with OSGi bundles)
(T Dods) #3

Hi Tim, this looks great.

I am just getting started here. Do you know if there is any binding/widgets etc for the older Russound devices that use RNET, like the CAV6.6 (that i have), CAM and CAA?

Thanks


(Tim Roberts) #4

Unfortunately no - RNET is sufficiently different enough that I couldn't simply 'add' it in. Have plans in the future to try to create an RNET version - but I'm way too busy with the Sony binding at the moment that I won't have time anywhere in the foreseeable future. If anyone wants to give it a shot - I can certainly provide pointers on how to do it...


(T Dods) #5

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


(wmmaac) #6

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.


(Craig) #7

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

(Tim Roberts) #8

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


(Tim Roberts) #9

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


(T Dods) #10

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.


(T Dods) #11

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


(Craig) #12

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.


(Tim Roberts) #13

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


(Yannick Schaus) #14

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.


(Tim Roberts) #15

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.


(Tommy Sharp) #16

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


(T Dods) #17

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


(Tim Roberts) #19

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


(Nat Neels) #20

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.


(Tim Roberts) #21

@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