Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[knx] upgrade calimero and improve documentation #73

Merged
merged 1 commit into from
Apr 19, 2021
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
10 changes: 6 additions & 4 deletions bundles/org.smarthomej.binding.knx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ Since the protocol is identical, the KNX binding can also communicate with it tr
The KNX binding supports two types of bridges, and one type of things to access the KNX bus.
There is an *ip* bridge to connect to KNX IP Gateways, and a *serial* bridge for connection over a serial port to a host-attached gateway.

## Binding Configuration

The binding itself does not require any special configuration.

## Bridges

The following two bridge types are supported. Bridges don't have channels on their own.
Expand Down Expand Up @@ -110,6 +106,9 @@ Note: After changing the DPT of already existing Channels, openHAB needs to be r
|-----------|---------------|-------------|
| ga | Group address | 1.009 |

*Attention:* Due to a bug in the original implementation the states for DPT 1.009 are inverted (i.e. `1` is mapped to `OPEN` instead of `CLOSE`).
A change would break all existing installations and is therefore not implemented.

##### Channel Type "number"

| Parameter | Description | Default DPT |
Expand Down Expand Up @@ -165,6 +164,9 @@ If from the KNX bus a `GroupValueRead` telegram is sent to a *-control Channel,
|-----------|---------------|-------------|
| ga | Group address | 1.009 |

*Attention:* Due to a bug in the original implementation the states for DPT 1.009 are inverted (i.e. `1` is mapped to `OPEN` instead of `CLOSE`).
A change would break all existing installations and is therefore not implemented.

##### Channel Type "number-control"

| Parameter | Description | Default DPT |
Expand Down
7 changes: 4 additions & 3 deletions bundles/org.smarthomej.binding.knx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@

<properties>
<bnd.importpackage>gnu.io;version="[3.12,6)",javax.microedition.io.*;resolution:="optional",javax.usb.*;resolution:="optional",org.usb4java.*;resolution:="optional"</bnd.importpackage>
<calimero.version>2.5-M1</calimero.version>
</properties>

<dependencies>
<dependency>
<groupId>com.github.calimero</groupId>
<artifactId>calimero-core</artifactId>
<version>2.4</version>
<version>${calimero.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
Expand All @@ -34,7 +35,7 @@
<dependency>
<groupId>com.github.calimero</groupId>
<artifactId>calimero-device</artifactId>
<version>2.4</version>
<version>${calimero.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
Expand All @@ -46,7 +47,7 @@
<dependency>
<groupId>com.github.calimero</groupId>
<artifactId>calimero-rxtx</artifactId>
<version>2.4</version>
<version>${calimero.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@
import tuwien.auto.calimero.mgmt.ManagementClientImpl;
import tuwien.auto.calimero.mgmt.ManagementProcedures;
import tuwien.auto.calimero.mgmt.ManagementProceduresImpl;
import tuwien.auto.calimero.process.ProcessCommunicationBase;
import tuwien.auto.calimero.process.ProcessCommunication;
import tuwien.auto.calimero.process.ProcessCommunicator;
import tuwien.auto.calimero.process.ProcessCommunicatorImpl;
import tuwien.auto.calimero.process.ProcessEvent;
import tuwien.auto.calimero.process.ProcessListener;
import tuwien.auto.calimero.secure.SecureApplicationLayer;
import tuwien.auto.calimero.secure.Security;

/**
* KNX Client which encapsulates the communication with the KNX bus via the calimero libary.
Expand Down Expand Up @@ -192,7 +194,8 @@ private synchronized boolean connect() {
processCommunicator.addProcessListener(processListener);
this.processCommunicator = processCommunicator;

ProcessCommunicationResponder responseCommunicator = new ProcessCommunicationResponder(link);
ProcessCommunicationResponder responseCommunicator = new ProcessCommunicationResponder(link,
new SecureApplicationLayer(link, Security.defaultInstallation()));
this.responseCommunicator = responseCommunicator;

link.addLinkListener(this);
Expand Down Expand Up @@ -439,7 +442,7 @@ public void respondToKNX(OutboundSpec responseSpec) throws KNXException {
}
}

private void sendToKNX(ProcessCommunicationBase communicator, KNXNetworkLink link, GroupAddress groupAddress,
private void sendToKNX(ProcessCommunication communicator, KNXNetworkLink link, GroupAddress groupAddress,
String dpt, Type type) throws KNXException {
if (!connectIfNotAutomatic()) {
return;
Expand Down