[qbus] - Update logo / Small code changes (#10514)
Signed-off-by: Koen Schockaert <ks@qbus.be>
This commit is contained in:
parent
a54f4be094
commit
d3c137c73d
|
@ -1,10 +1,8 @@
|
||||||
# Qbus Binding
|
# Qbus Binding
|
||||||
|
|
||||||
![Qbus Logo](doc/Logo.JPG)
|
|
||||||
|
|
||||||
This binding for [Qbus](https://qbus.be) communicates with all controllers of the Qbus home automation system.
|
This binding for [Qbus](https://qbus.be) communicates with all controllers of the Qbus home automation system.
|
||||||
|
|
||||||
We also host a site which contains a [manual](https://manualoh.schockaert.tk/) where you can find lots of information to set up openHAB with Qbus client and server (for the moment only in Dutch).
|
We also host a site which contains a [manual](https://iot.qbus.be/) where you can find lots of information to set up openHAB with Qbus client and server (for the moment only in Dutch).
|
||||||
|
|
||||||
The controllers can not communicate directly with openHAB, therefore we developed a client/server application which you must install prior to enable this binding.
|
The controllers can not communicate directly with openHAB, therefore we developed a client/server application which you must install prior to enable this binding.
|
||||||
More information can be found here:
|
More information can be found here:
|
||||||
|
@ -49,16 +47,13 @@ Bridge qbus:bridge:CTD001122 [ addr="localhost", sn="001122", port=8447, serverC
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
| Property | Default | Required | Description |
|
| Property | Default | Required | Description |
|
||||||
| ------------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|---------------|-----------|----------|--------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `addr` | localhost | YES | The ip address of the machine where the Qbus Server runs |
|
| `addr` | localhost | YES | The ip address of the machine where the Qbus Server runs |
|
||||||
| `sn` | | YES | The serial number of your controller |
|
| `sn` | | YES | The serial number of your controller |
|
||||||
| `port` | 8447 | YES | The communication port of the client/server |
|
| `port` | 8447 | YES | The communication port of the client/server |
|
||||||
| `serverCheck` | 10 | NO | Refresh time - After x minutes there will be a check if server is still running and if client is still connected. If not - reconnect |
|
| `serverCheck` | 10 | NO | Refresh time - After x minutes there will be a check if server is still running and if client is still connected. If not - reconnect |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Things configuration
|
## Things configuration
|
||||||
|
|
||||||
|
@ -81,30 +76,30 @@ Bridge qbus:bridge:CTD001122 [ addr="localhost", sn="001122", port=8447, serverC
|
||||||
|
|
||||||
```
|
```
|
||||||
Bridge qbus:bridge:CTD001122 [ addr="localhost", sn="001122", port=8447, serverCheck=10 ] {
|
Bridge qbus:bridge:CTD001122 [ addr="localhost", sn="001122", port=8447, serverCheck=10 ] {
|
||||||
dimmer 1 "ToonzaalLED" [ dimmerId=100 ]
|
dimmer 1 "ToonzaalLED" [ dimmerId=100 ]
|
||||||
onOff 30 "Toonzaal230V" [ bistabielId=76 ]
|
onOff 30 "Toonzaal230V" [ bistabielId=76 ]
|
||||||
thermostat 50 "Service" [ thermostatId=99 ]
|
thermostat 50 "Service" [ thermostatId=99 ]
|
||||||
scene 70 "Disco" [ sceneId=36 ]
|
scene 70 "Disco" [ sceneId=36 ]
|
||||||
co2 100 "Productie" [ co2Id=26 ]
|
co2 100 "Productie" [ co2Id=26 ]
|
||||||
rollershutter 120 "Roller1" [ rolId=268 ]
|
rollershutter 120 "Roller1" [ rolId=268 ]
|
||||||
rollershutter_slats 121 "Roller2" [ rolId=264 ]
|
rollershutter_slats 121 "Roller2" [ rolId=264 ]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Items
|
### Items
|
||||||
|
|
||||||
```
|
```
|
||||||
Dimmer ToonzaalLED <light> [ "Lighting" ] {channel="qbus:dimmer:CTD007841:1:brightness"}
|
Dimmer ToonzaalLED <light> ["Lighting"] {channel="qbus:dimmer:CTD001122:1:brightness"}
|
||||||
Switch Toonzaal230V <light> {channel="qbus:onOff:CTD007841:30:switch"}
|
Switch Toonzaal230V <light> ["Switchable"] {channel="qbus:onOff:CTD001122:30:switch"}
|
||||||
Number:Temperature ServiceSP"[%.1f %unit%]" (GroepThermostaten) {channel="qbus:thermostat:CTD007841:50:setpoint"}
|
Group gThermostaat ["HVAC"]
|
||||||
Number:Temperature ServiceCT"[%.1f %unit%]" (GroepThermostaten) {channel="qbus:thermostat:CTD007841:50:measured"}
|
Number:Temperature ServiceSP"[%.1f %unit%]" <temperature> (gThermostaat) ["Setpoint"] {channel="qbus:thermostat:CTD001122:50:setpoint"}
|
||||||
Number ServiceMode (GroepThermostaten) {channel="qbus:thermostat:CTD007841:50:mode",ihc="0x33c311" , autoupdate="true"}
|
Number:Temperature ServiceCT"[%.1f %unit%]" <temperature> (gThermostaat) ["Measurement"] {channel="qbus:thermostat:CTD001122:50:measured"}
|
||||||
Switch Disco <light> {channel="qbus:scene:CTD007841:36:scene"}
|
Number ServiceMode <temperature> (gThermostaat) ["Control"] {channel="qbus:thermostat:CTD001122:50:mode",ihc="0x33c311" , autoupdate="true"}
|
||||||
Number ProductieCO2 {channel="qbus:co2:CTD007841:100:co2"}
|
Switch Disco <light> ["Switchable"] {channel="qbus:scene:CTD001122:36:scene"}
|
||||||
Rollershutter Roller1 {channel="qbus:rollershutter:CTD007841:120:rollershutter"}
|
Number ProductieCO2 <carbondioxide> ["CO2"] {channel="qbus:co2:CTD001122:100:co2"}
|
||||||
Rollershutter Roller2 {channel="qbus:rollershutter_slats:CTD007841:121:rollershutter"}
|
Rollershutter Roller1 <rollershutter> ["Blinds"] {channel="qbus:rollershutter:CTD001122:120:rollershutter"}
|
||||||
Dimmer Roller2_slats {channel="qbus:rollershutter_slats:CTD007841:121:slats"}
|
Rollershutter Roller2 <rollershutter> ["Blinds"] {channel="qbus:rollershutter_slats:CTD001122:121:rollershutter"}
|
||||||
|
Dimmer Roller2_slats <rollershutter> ["Blinds"] {channel="qbus:rollershutter_slats:CTD001122:121:slats"}
|
||||||
```
|
```
|
||||||
|
|
||||||
This is the link to the [Qbus forum](https://qbusforum.be). This forum is mainly in dutch and you can find a lot of information about the pre testings of this binding and offers a way to communicate with other users.
|
This is the link to the [Qbus forum](https://qbusforum.be). This forum is mainly in dutch and you can find a lot of information about the pre testings of this binding and offers a way to communicate with other users.
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 888 KiB |
|
@ -56,15 +56,15 @@ public class QbusBridgeHandler extends BaseBridgeHandler {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
Integer serverCheck = getServerCheck();
|
|
||||||
|
|
||||||
readConfig();
|
readConfig();
|
||||||
|
|
||||||
createCommunicationObject();
|
Integer serverCheck = getServerCheck();
|
||||||
|
|
||||||
if (serverCheck != null) {
|
if (serverCheck != null) {
|
||||||
this.setupRefreshTimer(serverCheck);
|
this.setupRefreshTimer(serverCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createCommunicationObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -176,6 +176,7 @@ public class QbusBridgeHandler extends BaseBridgeHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshTimer = scheduler.scheduleWithFixedDelay(() -> {
|
refreshTimer = scheduler.scheduleWithFixedDelay(() -> {
|
||||||
|
logger.debug("Timer started");
|
||||||
QbusCommunication comm = getCommunication();
|
QbusCommunication comm = getCommunication();
|
||||||
Integer serverCheck = getServerCheck();
|
Integer serverCheck = getServerCheck();
|
||||||
|
|
||||||
|
|
|
@ -121,12 +121,26 @@ public final class QbusCommunication extends BaseThingHandler {
|
||||||
InetAddress addr = InetAddress.getByName(handler.getAddress());
|
InetAddress addr = InetAddress.getByName(handler.getAddress());
|
||||||
Integer port = handler.getPort();
|
Integer port = handler.getPort();
|
||||||
|
|
||||||
if (port != null) {
|
if (port == null) {
|
||||||
Socket socket = new Socket(addr, port);
|
handler.bridgeOffline(ThingStatusDetail.CONFIGURATION_ERROR, "Please set a correct port.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addr == null) {
|
||||||
|
handler.bridgeOffline(ThingStatusDetail.CONFIGURATION_ERROR, "Please set the hostname of the Qbus server.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Socket socket = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
socket = new Socket(addr, port);
|
||||||
qSocket = socket;
|
qSocket = socket;
|
||||||
qOut = new PrintWriter(socket.getOutputStream(), true);
|
qOut = new PrintWriter(socket.getOutputStream(), true);
|
||||||
qIn = new BufferedReader(new InputStreamReader(socket.getInputStream()));
|
qIn = new BufferedReader(new InputStreamReader(socket.getInputStream()));
|
||||||
} else {
|
} catch (IOException e) {
|
||||||
|
String msg = e.getMessage();
|
||||||
|
handler.bridgeOffline(ThingStatusDetail.COMMUNICATION_ERROR, "No communication with Qbus Server. " + msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,7 +352,6 @@ public final class QbusCommunication extends BaseThingHandler {
|
||||||
logger.trace("Not acted on unsupported json {} : {}", qMessage, msg);
|
logger.trace("Not acted on unsupported json {} : {}", qMessage, msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QbusBridgeHandler handler = bridgeCallBack;
|
QbusBridgeHandler handler = bridgeCallBack;
|
||||||
|
|
||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
|
|
Loading…
Reference in New Issue