Ankündigung

Einklappen
Keine Ankündigung bisher.

Debian 12 Websocket und Smartvisu Plugin Problem

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Debian 12 Websocket und Smartvisu Plugin Problem

    Hallo,
    ich habe ShNG auf Debian 12 neu installiert. Läuft auch erst mal. Datenbank usw. auch. Aber die Autogenerierung bekomme ich nicht zum laufen.
    Python Version:3.11.2
    SmartHomeNG Version:v1.9.5-master

    Fehler im Log:
    Code:
    2024-01-17  18:32:26 ERROR    lib.plugin        Plugin 'smartvisu' v1.8.6 from section 'smartvisu_pages'
    Exception: 'Websocket' object has no attribute 'set_smartvisu_support'
    running SmartHomeNG v1.9.5-master (646146a0f) / plugins v1.9.5-master (5c96886a)
    > Traceback (most recent call last):
    >   File "/usr/local/smarthome/lib/plugin.py", line 171, in __init__
    >     plugin_thread = PluginWrapper(smarthome, plugin, classname, classpath, args, instance, self.meta, self._configfile)
    >                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    >   File "/usr/local/smarthome/lib/plugin.py", line 656, in __init__
    >     exec("self.plugin.__init__(smarthome{0}{1})".format("," if len(arglist) else "", argstring))
    >   File "<string>", line 1, in <module>
    >   File "/usr/local/smarthome/plugins/smartvisu/__init__.py", line 100, in __init__
    >     self.mod_websocket.set_smartvisu_support(protocol_enabled=True, default_acl=self.default_acl, query_definitions=False, series_updatecycle=0)
    >     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    > AttributeError: 'Websocket' object has no attribute 'set_smartvisu_support'
    2024-01-17  19:32:28 NOTICE   lib.smarthome     --------------------   SmartHomeNG initialization finished   --------------------
    2024-01-17  19:40:19 NOTICE   modules.websocket Payload protocol 'smartvisu' is disabled - terminating connection​
    Instanzen:
    Code:
    ps ax | grep smarthome
      39305 ?        Sl     0:04 python3 bin/smarthome.py -r --pip3_command /home/smarthome/.local/lib/python3.10/site-packages/usr/local/bin/pip3
      39423 pts/3    S+     0:00 grep smarthome
    
    ​
    plugin.yaml
    Code:
    %YAML 1.1
    ---
    #BackendServer:
     #   plugin_name: backend
        #updates_allowed: False
    
    cli:
        plugin_name: cli
        plugin_enabled: True
        ip: 192.168.0.25
        #port: 2323
        update: True
        #hashed_password: 1245a9633edf47bf3736c81c5359b
    
    # memlog:
    #     class_name: MemLog
    #     class_path: plugins.memlog
    #     name: alert
    
    knx:
         plugin_name: knx
         plugin_enabled: True
    #     host: 192.168.0.3
    #     port: 6720
         send_time: 300    # update date/time every 60 seconds, default none
         time_ga: 20/0/0    # default none
    #     date_ga: 6/0/1    # default none
    #     busmonitor: True  # log all knx messages, default false
    #     readonly: True    ## don't write to knx bus, default false"
    #     instance: default
    
    # ow:
    #     class_name: OneWire
    #     class_path: plugins.onewire
    #     host: 127.0.0.1
    #     port: 4304
    
    # Bereitstellung eines Websockets zur Kommunikation zwischen SmartVISU und SmartHomeNG
    #websocket:
     #   plugin_name: visu_websocket
       # ip: 192.168.0.3
        #port: 2424
        #tls: no
        #wsproto: 4
        #acl: rw
    
    # Autogenerierung von Webseiten für SmartVISU
    smartvisu_pages:
        plugin_name: smartvisu
       # class_path: plugins.visu_smartvisu
    #    # '"neue" Linux Versionen (z.B. Debian > 8.x, Ubuntu > 14.x)'
        smartvisu_dir: /var/www/html/smartvisu
    #
    #    # nur \"alte\" Linux-Variationen
    #    # smartvisu_dir: /var/www/smartVISU
        generate_pages: True
        handle_widgets: True
        overwrite_templates: Yes
        visu_style: blk
    module.yaml
    Code:
    %YAML 1.1
    ---
    # etc/module.yaml
    # support for web server
    http:
        module_name: http
        starturl: admin
    
    # support for graphical admin interface
    admin:
        module_name: admin
    
    websocket:
        module_name: websocket
        enabled: True
        #port: 2424
        #tls_port: 2425
        #tls_key: myprivate.key
        #tls_cert: myprivate.pem
        #use_tls: true
    
    #enable, if mqtt protocol is going to be used
    #mqtt:
    #    module_name: mqtt
    Habe schon:
    pip uninstall websocket-client
    pip install websocket-client

    keine Änderung

    Adminberich wird angezeigt, die Smartvisu nur die Demoseite. gehe ich auf Config bleibt die Seite leer.

    Was stimmt da nicht?
    Lieben Dank
    VG Haxley



    #2
    Du verwendest eine Python-Version, auf der shNG v1.9.5 nicht läuft. Die Antwort hast Du hier auch schon erhalten.

    Die config-Seite der Visu müsste trotzdem angezeigt werden. Was passiert, wenn Du die config.ini löschst und die Visu neu startest?

    Gruß
    Wolfram
    Zuletzt geändert von wvhn; 17.01.2024, 20:29.

    Kommentar


      #3
      Ich habe ein Downgrade gemacht auf Python 3.9. Allerdings ist das irgendwie alles suboptimal, also wenn die einzige Möglichkeit ist Umgebungen zu nutzen, welche vier Jahre alt sind. (Phyton 3.9 ist von 2020)
      Vor allem kommt man ja nicht auf die Idee, wenn man alles neu installiert, so altes Zeug zu nutzen.

      Naja
      wvhn Danke Dir.

      Gruß Haxley

      Kommentar


        #4
        Na ja. Ich glaube, Du unterschätzt etwas den Aufwand für die Wartung und Weiterentwicklung eines Pakets wie smarthomeNG. Daran arbeiten ein paar wenige ehrenamtliche Mitstreiter. smartVISU mache ich praktisch alleine. An den Debian-Systemen, den Python-Packages und PHP arbeiten hingegen Hunderte von Entwicklern - teils hauptamtlich und finanziell gefördert von Stiftungen. Kein Wunder, dass da manchmal die Innovationen schneller entstehen und man mit den erforderlichen Anpassungen nicht ständig up to date sein kann.

        Deshalb ist es sicher keine schlechte Idee, vor den großen Systemupdates die Kompatibilität zu prüfen. Das Thema Python-Version ist über die Forensuche zu finden, da es hier schon mehrfach diskutiert wurde.

        Gruß
        Wolfram

        Kommentar

        Lädt...
        X