Skip to content

Commit 9cc1500

Browse files
committed
viessmann: enable autoreconnect by default; close on P300 init failure
1 parent 8bfb322 commit 9cc1500

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

viessmann/plugin.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ parameters:
7474
en: 'If set, the loop guard only counts write attempts whose "caller" string starts with this prefix
7575
(e.g. "MQTT"). Writes from all other callers always pass through freely.'
7676

77+
autoreconnect:
78+
type: bool
79+
default: true
80+
description:
81+
de: Verbindung nach Verbindungsabbruch automatisch wiederherstellen
82+
en: Automatically reconnect after connection loss
83+
7784
command_class:
7885
type: str
7986
default: SDPCommandViessmann

viessmann/protocol.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def _send_init_on_send(self):
225225
empty_replies = 0
226226

227227
if not self._is_initialized:
228+
self._close()
228229
raise SDPProtocolError('P300 protocol initialization failed after 10 attempts')
229230
self.logger.debug('P300 communication initialized successfully')
230231
return True

0 commit comments

Comments
 (0)