Skip to content

Commit

Permalink
Updated README.md and removed unnecessary functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmrobert8 committed Apr 7, 2017
1 parent 4ac0804 commit f45f2a1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 140 deletions.
93 changes: 7 additions & 86 deletions addons/binding/org.openhab.binding.russound/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

This binding provides integration with any Russound system that support the RIO protocol (all MCA systems, all X systems). This binding provides compatibility with RIO Protocol v1.10. The protocol document can be found in the Russound Portal ("RIO Protocol for 3rd Party Integrators.pdf"). Please update to the latest firmware to provide full compatibility with this binding. This binding does provide full feedback from the Russound system if events occur outside of openHAB (such as keypad usage).

Warning - Russound becomes unstable if you have two IP based clients connected to the same system. Do NOT run multiple instances of this binding against the same system - this definitely causes unstability. Running this binding in addition to the MyRussound application seems to work fine however.
*Warning:* Russound becomes unstable if you have two IP based clients connected to the same system. Do NOT run multiple instances of this binding against the same system - this definitely causes unstability. Running this binding in addition to the MyRussound application seems to work fine however.

Warning2 - Try to avoid having multiple media management functions open in different clients (keypads, My Russound app, HABPanel, etc). Although it seems to work a majority of the times, there have been instances where the sessions become confused.
*Warning:* Try to avoid having multiple media management functions open in different clients (keypads, My Russound app, HABPanel, etc). Although it seems to work a majority of the times, there have been instances where the sessions become confused.

## Supported Bridges/Things

Expand Down Expand Up @@ -230,49 +230,28 @@ The channel will be refreshed with the new representation after processing. If
The following is an example of

