Skip to content

Commit

Permalink
Merge pull request openhab#22 from digitaldan/digitaldan-omnilink-bin…
Browse files Browse the repository at this point in the history
…ding-thing-types

Updated to use new command function
  • Loading branch information
craigham authored Jun 13, 2017
2 parents 4a14bd1 + 7dc0cc2 commit 55053ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ public void handleCommand(ChannelUID channelUID, Command command) {
*/
if ((codeValidation.getCodeNumber() > 0 && codeValidation.getCodeNumber() <= 99)
&& codeValidation.getAuthorityLevel() > 0) {
getOmnilinkBridgeHander().sendOmnilinkCommandNew(mode, codeValidation.getCodeNumber(),
areaNumber);
getOmnilinkBridgeHander().sendOmnilinkCommand(mode, codeValidation.getCodeNumber(), areaNumber);
} else {
logger.error("System reported an invalid code");
}
Expand Down Expand Up @@ -142,7 +141,7 @@ public void channelLinked(ChannelUID channelUID) {
int areaId = Integer.parseInt(channelParts[2]);
ObjectStatus objStatus;
try {
objStatus = getOmnilinkBridgeHander().requestObjectStatusNew(Message.OBJ_TYPE_AREA, areaId, areaId, false);
objStatus = getOmnilinkBridgeHander().requestObjectStatus(Message.OBJ_TYPE_AREA, areaId, areaId, false);
handleAreaEvent((AreaStatus) objStatus.getStatuses()[0]);
} catch (OmniInvalidResponseException | OmniUnknownMessageTypeException | BridgeOfflineException e) {
logger.debug("Unexpected exception refreshing area:", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public void handleCommand(ChannelUID channelUID, Command command) {
*/
if ((codeValidation.getCodeNumber() > 0 && codeValidation.getCodeNumber() <= 99)
&& codeValidation.getAuthorityLevel() > 0) {
getOmnilinkBridgeHander().sendOmnilinkCommandNew(mode, codeValidation.getCodeNumber(),
zoneNumber);
getOmnilinkBridgeHander().sendOmnilinkCommand(mode, codeValidation.getCodeNumber(), zoneNumber);
} else {
logger.error("System reported an invalid code");
}
Expand Down Expand Up @@ -108,7 +107,7 @@ public void channelLinked(ChannelUID channelUID) {
int zoneId = Integer.parseInt(channelParts[2]);
ObjectStatus objStatus;
try {
objStatus = getOmnilinkBridgeHander().requestObjectStatusNew(Message.OBJ_TYPE_ZONE, zoneId, zoneId, false);
objStatus = getOmnilinkBridgeHander().requestObjectStatus(Message.OBJ_TYPE_ZONE, zoneId, zoneId, false);
handleZoneStatus((ZoneStatus) objStatus.getStatuses()[0]);
} catch (OmniInvalidResponseException | OmniUnknownMessageTypeException | BridgeOfflineException e) {
logger.debug("Unexpected exception refreshing zone:", e);
Expand Down

0 comments on commit 55053ee

Please sign in to comment.