diff --git a/oppo/__init__.py b/oppo/__init__.py index 2e9dfda8a..ee269375d 100755 --- a/oppo/__init__.py +++ b/oppo/__init__.py @@ -39,8 +39,9 @@ class SmartPluginWebIf(): else: builtins.SDP_standalone = False -from lib.model.sdp.globals import (PLUGIN_ATTR_NET_HOST, PLUGIN_ATTR_CONNECTION, PLUGIN_ATTR_SERIAL_PORT, PLUGIN_ATTR_CONN_TERMINATOR, CONN_NET_TCP_CLI, CONN_SER_ASYNC) +from lib.model.sdp.globals import (PLUGIN_ATTR_NET_HOST, PLUGIN_ATTR_CONNECTION, PLUGIN_ATTR_SERIAL_PORT, PLUGIN_ATTR_CONN_TERMINATOR, CONN_NET_TCP_CLI, CONN_SER_ASYNC, PLUGIN_ATTR_CMD_CLASS) from lib.model.smartdeviceplugin import SmartDevicePlugin, Standalone +from lib.model.sdp.command import SDPCommandParseStr CUSTOM_INPUT_NAME_COMMAND = 'custom_inputnames' @@ -54,7 +55,7 @@ class oppo(SmartDevicePlugin): The know-how is in the commands.py (and some DT_ classes...) """ - PLUGIN_VERSION = '1.0.0' + PLUGIN_VERSION = '1.0.1' def _set_device_defaults(self): @@ -64,6 +65,8 @@ def _set_device_defaults(self): elif PLUGIN_ATTR_SERIAL_PORT in self._parameters and self._parameters[PLUGIN_ATTR_SERIAL_PORT]: self._parameters[PLUGIN_ATTR_CONNECTION] = CONN_SER_ASYNC + self._parameters[PLUGIN_ATTR_CMD_CLASS] = SDPCommandParseStr + b = self._parameters[PLUGIN_ATTR_CONN_TERMINATOR].encode() b = b.decode('unicode-escape').encode() self._parameters[PLUGIN_ATTR_CONN_TERMINATOR] = b diff --git a/oppo/plugin.yaml b/oppo/plugin.yaml index 1210475d2..c4f91700e 100755 --- a/oppo/plugin.yaml +++ b/oppo/plugin.yaml @@ -6,9 +6,10 @@ plugin: tester: Morg state: develop keywords: iot device - version: 1.0.0 + version: 1.0.1 sh_minversion: '1.9.5.1' py_minversion: '3.6' + sdp_minversion: '1.0.3' multi_instance: false restartable: true classname: oppo @@ -39,36 +40,6 @@ parameters: de: Serieller Anschluss (z.B. /dev/ttyUSB0 oder COM1) en: serial port (e.g. /dev/ttyUSB0 or COM1) - conn_type: - type: str - mandatory: false - valid_list: - - '' - - net_tcp_request - - net_tcp_client - - net_tcp_jsonrpc - - net_udp_server - - serial - - serial_async - - description: - de: Verbindungstyp - en: connection type - - command_class: - type: str - default: SDPCommandParseStr - valid_list: - - SDPCommand - - SDPCommandStr - - SDPCommandParseStr - - SDPCommandJSON - - SDPCommandViessmann - - description: - de: Klasse für Verarbeitung von Kommandos - en: class for command processing - model: type: str mandatory: false @@ -198,6 +169,60 @@ parameters: de: Item-Pfad für das Standby-Item en: item path for standby switch item + send_retries: + type: num + default: 0 + + description: + de: Anzahl Sendeversuche + en: number of sending retries + description_long: + de: 'Anzahl Sendeversuche\n + Kommt keine (passende) Antwort nach dem Senden + eines Commands zurück, wird das Kommando nochmals + gesendet, sofern der Wert über 0 liegt. + ' + en: 'number of sending retries\n + If no (suiting) answer is received after sending + a command the command is resent as long as this + value is more than 0. + ' + + sendretry_cycle: + type: num + valid_min: 1 + default: 1 + + description: + de: Pause zwischen Durchgängen von Sendeversuchen + en: wait time between sending retry rounds + description_long: + de: 'Pause zwischen Durchgängen von Sendeversuchen\n + Sind Send Retries aktiv, wird ein Scheduler erstellt, + der im angegebenen Sekundentakt Kommandos erneut sendet, + zu denen keine (passenden) Antworten erhalten wurden. + ' + en: 'wait time between sending retry rounds\n + If send retries are active, a scheduler gets added + that resends commands in the given cycle value (in seconds) + where no (suiting) answer got received. + ' + + delay_initial_read: + type: num + default: 0 + + description: + de: Warte nach Verbindungsaufbau mit dem Abfragen von Werten + en: Wait after connection with querying values + + resume_initial_read: + type: bool + defaul: false + description: + de: 'Bei resume vom Plugin erstmaliges Lesen erneut durchführen' + en: 'Repeat initial read on resume' + item_attributes: