Skip to content

Commit

Permalink
Kai Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tmrobert8 committed Apr 24, 2017
1 parent 9ace8a4 commit 4c700d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions addons/binding/org.openhab.binding.russound/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,23 +158,27 @@ The following channels are supported for each bridge/thing
| mmcontextmenu | W | Switch**** | Whether to initial a media management context session (ON) or close an existing one (OFF) |

#### Notes:

1. As of the time of this document, rating ON (like) produced an error in the firmware from the related command. This has been reported to Russound.
2. keypress/keyrelease/keyhold/keycode/event are advanced commands that will pass the related event string to Russound (i.e. "EVENT C[x].Z[y]!KeyPress [stringtype]"). Please see the "RIO Protocol for 3rd Party Integrators.pdf" (found at the Russound Portal) for proper string forms.
3. If you send a OnOffType to the volume will have the same affect as turning the zone on/off (ie sending OnOffType to "status")
4. The volume PercentType will be scaled to Russound's volume of 0-50 (ie 50% = volume of 25, 100% = volume of 50)
5. Initialize a media management session by sending ON to the channel. The related source thing will then start sending out media management information in the MM channels. To close the session - simply send OFF to the channel. Sending OFF to the channel when a session has not been initialized does nothing. Likewise if the related source is a tuner, this command does nothing.

##### System Favorites

The JSON will look like `[{"id":xxx,"valid":true,"name":"yyyy"},...]` and will have a representation for each VALID favorite on the system (ie where "valid" is true). You will have up to 32 system favorites in the JSON array (the ID field will be between 1 and 32). System favorites will be the same on ALL zones (because they are system level). This channel appears on the zone because when you send a system favorite representation to zone channel, it sets the system favorite to what is playing in the zone.

There are three different ways to use this channel:

1. Save a system favorite. Send a representation with "valid" set to true. Example: to set system favorite 3 to what is playing in the zone: `[{"id":3,"valid":true,"name":"80s Rock"}]`. If system favorite 3 was invalid, this would save what is currently playing and make it valid. If system favorite 3 was already valid, this would overlay the favorite with what is currently playing and change it's name.
2. Update the name of a system favorite. Send a representation of an existing ID with "valid" set to true and the new name. Example: we could update system favorite 3 (after the above statement) by sending: `[{"id":3,"valid":true,"name":"80s Rock Even More"}]`. Note this will ONLY change the name (this will NOT save what is currently playing to the system favorite).
3. Delete a system favorite. Send a representation with "valid" as false. Example: deleting system favorite 3 (after the above statements) by sending: `[{"id":3","valid":false"}]`

The channel will be refreshed with the new representation after processing. If the refreshed representation doesn't include the changes, the russound system rejected them for some reason (generally length of the name).

##### Zone Favorites

The JSON will look like `[{"id":xxx,"valid":true,"name":"yyyy"},...]` and will have a representation for each VALID favorite in the zone (ie where "valid" is true). You will have up to 2 zone favorites in the JSON array (the ID field will be between 1 and 2).

There are two different ways to use this channel:
Expand All @@ -186,9 +190,11 @@ There is no ability to change JUST the name. Sending a new name will save the n
The channel will be refreshed with the new representation after processing. If the refreshed representation doesn't include the changes, the russound system rejected them for some reason (generally length of the name).

##### Zone Presets

The JSON will look like `[{"id":xxx,"valid":true,"name":"yyyy", "bank": xxx, "bankPreset":yyyy},...]` and will have a representation for each VALID preset in the zone (ie where "valid" is true). Please note that this channel is only valid if the related source is a tuner. If not a tuner, an empty json array will be returned. You will have up to 36 presets to choose from (ID from 1 to 36). The "bank" and "bankPreset" are readonly (will be ignored if sent) and are informational only (i.e. specify the bank and the preset within the bank for convenience).

There are two different ways to use this channel:

1. Save a preset. Send a representation to an ID that is invalid with "valid" set to true. Example: to set a zone pret 2 to what is playing in the zone: `[{"id":2,"valid":true,"name":"103.7 FM"}]`.
2. Save a preset with default name. Send a representation to an ID that is invalid with "valid" set to true. Example: to set a zone pret 2 to what is playing in the zone: `[{"id":2,"valid":true,"name":"103.7 FM"}]`.
2. Delete a zone favorite. Send a representation with "valid" as false. Example: deleting zone favorite 2 (after the above statement) by sending: `[{"id":2","valid":false"}]`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void scanDevice() {
discoverControllers();
discoverSources();
} catch (IOException e) {
logger.warn("Trying to scan device but couldn't connect: {}", e.getMessage(), e);
logger.debug("Trying to scan device but couldn't connect: {}", e.getMessage(), e);
}
} finally {
deactivate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public void run() {
}
}, rioConfig.getPing(), rioConfig.getPing(), TimeUnit.SECONDS);

logger.info("Going online!!!");
logger.debug("Going online!");
updateStatus(ThingStatus.ONLINE);
startScan(rioConfig);
refreshNamedHandler(gson, RioSourceHandler.class, RioConstants.CHANNEL_SYSSOURCES);
Expand Down

0 comments on commit 4c700d3

Please sign in to comment.