1. Main controller (#1) at ipaddress 192.168.1.24
2. Two Sources connected to it (#1 is the internal AM/FM and #2 is a DMS 3.1)
3. Two System favorites (#1 FM 102.9, #2 Pandora on DMS)
4. One bank (called "FM-1")
5. Two presets within the bank (#1 FM 100.7, #2 FM 105.1)
6. Four zones on the controller (1-4 in various rooms)
7. Zone 1 has two favorites (#1 Spotify on DMS, #2 Airplay on DMS)
8. Zone 2 has two presets (#1 corresponds to bank 1/preset 1 [102.9], #2 corresponds to bank1/preset 2 [Pandora])
2. One Sources connected to it (#1 is the internal AM/FM)
3. Four zones on the controller (1-4 in various rooms)

.things

```
russound:rio:home [ ipAddress="192.168.1.24", ping=30, retryPolling=10 ]
russound:sysfavorite:1 (russound:rio:home) [ favorite=1 ]
russound:sysfavorite:2 (russound:rio:home) [ favorite=2 ]
russound:controller:1 (russound:rio:home) [ controller=1 ]
russound:source:1 (russound:rio:home) [ source=1 ]
russound:source:2 (russound:rio:home) [ source=2 ]
russound:bank:1 (russound:source:1) [ bank=1 ]
russound:bankpreset:1 (russound:bank:1) [ preset=1 ]
russound:bankpreset:2 (russound:bank:1) [ preset=2 ]
russound:zone:1 (russound:controller:1) [ zone=1 ]
russound:zone:2 (russound:controller:1) [ zone=2 ]
russound:zone:3 (russound:controller:1) [ zone=3 ]
russound:zone:4 (russound:controller:1) [ zone=4 ]
russound:zonefavorite:1 (russound:zone:1) [ favorite=1 ]
russound:zonefavorite:2 (russound:zone:1) [ favorite=2 ]
russound:zonepreset:1 (russound:zone:2) [ preset=1 ]
russound:zonepreset:2 (russound:zone:2) [ preset=2 ]
```

This is an example of all the items that can be included (regardless of the above setup)
.items

```
String Rio_Version "Version [%s]" { channel="russound:rio:home:version" }
String Rio_Lang "Language [%s]" { channel="russound:rio:home:lang" }
Switch Rio_Status "Status [%s]" { channel="russound:rio:home:status" }
Switch Rio_AllOn "All Zones" { channel="russound:rio:home:allon" }
String Rio_Ctl_Type "Model [%s]" { channel="russound:controller:1:type" }
String Rio_Ctl_IPAddress "IP Address [%s]" { channel="russound:controller:1:ipaddress" }
String Rio_Ctl_MacAddress "MAC [%s]" { channel="russound:controller:1:macaddress" }
String Rio_Zone_Name "Name [%s]" { channel="russound:zone:1:name" }
Switch Rio_Zone_Status "Status" { channel="russound:zone:1:status" }
Number Rio_Zone_Source "Source [%s]" { channel="russound:zone:1:source" }
Expand All @@ -296,7 +275,6 @@ Switch Rio_Zone_Rating "Rating" { channel="russound:zone:1:rating", autoupdate="
String Rio_Src_Name "Name [%s]" { channel="russound:source:1:name" }
String Rio_Src_Type "Type [%s]" { channel="russound:source:1:type" }
String Rio_Src_IP "IPAddress [%s]" { channel="russound:source:1:ipaddress" }
String Rio_Src_Composer "Composer [%s]" { channel="russound:source:1:composername" }
String Rio_Src_Channel "Channel [%s]" { channel="russound:source:1:channel" }
String Rio_Src_ChannelName "Channel Name [%s]" { channel="russound:source:1:channelname" }
Expand All @@ -316,66 +294,24 @@ String Rio_Src_RadioText2 "Radio Text #2 [%s]" { channel="russound:source:1:radi
String Rio_Src_RadioText3 "Radio Text #3 [%s]" { channel="russound:source:1:radiotext3" }
String Rio_Src_RadioText4 "Radio Text #4 [%s]" { channel="russound:source:1:radiotext4" }
String Rio_Sys_Favorite_Name "Name1 [%s]" { channel="russound:sysfavorite:1:name" }
Switch Rio_Sys_Favorite_Valid "Valid1 [%s]" { channel="russound:sysfavorite:1:valid" }
String Rio_Sys_Favorite_Name2 "Name2 [%s]" { channel="russound:sysfavorite:2:name" }
Switch Rio_Sys_Favorite_Valid2 "Valid2 [%s]" { channel="russound:sysfavorite:2:valid" }
String Rio_Zone_Favorite_Name "Name [%s]" { channel="russound:zonefavorite:1:name" }
Switch Rio_Zone_Favorite_Valid "Valid [%s]" { channel="russound:zonefavorite:1:valid", autoupdate="false" }
String Rio_Zone_Favorite_Cmd "Command" { channel="russound:zonefavorite:1:cmd" }
String Rio_Zone_Favorite_Name2 "Name2 [%s]" { channel="russound:zonefavorite:2:name" }
Switch Rio_Zone_Favorite_Valid2 "Valid2 [%s]" { channel="russound:zonefavorite:2:valid", autoupdate="false" }
String Rio_Zone_Favorite_Cmd2 "Command2" { channel="russound:zonefavorite:2:cmd" }
String Rio_Src_Bank_Name "Name [%s]" { channel="russound:bank:1:name" }
String Rio_Bank_Preset_Name "Name [%s]" { channel="russound:bankpreset:1:name" }
Switch Rio_Bank_Preset_Valid "Valid [%s]" { channel="russound:bankpreset:1:valid" }
String Rio_Bank_Preset_Name2 "Name2 [%s]" { channel="russound:bankpreset:2:name" }
Switch Rio_Bank_Preset_Valid2 "Valid2 [%s]" { channel="russound:bankpreset:2:valid" }
String Rio_Zone_Preset_Cmd "Command" { channel="russound:zonepreset:1:cmd" }
String Rio_Zone_Preset_Cmd2 "Command2" { channel="russound:zonepreset:2:cmd" }
```

.sitemap

```
Frame label="Russound" {
Text label="System" {
Text item=Rio_Version
Text item=Rio_Status
Selection item=Rio_Lang mappings=[ENGLISH="English", RUSSIAN="Russian", CHINESE="Chinese"]
Switch item=Rio_AllOn
Text label="Favorites" {
Text item=Rio_Sys_Favorite_Name
Text item=Rio_Sys_Favorite_Valid
Text item=Rio_Sys_Favorite_Name2
Text item=Rio_Sys_Favorite_Valid2
}
}
Text label="Source 1" {
Text label="Bank 1" {
Text item=Rio_Src_Bank_Name
Text label="Presets" {
Text item=Rio_Bank_Preset_Name
Text item=Rio_Bank_Preset_Valid
Text item=Rio_Bank_Preset_Name2
Text item=Rio_Bank_Preset_Valid2
}
}
}
Text label="Controller 1" {
Text item=Rio_Ctl_Type
Text item=Rio_Ctl_IPAddress
Text item=Rio_Ctl_MacAddress
Text label="Zone 1" {
Text item=Rio_Zone_Name
Switch item=Rio_Zone_Status
Selection item=Rio_Zone_Source mappings=[1="Room1", 2="Room2", 3="Room3", 4="Room4"]
Selection item=Rio_Zone_Source mappings=[1="AM/FM", 2="Stream #1", 3="Stream #2", 4="Stream #3"]
Setpoint item=Rio_Zone_Bass
Setpoint item=Rio_Zone_Treble
Setpoint item=Rio_Zone_Balance
Expand Down Expand Up @@ -405,7 +341,6 @@ Frame label="Russound" {
Text item= Rio_Src_ArtistName
Text item= Rio_Src_AlbumName
Text item= Rio_Src_Cover
Image item= Rio_Src_Cover
Text item= Rio_Src_PlaylistName
Text item= Rio_Src_SongName
Text item= Rio_Src_Mode
Expand All @@ -417,21 +352,7 @@ Frame label="Russound" {
Text item= Rio_Src_RadioText2
Text item= Rio_Src_RadioText3
Text item= Rio_Src_RadioText4
}
Text label="Favorite" {
Text item=Rio_Zone_Favorite_Name
Text item=Rio_Zone_Favorite_Valid
Selection item=Rio_Zone_Favorite_Cmd mappings=[savezone="Save Zone", restorezone="Restore Zone", deletezone="Delete Zone", savesys="Save System", restoresys="Restore System", deletesys="Delete System"]
Text item=Rio_Zone_Favorite_Name2
Text item=Rio_Zone_Favorite_Valid2
Selection item=Rio_Zone_Favorite_Cmd2 mappings=[savezone="Save Zone", restorezone="Restore Zone", deletezone="Delete Zone", savesys="Save System", restoresys="Restore System", deletesys="Delete System"]
}
Text label="Preset" {
Selection item=Rio_Zone_Preset_Cmd mappings=[save="Save", restore="Restore", delete="Delete"]
Selection item=Rio_Zone_Preset_Cmd2 mappings=[save="Save", restore="Restore", delete="Delete"]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,4 @@ private void childChanged(ThingHandler childHandler, boolean added) {
refreshNamedHandler(_gson, RioZoneHandler.class, RioConstants.CHANNEL_CTLZONES);
}
}

/**
* Overridden to avoid recreating thing if controller number didn't change
*
* @param thing a non-null thing that was updated
* @throws NullPointerException if thing is null
*/
@Override
public void thingUpdated(Thing thing) {
if (thing == null) {
throw new NullPointerException("Thing cannot be null");
}
// Don't both updating if it's the same controller (probably was rediscovered!)
final RioControllerConfig config = thing.getConfiguration().as(RioControllerConfig.class);
if (config.getController() != _controller.get()) {
super.thingUpdated(thing);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,4 @@ public void setProperty(String propertyName, String propertyValue) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.toString());
}
}

@Override
public void thingUpdated(Thing thing) {
// Don't both updating if it's the same source (probably was rediscovered!)
final RioSourceConfig config = thing.getConfiguration().as(RioSourceConfig.class);
if (config.getSource() != _source.get()) {
super.thingUpdated(thing);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@
import org.openhab.binding.russound.internal.rio.AbstractBridgeHandler;
import org.openhab.binding.russound.internal.rio.AbstractRioHandlerCallback;
import org.openhab.binding.russound.internal.rio.RioConstants;
import org.openhab.binding.russound.internal.rio.RioSystemFavoritesProtocol;
import org.openhab.binding.russound.internal.rio.RioHandlerCallback;
import org.openhab.binding.russound.internal.rio.RioHandlerCallbackListener;
import org.openhab.binding.russound.internal.rio.RioPresetsProtocol;
import org.openhab.binding.russound.internal.rio.RioSystemFavoritesProtocol;
import org.openhab.binding.russound.internal.rio.StatefulHandlerCallback;
import org.openhab.binding.russound.internal.rio.controller.RioControllerHandler;
import org.openhab.binding.russound.internal.rio.models.GsonUtilities;
import org.openhab.binding.russound.internal.rio.source.RioSourceConfig;
import org.openhab.binding.russound.internal.rio.source.RioSourceHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -524,21 +523,6 @@ private void childChanged(ThingHandler childHandler, boolean added) {

}

@Override
public void thingUpdated(Thing thing) {
final RioSourceConfig config = thing.getConfiguration().as(RioSourceConfig.class);
boolean ignoreSuperThingUpdated = false;
_configLock.lock();
try {
ignoreSuperThingUpdated = _config != null && _config.equals(config);
} finally {
_configLock.unlock();
}
if (!ignoreSuperThingUpdated) {
super.thingUpdated(thing);
}
}

/**
* Returns the {@link RioSystemFavoritesProtocol} for the system
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,15 +475,6 @@ public void setProperty(String propertyName, String propertyValue) {
getProtocolHandler().postOnline();
}

@Override
public void thingUpdated(Thing thing) {
// Don't both updating if it's the same zone (probably was rediscovered!)
final RioZoneConfig config = thing.getConfiguration().as(RioZoneConfig.class);
if (config.getZone() != _zone.get()) {
super.thingUpdated(thing);
}
}

/**
* Returns the {@link RioHandlerCallback} related to the zone
*
Expand Down

0 comments on commit f45f2a1

Please sign in to comment.