Mir fehlt der Durchblick! Ich stelle gerade ein Plugin aus der laufenden 1.9.3 auf die neue 1.9.4 smarthomeNG um und scheitere!
Ich finde das Problem nicht. Die fehlende 'webif_pagelength' wird angemeckert, obwohl diese im Plugin in der yaml vorliegt
ich bin für jede Hilfe dankbar. Leider bringe ich das bisjetzt problemlos laufende Plugin nicht über die hier gezeigte Schwelle! Die eigentliche Arbeit, die Umstellung aud das neue mysql3 erreiche ich erst garnicht.
Wenn weitere Daten benötigt werden, bitte melden!
LG Wolfgang
Ich finde das Problem nicht. Die fehlende 'webif_pagelength' wird angemeckert, obwohl diese im Plugin in der yaml vorliegt
ich bin für jede Hilfe dankbar. Leider bringe ich das bisjetzt problemlos laufende Plugin nicht über die hier gezeigte Schwelle! Die eigentliche Arbeit, die Umstellung aud das neue mysql3 erreiche ich erst garnicht.
Wenn weitere Daten benötigt werden, bitte melden!
LG Wolfgang
Code:
2023-03-26 15:57:41 NOTICE lib.smarthome -------------------- Init SmartHomeNG v1.9.4-master (c0cfb39c) --------------------
2023-03-26 15:57:41 NOTICE lib.smarthome Running in Python interpreter 'v3.9.2 final', from directory /usr/local/smarthome
2023-03-26 15:57:41 NOTICE lib.smarthome - operating system 'Debian GNU/Linux 11 (bullseye)' (pid=31376)
2023-03-26 15:57:41 NOTICE lib.smarthome - on 'Raspberry Pi 4 v1.4, 8GB (Sony, UK)'
2023-03-26 15:57:42 NOTICE lib.smarthome - Nutze Feiertage für Land 'DE', Provinz 'BY', 3 benutzerdefinierte(r) Feiertag(e) definiert
2023-03-26 15:57:44 CRITICAL lib.module Module 'mqtt' (modules.mqtt) exception during import of __init__.py: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
eigene Logzeilen
2023-03-26 15:57:45 ERROR lib.smarthome Test Typ <class 'KeyError'>
2023-03-26 15:57:45 ERROR lib.smarthome Test Value 'webif_pagelength'
2023-03-26 15:57:45 ERROR lib.smarthome Test tb <traceback object at 0x7f7c3b1080>
2023-03-26 15:57:45 ERROR lib.smarthome Test mytb File "/usr/local/smarthome/bin/smarthome.py", line 292, in <module>
sh.start()
Ende eigener Log
File "/usr/local/smarthome/lib/smarthome.py", line 652, in start
self.plugins = lib.plugin.Plugins(self, configfile=self._plugin_conf_basename)
File "/usr/local/smarthome/lib/plugin.py", line 122, in __init__
plugin_name, self.meta = self._get_pluginname_and_metadata(plugin, _conf[plugin])
File "/usr/local/smarthome/lib/plugin.py", line 242, in _get_pluginname_and_metadata
meta = Metadata(self._sh, (plugin_name+plugin_version).replace('.',os.sep), 'plugin')
File "/usr/local/smarthome/lib/metadata.py", line 129, in __init__
self.global_parameters = self.get_global_plugin_parameters()
File "/usr/local/smarthome/lib/metadata.py", line 277, in get_global_plugin_parameters
result['webif_pagelength']['description'] = self._sh.modules.get_module('http')._metadata.meta['parameters']['webif_pagelength'].get('description', {'en': 'No description found!'})
2023-03-26 15:57:45 ERROR lib.smarthome Unhandled exception: 'webif_pagelength'
<class 'KeyError'>
running SmartHomeNG v1.9.4-master (c0cfb39c)
Exception: File "/usr/local/smarthome/bin/smarthome.py", line 292, in <module>
sh.start()
File "/usr/local/smarthome/lib/smarthome.py", line 652, in start
self.plugins = lib.plugin.Plugins(self, configfile=self._plugin_conf_basename)
File "/usr/local/smarthome/lib/plugin.py", line 122, in __init__
plugin_name, self.meta = self._get_pluginname_and_metadata(plugin, _conf[plugin])
File "/usr/local/smarthome/lib/plugin.py", line 242, in _get_pluginname_and_metadata
meta = Metadata(self._sh, (plugin_name+plugin_version).replace('.',os.sep), 'plugin')
File "/usr/local/smarthome/lib/metadata.py", line 129, in __init__
self.global_parameters = self.get_global_plugin_parameters()
File "/usr/local/smarthome/lib/metadata.py", line 277, in get_global_plugin_parameters
result['webif_pagelength']['description'] = self._sh.modules.get_module('http')._metadata.meta['parameters']['webif_pagelength'].get('description', {'en': 'No description found!'})
---- Main
Code:
# Metadata for the plugin
plugin:
# Global plugin attributes
type: protocol # plugin type (gateway, interface, protocol, system, web)
description:
de: 'Portfolioverwaltung, mit Unterstuetzung MySQL/SQLITE3 '
en: 'Portfoliomanagement, with support for MySQL/SQLITE3'
tester: schloessl
maintainer: schloessl
state: 'test'
keywords: aastockwert
# documentation: https://github.com/smarthomeNG/smarthome/wiki/CLI-Plugin # url of documentation (wiki) page
# support: https://knx-user-forum.de/forum/supportforen/smarthome-py
version: 1.0.0 # Plugin version (must match the version specified in __init__.py)
sh_minversion: 1.9 # minimum shNG version to use this plugin
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
# py_minversion: 3.7 # minimum Python version to use for this plugin
# py_maxversion: # maximum Python version to use for this plugin (leave empty if latest)
multi_instance: false # plugin supports multi instance
restartable: unknown
classname: Aastockwert # class containing the plugin
parameters:
# Definition of parameters to be configured in etc/plugin.yaml (enter 'parameters: NONE', if section should be empty)
# This parameter should be included if plugin provides a web interface. It lets users configure the standard number of entries per page
webif_pagelength:
type: int
default: 0
valid_list:
- -1
- 0
- 25
- 50
- 100
description:
de: 'Anzahl an Items, die standardmäßig in einer Web Interface Tabelle pro Seite angezeigt werden.
0 = automatisch, -1 = alle'
en: 'Number of items being listed in a web interface table per page by default.
0 = automatic, -1 = all'
description_long:
de: 'Anzahl an Items, die standardmäßig in einer Web Interface Tabelle pro Seite angezeigt werden.\n
Bei 0 wird die Tabelle automatisch an die Höhe des Browserfensters angepasst.\n
Bei -1 werden alle Tabelleneinträge auf einer Seite angezeigt.'
en: 'Amount of items being listed in a web interface table per page by default.\n
0 adjusts the table height automatically based on the height of the browser windows.\n
-1 shows all table entries on one page.'
param1:
type: str
description:
de: 'Demo Parameter rot 1.8.3'
en: 'Parameter for demonstration purposes'


Kommentar