[homematic] Fix for two (re)connection problems (#9692)

* Replace deprecated constructors
* Removed no longer existing settings from the documentation. They were already marked as deprecated since several versions.
* Refactored communication with the HM gateway
- simplified coding for the communication with the gateway
- buffer size for communication is now configurable to avoid problems
with too small buffers
- Previous solution for #6963 was not sufficient. Should be finally done
with these changes
* Retrieving the duty cycle is sufficient to check connection
- ping requests could therefore be safely removed problems with the automatic reconnection were solved.
* Changed to explicit list of Exception

Fixes #8808

Signed-off-by: Martin Herbst <develop@mherbst.de>
This commit is contained in:
Martin Herbst
2021-01-12 22:11:52 +01:00
committed by GitHub
parent ac3f907b36
commit 706af08fb6
8 changed files with 44 additions and 92 deletions

View File

@@ -133,24 +133,12 @@ Callback network address of the system runtime, default is auto-discovery
- **bindAddress**
The address the XML-/BINRPC server binds to, default is value of "callbackHost"
- **callbackPort** (DEPRECATED, use "binCallbackPort" resp. "xmlCallbackPort")
Callback port of the binding's server, default is 9125 and counts up for each additional bridge
- **xmlCallbackPort**
Callback port of the binding's XML-RPC server, default is 9125 and counts up for each additional bridge
- **binCallbackPort**
Callback port of the binding's BIN-RPC server, default is 9126 and counts up for each additional bridge
- **aliveInterval** (DEPRECATED, not necessary anymore)
The interval in seconds to check if the communication with the Homematic gateway is still alive. If no message receives from the Homematic gateway, the RPC server restarts (default = 300)
- **reconnectInterval** (DEPRECATED, not necessary anymore)
The interval in seconds to force a reconnect to the Homematic gateway, disables "aliveInterval"! (0 = disabled, default = disabled).
If you have no sensors which sends messages in regular intervals and/or you have low communication, the "aliveInterval" may restart the connection to the Homematic gateway to often.
The "reconnectInterval" disables the "aliveInterval" and reconnects after a fixed period of time.
Think in hours when configuring (one hour = 3600)
- **timeout**
The timeout in seconds for connections to a Homematic gateway (default = 15)
@@ -183,6 +171,11 @@ If set to true, devices are automatically unpaired from the gateway when their c
If set to true, devices are automatically factory reset when their corresponding things are removed.
Due to the factory reset, the device will also be unpaired from the gateway, even if "unpairOnDeletion" is set to false! (default = false)
- **bufferSize**
If a large number of devices are connected to the gateway, the default buffersize of 2048 kB may be too small for communication with the gateway.
In this case, e.g. the discovery fails.
With this setting the buffer size can be adjusted. The value is specified in kB.
The syntax for a bridge is:
```java
@@ -676,6 +669,11 @@ Var_1.sendCommand(RefreshType.REFRESH)
**Note:** adding new and removing deleted variables from the GATEWAY-EXTRAS thing is currently not supported.
You have to delete the thing, start a scan and add it again.
**`openhab.log` contains an exception with message: `Buffering capacity 2097152 exceeded` resp. discovery detects no devices**
In case of problems in the discovery or if above mentioned error message appears in `openhab.log`, the size for the transmission buffer for the communication with the gateway is too small.
The problem can be solved by increasing the `bufferSize` value in the bridge configuration.
### Debugging and Tracing
If you want to see what's going on in the binding, switch the log level to DEBUG in the Karaf console