Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Hardware
    4. Problem beim Einbinden des Sonoff Zigbee Sticks in LXC

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Problem beim Einbinden des Sonoff Zigbee Sticks in LXC

    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      Greenhorn last edited by Negalein

      Hallo zusammen,
      möchte in meinem neu eingerichteten iobroker, in Proxmox-LXC auf Mini-PC laufend, den Sonoff Zigbee-Stick einrichten.
      Beim Durchreichen des USB-Dongles in den Container (hoffe, ich drücke mich einigermaßen korrekt/verständlich aus) gemäß Punkt Proxmox - LXC (Linux Containers) -> USB Geräte durchreichen habe ich mich allerdings verheddert. Der Adapter in iobroker bleibt auf gelb, es liegt wohl daran, dass er den Dongle gar nicht "sieht".
      Jedenfalls steht am Ende nicht wie im Punkt LXC Passthrough prüfen mit dem Befehl

      ls -l/dev 
      
      crw-rw-w- 1 nobody nogroup 166, 0 Feb 7 14:35 ttyACMo
      

      was bei mir vermutlich so aussehen müsste:

      crw-rw-w- 1 nobody nogroup 188, 0 Feb 7 14:35 ttyUSBo
      

      sondern:

      ---------- 1 root   root         0 Apr 29 11:45 ttyUSB0
      

      Der Stick ist angeschlossen an USB0 wie folgendes zeigt:

      root@pve:~# ls -l /dev/serial/by-id/
      total 0
      lrwxrwxrwx 1 root root 13 Apr 29 09:51 usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c4d856ba1ab6ed1196ded60ea8669f5d-if00-port0 -> ../../ttyUSB0
      

      Ich habe dann, wie in der Anleitung unter Punkt 5: Troubleshooting beschrieben, versucht eine dauerhafte Bindung für den Container zu erstellen, mich dabei aber wohl verheddert. Beim Versuch, das wieder rückgängig zu machen ist dann etwas schief gegangen, jedenfalls zeigt mir ein cold boot des Containers schon folgende Fehlermeldung.

      root@pve:~# pct stop 101
      lxc-stop: 101: ../src/lxc/confile.c: set_config_unsupported_key: 164 Invalid argument - Unsupported config key "lxc.mount.entry: /var/lib/lxc/CONTAINERID/devices/ttyUSB0 dev/ttyUSB0 none bind,optional,create"
      lxc-stop: 101: ../src/lxc/parse.c: lxc_file_for_each_line_mmap: 129 Failed to parse config file "/var/lib/lxc/101/config" at line "lxc.mount.entry: /var/lib/lxc/CONTAINERID/devices/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file"
      Failed to load config for 101
      lxc-stop: 101: ../src/lxc/tools/lxc_stop.c: lxc_stop_main: 144 Error opening container
      command 'lxc-stop -n 101 --kill' failed: exit code 1
      

      Ich komme nicht weiter, würde mich über Hilfe sehr freuen...

      crunchip 1 Reply Last reply Reply Quote 0
      • crunchip
        crunchip Forum Testing Most Active @Greenhorn last edited by

        @greenhorn habs zwar nur überflogen, gehe von einem Fehlerhaften Eintrag in der lxc config aus.
        Nach welcher Anleitung hast du es denn versucht?
        Doku

        G 1 Reply Last reply Reply Quote 0
        • G
          Greenhorn @crunchip last edited by

          @crunchip Ja, nach der genannten.

          1 Reply Last reply Reply Quote 0
          • G
            Greenhorn last edited by Negalein

            Die lxc-config sieht so aus:

            rch: amd64
            cores: 4
            features: nesting=1
            hostname: iobroker
            memory: 8000
            net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.178.1,hwaddr=BC:24:11:A5:EC:4E,ip=192.168.178.47/24,ip6=auto,type=veth
            onboot: 1
            ostype: debian
            rootfs: local-lvm:vm-101-disk-0,size=8G
            swap: 512
            unprivileged: 1
            lxc.cgroup2.devices.allow: c 189:* rwm
            lxc.mount.entry: usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c4d856ba1ab6ed1196ded60ea8669f5d-if00 dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c4d856ba1ab6ed1196ded6>
            lxc.cgroup2.devices.allow: c 188:* rwm
            lxc.mount.entry: /var/lib/lxc/CONTAINERID/devices/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
            
            crunchip 1 Reply Last reply Reply Quote 0
            • crunchip
              crunchip Forum Testing Most Active @Greenhorn last edited by crunchip

              @greenhorn sagte in Problem beim Einbinden des Sonoff Zigbee Sticks in LXC:

              lxc.cgroup2.devices.allow: c 189:* rwm
              lxc.mount.entry: usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c4d856ba1ab6ed1196ded60ea8669f5d-if00 dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c4d856ba1ab6ed1196ded6>

              Da ist das > zu viel am Ende bzw fehlen die letzten Ziffern deines Sticks

              Letztendlich sollte es so aussehen

              lxc.cgroup2.devices.allow: c 189:* rwm
              lxc.mount.entry: usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0012023529-if00 dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0012023529-if00 none bind,optional,create=file
              
              lxc.cgroup2.devices.allow: c 166:* rwm
              lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file 
              
              G 1 Reply Last reply Reply Quote 0
              • G
                Greenhorn @crunchip last edited by Greenhorn

                @crunchip Sorry, da hatte ich wohl beim Kopieren einen Teil abgeschnitten, deshalb das Zeichen am Ende.

                arch: amd64
                cores: 4
                features: nesting=1
                hostname: iobroker
                memory: 8000
                net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.178.1,hwaddr=BC:24:11:A5:EC:4E,ip=192.168.178.47/24,ip6=auto,type=veth
                onboot: 1
                ostype: debian
                rootfs: local-lvm:vm-101-disk-0,size=8G
                swap: 512
                unprivileged: 1
                lxc.cgroup2.devices.allow: c 189:* rwm
                lxc.mount.entry: usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c4d856ba1ab6ed1196ded60ea8669f5d-if00 dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c4d856ba1ab6ed1196ded60ea8669f5d-if00 none bind,optional,create=file
                lxc.cgroup2.devices.allow: c 188:* rwm
                lxc.mount.entry: /var/lib/lxc/CONTAINERID/devices/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
                
                crunchip 1 Reply Last reply Reply Quote 0
                • crunchip
                  crunchip Forum Testing Most Active @Greenhorn last edited by

                  @greenhorn sagte in Problem beim Einbinden des Sonoff Zigbee Sticks in LXC:

                  lxc.mount.entry: /var/lib/lxc/CONTAINERID/devices/ttyUSB0

                  Das ist auch falsch

                  G 2 Replies Last reply Reply Quote 0
                  • G
                    Greenhorn @crunchip last edited by

                    @crunchip Das hatte ich dann gemäß Punkt Troubleshooting eingefügt. Wenn ich das rausnehme, funktioniert es aber auch nicht. Das meine ich mit "verheddert"...

                    G 1 Reply Last reply Reply Quote 0
                    • G
                      Greenhorn @Greenhorn last edited by Greenhorn

                      @greenhorn Habs rausgenommen:

                      arch: amd64
                      cores: 4
                      features: nesting=1
                      hostname: iobroker
                      memory: 8000
                      net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.178.1,hwaddr=BC:24:11:A5:EC:4E,ip=192.168.178.47/24,ip6=auto,type=veth
                      onboot: 1
                      ostype: debian
                      rootfs: local-lvm:vm-101-disk-0,size=8G
                      swap: 512
                      unprivileged: 1
                      lxc.cgroup2.devices.allow: c 189:* rwm
                      lxc.mount.entry: usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c4d856ba1ab6ed1196ded60ea8669f5d-if00 dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c4d856ba1ab6ed1196ded60ea8669f5d-if00 none bind,optional,create=file
                      lxc.cgroup2.devices.allow: c 188:* rwm
                      lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
                      1 Reply Last reply Reply Quote 0
                      • G
                        Greenhorn @crunchip last edited by Greenhorn

                        @crunchip Verbessert (siehe oben) aber immer noch:

                        root@pve:/etc/pve/lxc# pct stop 101
                        lxc-stop: 101: ../src/lxc/confile.c: set_config_unsupported_key: 164 Invalid argument - Unsupported config key "lxc.mount.entry: /var/lib/lxc/CONTAINERID/devices/ttyUSB0 dev/ttyUSB0 none bind,optional,create"
                        lxc-stop: 101: ../src/lxc/parse.c: lxc_file_for_each_line_mmap: 129 Failed to parse config file "/var/lib/lxc/101/config" at line "lxc.mount.entry: /var/lib/lxc/CONTAINERID/devices/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file"
                        Failed to load config for 101
                        lxc-stop: 101: ../src/lxc/tools/lxc_stop.c: lxc_stop_main: 144 Error opening container
                        command 'lxc-stop -n 101 --kill' failed: exit code 1
                        G 1 Reply Last reply Reply Quote 0
                        • G
                          Greenhorn @Greenhorn last edited by

                          @greenhorn Und nachdem ich jetzt auch noch die Rechte gesetzt habe 🤦, siehts so aus:

                          root@pve:~# cd /etc/pve/lxc
                          root@pve:/etc/pve/lxc# chmod o+rw /dev/ttyUSB*
                          root@pve:/etc/pve/lxc# pct stop 101
                          trying to acquire lock...
                          can't lock file '/run/lock/lxc/pve-config-101.lock' - got timeout
                          root@pve:/etc/pve/lxc#
                          M 1 Reply Last reply Reply Quote 0
                          • M
                            mrjeschke @Greenhorn last edited by mrjeschke

                            @greenhorn
                            Ich habe mir die Sache etwas leichter gemacht. In der Proxmox-Konsole den serial/by-id namen kopiert.
                            Dann beim LXC-Container auf Ressources/add/Device-Passtrough
                            Dort den Namen reinkopiert. Zusätzlich UID/GID auf 1001 und Access-Mode auf 0666 gesetzt.
                            Container gestartet und beim zigbee-Adapter ebenfalls den serial/by-id reinkopiert. Fertig.
                            Keine Rule und keine conf-Datei zu bearbeiten.

                            Edit: Das Feature schein relativ neu zu sein. Vermutlich v8.2
                            2ccdb91f-3ca6-4e88-ad20-05fb63808bd3-image.png

                            G R 2 Replies Last reply Reply Quote 1
                            • G
                              Greenhorn @mrjeschke last edited by

                              @mrjeschke Danke für den Hinweis!
                              Alles gemacht wie beschrieben, leider am Ende wieder mit Fehlermeldung im LXC-Container unter Ressources/add/Device-Passtrough:

                              can't lock file '/run/lock/lxc/pve-config-101.lock' - got timeout (500)

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                mrjeschke @Greenhorn last edited by

                                @greenhorn
                                Der Fehler hat aber andere Ursachen. Wenn du mal danach suchst, wirst du diesen Fehler häufiger finden.
                                Falls ein Neustart von Proxmox nicht hilft, wird ein pct unlock <containerid> empfohlen.
                                In deinem Fall also

                                pct unlock 101
                                

                                Ob das hilft kann ich leider nicht sagen.

                                G 1 Reply Last reply Reply Quote 0
                                • G
                                  Greenhorn @mrjeschke last edited by

                                  @mrjeschke said in Problem beim Einbinden des Sonoff Zigbee Sticks in LXC:

                                  pct unlock 101

                                  root@pve:~# pct unlock 101
                                  trying to acquire lock...
                                  can't lock file '/run/lock/lxc/pve-config-101.lock' - got timeout
                                  

                                  😞

                                  crunchip 1 Reply Last reply Reply Quote 0
                                  • crunchip
                                    crunchip Forum Testing Most Active @Greenhorn last edited by

                                    @greenhorn das mal probieren ggf die jeweiligen Prozesse killen
                                    https://forum.proxmox.com/threads/cant-stop-container-lock-file-does-not-exist.104220/

                                    G 1 Reply Last reply Reply Quote 0
                                    • G
                                      Greenhorn @crunchip last edited by

                                      @crunchip Werd´jetzt leider nicht ganz schlau aus der Seite...
                                      Habe aber den Prozess gestoppt und versucht, den Stick nochmal einzurichten nach der Anleitung von mrjeschke, aber leider kommt jetzt wieder eine Meldung 😖

                                      command 'lxc-info -n 101 -p' failed: exit code 1 (500)

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        Greenhorn last edited by

                                        Und nach Neustart des Containers kommt die nächste Fehlermeldung:

                                        can't lock file '/run/lock/lxc/pve-config-101.lock' - got timeout (500)

                                        1 Reply Last reply Reply Quote 0
                                        • G
                                          Greenhorn last edited by

                                          Im Task-Viewer steht dazu folgendes:

                                          lxc-stop: 101: ../src/lxc/confile.c: set_config_unsupported_key: 164 Invalid argument - Unsupported config key "lxc.mount.entry: /var/lib/lxc/CONTAINERID/devices/ttyUSB0 dev/ttyUSB0 none bind,optional,create"
                                          lxc-stop: 101: ../src/lxc/parse.c: lxc_file_for_each_line_mmap: 129 Failed to parse config file "/var/lib/lxc/101/config" at line "lxc.mount.entry: /var/lib/lxc/CONTAINERID/devices/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file"
                                          Failed to load config for 101
                                          lxc-stop: 101: ../src/lxc/tools/lxc_stop.c: lxc_stop_main: 144 Error opening container
                                          command 'lxc-stop -n 101' failed: exit code 1

                                          Sind für mich Böhmische Dörfer😕

                                          crunchip 1 Reply Last reply Reply Quote 0
                                          • crunchip
                                            crunchip Forum Testing Most Active @Greenhorn last edited by crunchip

                                            @greenhorn lösche doch mal die Einträge in der config. Danach die laufenden Prozesse für den Neustart stoppen.
                                            Danach den lxc stoppen und wieder starten. ERST DANN, einen erneuten Versuch den Stick durch zu schleifen bzw einbinden, starten
                                            Dein Problem ist aktuell, aufgrund einer Fehlerhaften Eintragung in der config, dein mehrfacher Versuch den LXC stoppen/neuzustarten, daher die Meldung

                                            Error opening container
                                            command 'lxc-stop -n 101' failed: exit code 1
                                            
                                            G 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            516
                                            Online

                                            31.7k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            25
                                            1158
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo