diff --git a/oppo/__init__.py b/oppo/__init__.py index 2e9dfda8a..70f3d0d05 100755 --- a/oppo/__init__.py +++ b/oppo/__init__.py @@ -39,7 +39,7 @@ 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 CUSTOM_INPUT_NAME_COMMAND = 'custom_inputnames' @@ -63,6 +63,8 @@ def _set_device_defaults(self): self._parameters[PLUGIN_ATTR_CONNECTION] = CONN_NET_TCP_CLI 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() diff --git a/oppo/plugin.yaml b/oppo/plugin.yaml index 1210475d2..038121d2a 100755 --- a/oppo/plugin.yaml +++ b/oppo/plugin.yaml @@ -39,36 +39,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