这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions bundles/binding/org.openhab.binding.velux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ Items marked with (\*) are fully implemented. Items marked with (+) have only pa

The binding can be configured by parameters in the global configuration file `openhab.cfg`.

| Property | Default | Required | Description |
|----------------|------------------------|:--------:|-------------------------------------------------------|
| bridgeIPAddress| | Yes | Hostname or address for accessing the Velux Bridge. |
| bridgeProtocol | slip | No | Underlying communication protocol (http/https/slip). |
| bridgeTCPPort | 80 | No | TCP port (80 or 51200)for accessing the Velux Bridge. |
| bridgePassword | velux123 | No | Password for authentication against the Velux Bridge. |
| timeoutMsecs | 2000 | No | Initial Connection timeout in milliseconds |
| retries | 6 | No | Number of retries during I/O |
| Property | Default | Required | Description |
|----------------|------------------------|:--------:|-----------------------------------------------------------|
| bridgeIPAddress| | Yes | Hostname or address for accessing the Velux Bridge. |
| bridgeProtocol | slip | No | Underlying communication protocol (http/https/slip). |
| bridgeTCPPort | 80 | No | TCP port (80 or 51200)for accessing the Velux Bridge. |
| bridgePassword | velux123 | No | Password for authentication against the Velux Bridge.(**) |
| timeoutMsecs | 2000 | No | Initial Connection timeout in milliseconds |
| retries | 6 | No | Number of retries during I/O |

(**) Note: This password is the API password that is printed on the back of the unit. Normally it differs from the password of the web frontend.

Advise: if you see a significant number of messages per day like

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,6 @@ private void bridgeParamsUpdated() {
VeluxBindingConstants.BINDING_ID);
return;
}
if (thisBridge.bridgeAPI().modifyHouseStatusMonitor() != null) {
logger.trace("bridgeParamsUpdated(): Activating HouseStatusMonitor.");
if (new VeluxBridgeModifyHouseStatusMonitor().modifyHSM(thisBridge, true)) {
logger.trace("bridgeParamsUpdated(): HSM activated.");
} else {
logger.warn("Activation of House-Status-Monitoring failed (might lead to a lack of status updates).");
}
}

logger.trace("bridgeParamsUpdated(): Querying bridge state.");
bridgeParameters.gateway = new VeluxBridgeDeviceStatus().retrieve(thisBridge);
Expand All @@ -261,6 +253,15 @@ private void bridgeParamsUpdated() {
String products = bridgeParameters.actuators.getChannel().existingProducts.toString(false, "\n\t");
logger.info("Found {} actuators:\n\t{}.", VeluxBindingConstants.BINDING_ID, products);

if (thisBridge.bridgeAPI().modifyHouseStatusMonitor() != null) {
logger.trace("bridgeParamsUpdated(): Activating HouseStatusMonitor.");
if (new VeluxBridgeModifyHouseStatusMonitor().modifyHSM(thisBridge, true)) {
logger.trace("bridgeParamsUpdated(): HSM activated.");
} else {
logger.warn("Activation of House-Status-Monitoring failed (might lead to a lack of status updates).");
}
}

veluxBridgeConfiguration.hasChanged = false;
logger.info("{} Bridge is online, now.", VeluxBindingConstants.BINDING_ID);
logger.trace("bridgeParamsUpdated() successfully finished.");
Expand Down Expand Up @@ -462,6 +463,14 @@ public void handleCommandOnChannel(String itemName, Command command, VeluxBindin
itemName, config.getBindingItemType());
}
}
if (newState != null) {
logger.debug("handleCommandOnChannel(): updating {} to {}.", itemName, newState);
assert eventPublisher != null : "eventPublisher not initialized.";
eventPublisher.postUpdate(itemName, newState);
} else {
logger.info("handleCommandOnChannel(): updating of item {} (type {}) failed.", itemName,
config.getBindingItemType().name());
}
} else {
/*
* ===========================================================
Expand Down Expand Up @@ -586,26 +595,16 @@ public void handleCommandOnChannel(String itemName, Command command, VeluxBindin
logger.debug("handleCommandOnChannel(): sending command with target level {}.", targetLevel);
new VeluxBridgeSendCommand().sendCommand(thisBridge,
thisProduct.getBridgeProductIndex().toInt(), targetLevel);
newState = targetLevel.getPositionAsPercentType();
if (bridgeParameters.actuators.autoRefresh(thisBridge)) {
logger.trace("handleCommandOnChannel(): position of actuators are updated.");
}
break;

default:
logger.trace("handleCommand() cannot handle command {} on channel {} (type {}).", command,
itemName, config.getBindingItemType());
}
}
/*
* ===========================================================
* Common part
*/
if (newState != null) {
logger.debug("handleCommandOnChannel(): updating {} to {}.", itemName, newState);
assert eventPublisher != null : "eventPublisher not initialized.";
eventPublisher.postUpdate(itemName, newState);
} else {
logger.info("handleCommandOnChannel(): updating of item {} (type {}) failed.", itemName,
config.getBindingItemType().name());
}
logger.trace("handleCommandOnChannel() done.");
}
}
Expand Down