(Gelöst) Proxmox: HM-CFG-USB wird im Container ignoriert

Begonnen von Clyde, 12 Januar 2025, 13:31:59

Vorheriges Thema - Nächstes Thema

Clyde

Der Stick HM-CFG-USB-2 wird an den Container per
"Device Passthrough" /dev/usb/hiddev0 durchgereicht und
ist da auch sichtbar.
In FHEM kann hmusb ihn aber nicht connecten.

Hardware: Mini-PC Minix Z100 Intel N100 16GB
-Proxmox: LXC mit FHEM auf Debian 12 - priviligiert


FHEM Log:
2025.01.12 12:59:16 3: Opening hmusb device 127.0.0.1:1234
2025.01.12 12:59:16 5: HMLAN_Send:  hmusb I:A424242
2025.01.12 12:59:16 5: HMLAN_Send:  hmusb I:C
2025.01.12 12:59:16 5: HMLAN_Send:  hmusb I:Y01,00,
2025.01.12 12:59:16 5: HMLAN_Send:  hmusb I:Y02,00,
2025.01.12 12:59:16 5: HMLAN_Send:  hmusb I:Y03,00,
2025.01.12 12:59:16 5: HMLAN_Send:  hmusb I:T2F166B14,02,00,00000000
2025.01.12 12:59:16 1: HMLAN_Parse: hmusb new condition init
2025.01.12 12:59:16 5: HMLAN_Send:  hmusb S:S5A61F774 stat:  00 t:00000000 d:01 r:5A61F774 m:99 8112 424242 000000
2025.01.12 12:59:16 3: hmusb device opened
2025.01.12 12:59:16 5: HMLAN_Send:  hmusb I:Y01,00,
2025.01.12 12:59:16 5: HMLAN_Send:  hmusb I:Y02,00,
2025.01.12 12:59:16 5: HMLAN_Send:  hmusb I:Y03,00,
2025.01.12 12:59:16 1: usb create starting
2025.01.12 12:59:16 3: Probing CUL device /dev/ttyACM0
2025.01.12 12:59:16 1: PERL WARNING: can't open file: /dev/ttyACM0: Permission denied at FHEM/DevIo.pm line 613.
2025.01.12 12:59:16 1: CUL: Can't open /dev/ttyACM0: Permission denied
2025.01.12 12:59:16 3: Probing CUL device /dev/ttyACM1
2025.01.12 12:59:16 1: PERL WARNING: can't open file: /dev/ttyACM1: Permission denied at FHEM/DevIo.pm line 613.
2025.01.12 12:59:16 1: CUL: Can't open /dev/ttyACM1: Permission denied
2025.01.12 12:59:16 3: Probing TCM_ESP3 device /dev/ttyUSB0
2025.01.12 12:59:16 1: PERL WARNING: can't open file: /dev/ttyUSB0: Permission denied at FHEM/DevIo.pm line 613.
2025.01.12 12:59:16 1: TCM_ESP3: Can't open /dev/ttyUSB0: Permission denied
2025.01.12 12:59:16 3: Probing TCM_ESP3 device /dev/ttyUSB1
2025.01.12 12:59:16 1: PERL WARNING: can't open file: /dev/ttyUSB1: Permission denied at FHEM/DevIo.pm line 613.
2025.01.12 12:59:16 1: TCM_ESP3: Can't open /dev/ttyUSB1: Permission denied
2025.01.12 12:59:16 1: usb create end
2025.01.12 12:59:16 0: Featurelevel: 6.3
2025.01.12 12:59:16 0: Server started with 7 defined entities (fhem.pl:29402/2024-12-05 perl:5.036000 os:linux user:fhem pid:166)
2025.01.12 12:59:16 1: 127.0.0.1:1234 disconnected, waiting to reappear (hmusb)
2025.01.12 12:59:16 1: HMLAN_Parse: hmusb new condition disconnected
2025.01.12 12:59:17 5: HttpUtils url=http://127.0.0.1:1234/ NonBlocking via http
2025.01.12 12:59:17 4: IP: 127.0.0.1 -> 127.0.0.1
2025.01.12 12:59:17 5: HMLAN_Send:  hmusb I:A424242
2025.01.12 12:59:17 5: HMLAN_Send:  hmusb I:C
2025.01.12 12:59:17 5: HMLAN_Send:  hmusb I:Y01,00,
2025.01.12 12:59:17 5: HMLAN_Send:  hmusb I:Y02,00,
2025.01.12 12:59:17 5: HMLAN_Send:  hmusb I:Y03,00,
2025.01.12 12:59:17 5: HMLAN_Send:  hmusb I:T2F166B15,02,00,00000000
2025.01.12 12:59:17 1: HMLAN_Parse: hmusb new condition init
2025.01.12 12:59:17 5: HMLAN_Send:  hmusb S:S5A61F7C7 stat:  00 t:00000000 d:01 r:5A61F7C7 m:99 8112 424242 000000
2025.01.12 12:59:17 1: 127.0.0.1:1234 reappeared (hmusb)
2025.01.12 12:59:17 1: 127.0.0.1:1234 disconnected, waiting to reappear (hmusb)
2025.01.12 12:59:17 1: HMLAN_Parse: hmusb new condition disconnected



Proxmox Knoten
root@proxmox:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 007: ID 1b1f:c00f eQ-3 Entwicklung GmbH HM-CFG-USB/HM-CFG-USB-2 [HomeMatic Configuration adapter]

root@proxmox:~# dmesg
[ 3529.978699] usb 3-2.3: new full-speed USB device number 6 using xhci_hcd
[ 3530.162097] usb 3-2.3: New USB device found, idVendor=1b1f, idProduct=c00f, bcdDevice= 9.67
[ 3530.162102] usb 3-2.3: New USB device strings: Mfr=4, Product=14, SerialNumber=36
[ 3530.162104] usb 3-2.3: Product: HM-CFG-USB
[ 3530.162105] usb 3-2.3: Manufacturer: eQ-3
[ 3530.162106] usb 3-2.3: SerialNumber: MEQxx
[ 3530.168582] hid-generic 0003:1B1F:C00F.0003: hiddev0,hidraw0: USB HID v1.10 Device [eQ-3 HM-CFG-USB] on usb-0000:00:14.0-2.3/input0



Proxmox Container
root@fhem:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 007: ID 1b1f:c00f eQ-3 Entwicklung GmbH HM-CFG-USB/HM-CFG-USB-2 [HomeMatic Configuration adapter]
Bus 003 Device 003: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@fhem:~# ls -l /dev
total 0
crw------- 1 root tty  136, 0 Jan 12 12:59 console
lrwxrwxrwx 1 root root     11 Jan 12 12:59 core -> /proc/kcore
lrwxrwxrwx 1 root root     13 Jan 12 12:59 fd -> /proc/self/fd
crw-rw-rw- 1 root root   1, 7 Jan 12 12:59 full
drwxr-xr-x 2 root root      0 Jan 12 12:59 hugepages
lrwxrwxrwx 1 root root     12 Jan 12 12:59 initctl -> /run/initctl
lrwxrwxrwx 1 root root     28 Jan 12 12:59 log -> /run/systemd/journal/dev-log
drwxrwxrwt 2 root root     40 Jan 12 12:59 mqueue
crw-rw-rw- 1 root root   1, 3 Jan 12 12:59 null
crw-rw-rw- 1 root root   5, 2 Jan 12 13:21 ptmx
drwxr-xr-x 2 root root      0 Jan 12 12:59 pts
crw-rw-rw- 1 root root   1, 8 Jan 12 12:59 random
drwxr-xr-x 3 root root     60 Jan 12 12:59 serial
drwxrwxrwt 2 root root     40 Jan 12 12:59 shm
lrwxrwxrwx 1 root root     15 Jan 12 12:59 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root     15 Jan 12 12:59 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root     15 Jan 12 12:59 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root root   5, 0 Jan 12 12:59 tty
crw------- 1 root tty  136, 1 Jan 12 13:21 tty1
crw--w---- 1 root tty  136, 2 Jan 12 12:59 tty2
---------- 1 root root      0 Jan 12 12:59 ttyACM0
---------- 1 root root      0 Jan 12 12:59 ttyACM1
---------- 1 root root      0 Jan 12 12:59 ttyUSB0
---------- 1 root root      0 Jan 12 12:59 ttyUSB1
crw-rw-rw- 1 root root   1, 9 Jan 12 12:59 urandom
drwxr-xr-x 2 root root     60 Jan 12 12:59 usb
crw-rw-rw- 1 root root   1, 5 Jan 12 12:59 zero
root@fhem:~# ls -l /dev/usb
total 0
crw-rw---- 1 root root 180, 0 Jan 12 12:59 hiddev0
root@fhem:~#

Ich vermute, das die Einbindung als hiddev0 das Problem ist.
Wäre für jede Hilfe dankbar.
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Ralli

Gruß,
Ralli

Proxmox 8.4 Cluster mit HP ED800G2i7, Intel NUC11TNHi7+NUC7i5BNH, virtualisiertes fhem 6.4 dev, virtualisierte RaspberryMatic (3.81.5.20250326) mit HB-RF-ETH 1.3.0 / RPI-RF-MOD, HM-LAN-GW (1.1.5) und HMW-GW, FRITZBOX 7490 (07.59), FBDECT, Siri und Alexa

DeeSPe

Was sagt denn:
ls -la /dev/serial/by-id/?

Die Einbindung über "/dev/serial/by-id/" ist m.E. zu bevorzugen.

Gruß
Dan
MAINTAINER: 22_HOMEMODE, 98_Hyperion, 98_FileLogConvert, 98_serviced

Als kleine Unterstützung für meine Programmierungen könnt ihr mir gerne einen Kaffee spendieren: https://buymeacoff.ee/DeeSPe

betateilchen

Ich würde zuerst das usb autocreate in FHEM abschalten.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Clyde

Habe jetzt bei initialUsbCheck
attr initialUsbCheck disable 1

LXC
root@fhem:/# ls -la /dev/serial/by-id/
total 0
drwxr-xr-x 2 root root 40 Jan 12 15:52 .
drwxr-xr-x 3 root root 60 Jan 12 15:52 ..

Auf dem Host gibt es kein /by-id/
root@proxmox:~# ls -la /dev/
total 4
drwxr-xr-x 19 root root          4420 Jan 12 15:51 .
drwxr-xr-x 18 root root          4096 Jan 10 07:26 ..
crw-r--r--  1 root root     10,   235 Jan 12 15:51 autofs
drwxr-xr-x  2 root root           420 Jan 12 15:51 block
crw-rw----  1 root disk     10,   234 Jan 12 15:51 btrfs-control
drwxr-xr-x  3 root root            60 Jan 12 15:51 bus
drwxr-xr-x  2 root root          4100 Jan 12 15:51 char
crw--w----  1 root tty       5,     1 Jan 12 15:51 console
lrwxrwxrwx  1 root root            11 Jan 12 15:51 core -> /proc/kcore
crw-------  1 root root     10,   123 Jan 12 15:51 cpu_dma_latency
crw-------  1 root root     10,   203 Jan 12 15:51 cuse
drwxr-xr-x  7 root root           140 Jan 12 15:51 disk
brw-rw----  1 root disk    252,     0 Jan 12 15:51 dm-0
brw-rw----  1 root disk    252,     1 Jan 12 15:51 dm-1
brw-rw----  1 root disk    252,     2 Jan 12 15:51 dm-2
brw-rw----  1 root disk    252,     3 Jan 12 15:51 dm-3
brw-rw----  1 root disk    252,     4 Jan 12 15:51 dm-4
brw-rw----  1 root disk    252,     5 Jan 12 15:51 dm-5
brw-rw----  1 root disk    252,     6 Jan 12 15:51 dm-6
drwxr-xr-x  2 root root            60 Jan 12 15:51 dma_heap
drwxr-xr-x  3 root root           100 Jan 12 15:51 dri
crw-------  1 root root     10,   125 Jan 12 15:51 ecryptfs
lrwxrwxrwx  1 root root            13 Jan 12 15:51 fd -> /proc/self/fd
crw-rw-rw-  1 root root      1,     7 Jan 12 15:51 full
crw-rw-rw-  1 root root     10,   229 Jan 12 15:51 fuse
crw-------  1 root root    254,     0 Jan 12 15:51 gpiochip0
crw-------  1 root root    239,     0 Jan 12 15:51 hidraw0
crw-------  1 root root     10,   228 Jan 12 15:51 hpet
drwxr-xr-x  2 root root             0 Jan 12 15:51 hugepages
crw-------  1 root root     10,   183 Jan 12 15:51 hwrng
crw-------  1 root root     89,     0 Jan 12 15:51 i2c-0
crw-------  1 root root     89,     1 Jan 12 15:51 i2c-1
crw-------  1 root root     89,     2 Jan 12 15:51 i2c-2
crw-------  1 root root     89,     3 Jan 12 15:51 i2c-3
crw-------  1 root root     89,     4 Jan 12 15:51 i2c-4
crw-------  1 root root     89,     5 Jan 12 15:51 i2c-5
crw-------  1 root root     89,     6 Jan 12 15:51 i2c-6
crw-------  1 root root     89,     7 Jan 12 15:51 i2c-7
crw-------  1 root root     89,     8 Jan 12 15:51 i2c-8
crw-------  1 root root     89,     9 Jan 12 15:51 i2c-9
lrwxrwxrwx  1 root root            12 Jan 12 15:51 initctl -> /run/initctl
drwxr-xr-x  3 root root           300 Jan 12 15:51 input
crw-r--r--  1 root root      1,    11 Jan 12 15:51 kmsg
crw-rw----  1 root kvm      10,   232 Jan 12 15:51 kvm
lrwxrwxrwx  1 root root            28 Jan 12 15:51 log -> /run/systemd/journal/dev-log
brw-rw----  1 root disk      7,     0 Jan 12 15:51 loop0
brw-rw----  1 root disk      7,     1 Jan 12 15:51 loop1
brw-rw----  1 root disk      7,     2 Jan 12 15:51 loop2
brw-rw----  1 root disk      7,     3 Jan 12 15:51 loop3
brw-rw----  1 root disk      7,     4 Jan 12 15:51 loop4
brw-rw----  1 root disk      7,     5 Jan 12 15:51 loop5
brw-rw----  1 root disk      7,     6 Jan 12 15:51 loop6
brw-rw----  1 root disk      7,     7 Jan 12 15:51 loop7
crw-rw----  1 root disk     10,   237 Jan 12 15:51 loop-control
drwxr-xr-x  2 root root           200 Jan 12 15:51 mapper
crw-------  1 root root     10,   227 Jan 12 15:51 mcelog
crw-------  1 root root    237,     0 Jan 12 15:51 mei0
crw-r-----  1 root kmem      1,     1 Jan 12 15:51 mem
drwxrwxrwt  2 root root            40 Jan 12 15:51 mqueue
crw-------  1 root root     90,     0 Jan 12 15:51 mtd0
crw-------  1 root root     90,     1 Jan 12 15:51 mtd0ro
drwxr-xr-x  2 root root            60 Jan 12 15:51 net
crw-------  1 root root    240,     0 Jan 12 15:51 ng0n1
crw-rw-rw-  1 root root      1,     3 Jan 12 15:51 null
crw-------  1 root root    241,     0 Jan 12 15:51 nvme0
brw-rw----  1 root disk    259,     0 Jan 12 15:51 nvme0n1
brw-rw----  1 root disk    259,     1 Jan 12 15:51 nvme0n1p1
brw-rw----  1 root disk    259,     2 Jan 12 15:51 nvme0n1p2
brw-rw----  1 root disk    259,     3 Jan 12 15:51 nvme0n1p3
crw-------  1 root root     10,   144 Jan 12 15:51 nvram
crw-r-----  1 root kmem      1,     4 Jan 12 15:51 port
crw-------  1 root root    108,     0 Jan 12 15:51 ppp
crw-------  1 root root     10,     1 Jan 12 15:51 psaux
crw-rw-rw-  1 root tty       5,     2 Jan 12 16:21 ptmx
drwxr-xr-x  2 root root             0 Jan 12 15:51 pts
drwxr-xr-x  2 root root           100 Jan 12 15:51 pve
crw-rw-rw-  1 root root      1,     8 Jan 12 15:51 random
crw-rw-r--  1 root root     10,   242 Jan 12 15:51 rfkill
lrwxrwxrwx  1 root root             4 Jan 12 15:51 rtc -> rtc0
crw-------  1 root root    248,     0 Jan 12 15:51 rtc0
drwxrwxrwt 13 root root           260 Jan 12 16:21 shm
crw-------  1 root root     10,   231 Jan 12 15:51 snapshot
drwxr-xr-x  3 root root           280 Jan 12 15:51 snd
lrwxrwxrwx  1 root root            15 Jan 12 15:51 stderr -> /proc/self/fd/2
lrwxrwxrwx  1 root root            15 Jan 12 15:51 stdin -> /proc/self/fd/0
lrwxrwxrwx  1 root root            15 Jan 12 15:51 stdout -> /proc/self/fd/1
crw-------  1 root root     10,   224 Jan 12 15:51 tpm0
crw-------  1 root root    253, 65536 Jan 12 15:51 tpmrm0
crw-rw-rw-  1 root tty       5,     0 Jan 12 15:51 tty
crw--w----  1 root tty       4,     0 Jan 12 15:51 tty0
crw--w----  1 root tty       4,     1 Jan 12 15:51 tty1
crw--w----  1 root tty       4,    10 Jan 12 15:51 tty10
crw--w----  1 root tty       4,    11 Jan 12 15:51 tty11
crw--w----  1 root tty       4,    12 Jan 12 15:51 tty12
crw--w----  1 root tty       4,    13 Jan 12 15:51 tty13
crw--w----  1 root tty       4,    14 Jan 12 15:51 tty14
crw--w----  1 root tty       4,    15 Jan 12 15:51 tty15
crw--w----  1 root tty       4,    16 Jan 12 15:51 tty16
crw--w----  1 root tty       4,    17 Jan 12 15:51 tty17
crw--w----  1 root tty       4,    18 Jan 12 15:51 tty18
crw--w----  1 root tty       4,    19 Jan 12 15:51 tty19
crw--w----  1 root tty       4,     2 Jan 12 15:51 tty2
crw--w----  1 root tty       4,    20 Jan 12 15:51 tty20
crw--w----  1 root tty       4,    21 Jan 12 15:51 tty21
crw--w----  1 root tty       4,    22 Jan 12 15:51 tty22
crw--w----  1 root tty       4,    23 Jan 12 15:51 tty23
crw--w----  1 root tty       4,    24 Jan 12 15:51 tty24
crw--w----  1 root tty       4,    25 Jan 12 15:51 tty25
crw--w----  1 root tty       4,    26 Jan 12 15:51 tty26
crw--w----  1 root tty       4,    27 Jan 12 15:51 tty27
crw--w----  1 root tty       4,    28 Jan 12 15:51 tty28
crw--w----  1 root tty       4,    29 Jan 12 15:51 tty29
crw--w----  1 root tty       4,     3 Jan 12 15:51 tty3
crw--w----  1 root tty       4,    30 Jan 12 15:51 tty30
crw--w----  1 root tty       4,    31 Jan 12 15:51 tty31
crw--w----  1 root tty       4,    32 Jan 12 15:51 tty32
crw--w----  1 root tty       4,    33 Jan 12 15:51 tty33
crw--w----  1 root tty       4,    34 Jan 12 15:51 tty34
crw--w----  1 root tty       4,    35 Jan 12 15:51 tty35
crw--w----  1 root tty       4,    36 Jan 12 15:51 tty36
crw--w----  1 root tty       4,    37 Jan 12 15:51 tty37
crw--w----  1 root tty       4,    38 Jan 12 15:51 tty38
crw--w----  1 root tty       4,    39 Jan 12 15:51 tty39
crw--w----  1 root tty       4,     4 Jan 12 15:51 tty4
crw--w----  1 root tty       4,    40 Jan 12 15:51 tty40
crw--w----  1 root tty       4,    41 Jan 12 15:51 tty41
crw--w----  1 root tty       4,    42 Jan 12 15:51 tty42
crw--w----  1 root tty       4,    43 Jan 12 15:51 tty43
crw--w----  1 root tty       4,    44 Jan 12 15:51 tty44
crw--w----  1 root tty       4,    45 Jan 12 15:51 tty45
crw--w----  1 root tty       4,    46 Jan 12 15:51 tty46
crw--w----  1 root tty       4,    47 Jan 12 15:51 tty47
crw--w----  1 root tty       4,    48 Jan 12 15:51 tty48
crw--w----  1 root tty       4,    49 Jan 12 15:51 tty49
crw--w----  1 root tty       4,     5 Jan 12 15:51 tty5
crw--w----  1 root tty       4,    50 Jan 12 15:51 tty50
crw--w----  1 root tty       4,    51 Jan 12 15:51 tty51
crw--w----  1 root tty       4,    52 Jan 12 15:51 tty52
crw--w----  1 root tty       4,    53 Jan 12 15:51 tty53
crw--w----  1 root tty       4,    54 Jan 12 15:51 tty54
crw--w----  1 root tty       4,    55 Jan 12 15:51 tty55
crw--w----  1 root tty       4,    56 Jan 12 15:51 tty56
crw--w----  1 root tty       4,    57 Jan 12 15:51 tty57
crw--w----  1 root tty       4,    58 Jan 12 15:51 tty58
crw--w----  1 root tty       4,    59 Jan 12 15:51 tty59
crw--w----  1 root tty       4,     6 Jan 12 15:51 tty6
crw--w----  1 root tty       4,    60 Jan 12 15:51 tty60
crw--w----  1 root tty       4,    61 Jan 12 15:51 tty61
crw--w----  1 root tty       4,    62 Jan 12 15:51 tty62
crw--w----  1 root tty       4,    63 Jan 12 15:51 tty63
crw--w----  1 root tty       4,     7 Jan 12 15:51 tty7
crw--w----  1 root tty       4,     8 Jan 12 15:51 tty8
crw--w----  1 root tty       4,     9 Jan 12 15:51 tty9
crw-------  1 root root      5,     3 Jan 12 15:51 ttyprintk
crw-rw----  1 root dialout   4,    64 Jan 12 15:51 ttyS0
crw-rw----  1 root dialout   4,    65 Jan 12 15:51 ttyS1
crw-rw----  1 root dialout   4,    74 Jan 12 15:51 ttyS10
crw-rw----  1 root dialout   4,    75 Jan 12 15:51 ttyS11
crw-rw----  1 root dialout   4,    76 Jan 12 15:51 ttyS12
crw-rw----  1 root dialout   4,    77 Jan 12 15:51 ttyS13
crw-rw----  1 root dialout   4,    78 Jan 12 15:51 ttyS14
crw-rw----  1 root dialout   4,    79 Jan 12 15:51 ttyS15
crw-rw----  1 root dialout   4,    80 Jan 12 15:51 ttyS16
crw-rw----  1 root dialout   4,    81 Jan 12 15:51 ttyS17
crw-rw----  1 root dialout   4,    82 Jan 12 15:51 ttyS18
crw-rw----  1 root dialout   4,    83 Jan 12 15:51 ttyS19
crw-rw----  1 root dialout   4,    66 Jan 12 15:51 ttyS2
crw-rw----  1 root dialout   4,    84 Jan 12 15:51 ttyS20
crw-rw----  1 root dialout   4,    85 Jan 12 15:51 ttyS21
crw-rw----  1 root dialout   4,    86 Jan 12 15:51 ttyS22
crw-rw----  1 root dialout   4,    87 Jan 12 15:51 ttyS23
crw-rw----  1 root dialout   4,    88 Jan 12 15:51 ttyS24
crw-rw----  1 root dialout   4,    89 Jan 12 15:51 ttyS25
crw-rw----  1 root dialout   4,    90 Jan 12 15:51 ttyS26
crw-rw----  1 root dialout   4,    91 Jan 12 15:51 ttyS27
crw-rw----  1 root dialout   4,    92 Jan 12 15:51 ttyS28
crw-rw----  1 root dialout   4,    93 Jan 12 15:51 ttyS29
crw-rw----  1 root dialout   4,    67 Jan 12 15:51 ttyS3
crw-rw----  1 root dialout   4,    94 Jan 12 15:51 ttyS30
crw-rw----  1 root dialout   4,    95 Jan 12 15:51 ttyS31
crw-rw----  1 root dialout   4,    68 Jan 12 15:51 ttyS4
crw-rw----  1 root dialout   4,    69 Jan 12 15:51 ttyS5
crw-rw----  1 root dialout   4,    70 Jan 12 15:51 ttyS6
crw-rw----  1 root dialout   4,    71 Jan 12 15:51 ttyS7
crw-rw----  1 root dialout   4,    72 Jan 12 15:51 ttyS8
crw-rw----  1 root dialout   4,    73 Jan 12 15:51 ttyS9
crw-rw----  1 root kvm      10,   124 Jan 12 15:51 udmabuf
crw-------  1 root root     10,   239 Jan 12 15:51 uhid
crw-------  1 root root     10,   223 Jan 12 15:51 uinput
crw-rw-rw-  1 root root      1,     9 Jan 12 15:51 urandom
drwxr-xr-x  2 root root            60 Jan 12 15:51 usb
crw-------  1 root root     10,   126 Jan 12 15:51 userfaultfd
crw-------  1 root root     10,   240 Jan 12 15:51 userio
crw-rw----  1 root tty       7,     0 Jan 12 15:51 vcs
crw-rw----  1 root tty       7,     1 Jan 12 15:51 vcs1
crw-rw----  1 root tty       7,     2 Jan 12 15:51 vcs2
crw-rw----  1 root tty       7,     3 Jan 12 15:51 vcs3
crw-rw----  1 root tty       7,     4 Jan 12 15:51 vcs4
crw-rw----  1 root tty       7,     5 Jan 12 15:51 vcs5
crw-rw----  1 root tty       7,     6 Jan 12 15:51 vcs6
crw-rw----  1 root tty       7,   128 Jan 12 15:51 vcsa
crw-rw----  1 root tty       7,   129 Jan 12 15:51 vcsa1
crw-rw----  1 root tty       7,   130 Jan 12 15:51 vcsa2
crw-rw----  1 root tty       7,   131 Jan 12 15:51 vcsa3
crw-rw----  1 root tty       7,   132 Jan 12 15:51 vcsa4
crw-rw----  1 root tty       7,   133 Jan 12 15:51 vcsa5
crw-rw----  1 root tty       7,   134 Jan 12 15:51 vcsa6
crw-rw----  1 root tty       7,    64 Jan 12 15:51 vcsu
crw-rw----  1 root tty       7,    65 Jan 12 15:51 vcsu1
crw-rw----  1 root tty       7,    66 Jan 12 15:51 vcsu2
crw-rw----  1 root tty       7,    67 Jan 12 15:51 vcsu3
crw-rw----  1 root tty       7,    68 Jan 12 15:51 vcsu4
crw-rw----  1 root tty       7,    69 Jan 12 15:51 vcsu5
crw-rw----  1 root tty       7,    70 Jan 12 15:51 vcsu6
drwxr-xr-x  2 root root            60 Jan 12 15:51 vfio
crw-------  1 root root     10,   127 Jan 12 15:51 vga_arbiter
crw-------  1 root root     10,   137 Jan 12 15:51 vhci
crw-rw----  1 root kvm      10,   238 Jan 12 15:51 vhost-net
crw-rw----  1 root kvm      10,   241 Jan 12 15:51 vhost-vsock
crw-rw-rw-  1 root root      1,     5 Jan 12 15:51 zero
crw-rw-rw-  1 root root     10,   249 Jan 12 15:51 zfs

Den Weg über die Einbindung in der 100.conf habe ich probiert.
Damit bin ich nicht erfolgreich gewesen.
Am Ende findet hmusb kein connect.

Ist das Durchreichen über "Device Passthrough" in der Proxmox-GUI denn falsch?
Das Gerät ist aus dem Container ja sichtbar:
root@fhem:/# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 1b1f:c00f eQ-3 Entwicklung GmbH HM-CFG-USB/HM-CFG-USB-2 [HomeMatic Configuration adapter]

root@fhem:/# ls -l /dev/usb/
total 0
crw-rw---- 1 root root 180, 0 Jan 12 15:52 hiddev0

Nur wird es hier denn überhaupt gefunden?

Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Otto123

zeig doch mal Deine Container cfg? cat /etc/pve/lxc/xxx.conf
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Clyde

arch: amd64
cores: 2
dev0: /dev/usb/hiddev0,uid=0
features: nesting=1
hostname: fhem
memory: 2048
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:22:77:02,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local-lvm:vm-100-disk-1,size=8G
swap: 512
tags: automation;community-script
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/serial/by-id  dev/serial/by-id  none bind,optional,create=dir
lxc.mount.entry: /dev/ttyACM0       dev/ttyACM0       none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM1       dev/ttyACM1       none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB0       dev/ttyUSB0       none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB1       dev/ttyUSB1       none bind,optional,create=file
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Otto123

#7
Ich vermute, die Einbindung über dev0 stimmt nicht ...

Zitat von: DeeSPe am 12 Januar 2025, 14:17:51Die Einbindung über "/dev/serial/by-id/" ist m.E. zu bevorzugen.
ist denn der hm-cfg-usb überhaupt über /dev/serial/by-id einbindbar?

Ich betreibe eine VM (kein LXC!) mit einem eq3 Stick (der hier: Bus 001 Device 006: ID 1b1f:c020 eQ-3 Entwicklung GmbH HmIP-RFUSB ) der wird an der VM! mit dem Eintrag
usb0: host=1b1f:c020,usb3=1 eingebunden.

Ich habe hier im Homematicforum eine Anleitung für LXC gefunden. https://homematic-forum.de/forum/viewtopic.php?t=48361
Um den hm-cfg-usb geht es am Ende der Anleitung! Sieht für mich irgendwie stimmig aus....
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Clyde

Ersteinmal herzlichen Dank an Euch für die prompte Hilfe! Noch ein paar Worte zum Hintergrund der Umsetzung.

Nach über 10 stabilen Jahren auf dem Cubietruck ist es Zeit für etwas neues.
Am Ende sollen auf dem System folgende Dienste ein Zuhause finden:
FHEM, Nextcloud, Octopi, Zigbee2mqtt, pihole

Homematic soll über einen vorhandenen HM-CFG-USB Stick angebunden werden
FS20,FHT über einen CUL
Tradfri über das das Ikea-Gateway

Ich habe bei Systemen und Linux nur geringe Kenntnisse, arbeite hauptsächlich
anwendungsorientiert mit HTML, PERL und PHP.

Ich habe die FHEM-Umsetzung als Container gegenüber VM bzgl. Ressourcen
vorgezogen. Sollte eine VM Lösung, wie bei dir Otto, mehr Vorteie haben,
würde ich diesen Weg einschlagen.

Das ganze soll nach dem Aufsetzen unaufgeregt und möglichst wartungsfreundlich laufen.
Stabilität würde ich priorisieren.

Würdet ihr das so umsetzen oder ist davon eher abzuraten? Evt. Argumente für andere Lösungen?
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Otto123

Guten Morgen,

Zitat von: Clyde am 13 Januar 2025, 07:07:30Sollte eine VM Lösung, wie bei dir Otto, mehr Vorteie haben,
würde ich diesen Weg einschlagen.
Das ist bei mir eine CCU3/RaspberryMatic VM, die läuft deswegen als VM weil dort Module geladen werden müssen, die man nicht im LXC installieren kann. Ich habe das nur erwähnt, weil ich dort nach einem eq3 Gerät schauen konnte. Ich meine, der hm-cfg-usb Adapter hat ein ähnlich gestricktes USB Interface.
FHEM im LXC Container ist aus meiner Sicht völlig in Ordnung. Schreib doch mal die Konfiguration aus dem Link von mir ab (IDs anpassen) und teste das. ;) Ich meine hier im Forum gibt es ein paar Threads wo das in der Art umgesetzt wurde.

CUL und der zigbee2mqtt Stick sind auf alle Fälle serielle Geräte, die findest Du dann unter dem von Dan schon erwähntem /dev/serial/by-id

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Ralli

Ich wiederhole noch einmal:

Zitat von: Ralli am 12 Januar 2025, 14:16:13Lies das einschließlich der Kommentare:

https://coldcorner.de/2018/07/12/proxmox-usb-passthrough-fuer-lxc-container-z-wave-uzb1/

Da steht alles drin. Und genau so habe ich bspw. einen auf Signalduino umgeflashten CUL in einen lxc eingebunden, in dem FHEM läuft.
Gruß,
Ralli

Proxmox 8.4 Cluster mit HP ED800G2i7, Intel NUC11TNHi7+NUC7i5BNH, virtualisiertes fhem 6.4 dev, virtualisierte RaspberryMatic (3.81.5.20250326) mit HB-RF-ETH 1.3.0 / RPI-RF-MOD, HM-LAN-GW (1.1.5) und HMW-GW, FRITZBOX 7490 (07.59), FBDECT, Siri und Alexa

Otto123

@Ralli in deinem Link geht es um serielle Geräte - ich zitiere mal das Homematic Forum:
ZitatDer HM-CFG-USB2 ist kein serielles Geraet.

Die Einstellungen für die seriellen Geräte hat Clyde in seiner Config schon drin.  ;)
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Clyde

Danke Ralli. Die Variante über die xxx.conf Datei, wie von Coldcorner, Cooltux und an verschiedenen anderen Stellen beschrieben, habe ich mehrfach probiert. Es sieht so aus, daß sich der HM-Stick anders als diese USB-Sticks verhält.

Ich probiere jetzt die von Otto verlinkte Variante aus dem Homematic Forum...
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

juergen012

Moin,

so hatte ich den Stick zum LXC durchgereicht:
https://www.youtube.com/watch?v=SPlDd1x89Zgletzlich bin ich doch auf eine VM umgestiegen. Da ist das durchreichen sehr einfach. Unter Hardware> USB-Gerät
Gruß Jürgen K.
Fhem unter Proxmox

Clyde

Das Durchreichen funktioniert so:
Auf dem Host
root@proxmox:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 1b1f:c00f eQ-3 Entwicklung GmbH HM-CFG-USB/HM-CFG-USB-2 [HomeMatic Configuration adapter]
Bus 003 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 003 Device 004: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 003 Device 005

führt zu folgenden 2 Zahlen: 189,260

root@proxmox:~# ls -l /dev/bus/usb/003/005
crw-rw-r-- 1 root root 189, 260 Jan 14 15:23 /dev/bus/usb/003/005

Die 189 wird notiert.
Jetzt die Containerkonfigurationsdatei ergänzen (Bei mir 100.conf)

root@proxmox:~# nano /etc/pve/lxc/100.conf
Zwei Zeilen habe ich entsprechend ergänzt:
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/003/005  dev/bus/usb/003/005   none bind,optional,create=file

Speichern und den Container neu starten.

Im Container ist der Stick nun durchgereicht und hier zu finden:
root@fhem:~# ls -l /dev/bus/usb/003/005
crw-rw-r-- 1 root root 189, 260 Jan 14 15:42 /dev/bus/usb/003/005

In FHEM: hmusb und eine VCCU installiert.
Ein HM-Steckdose anlernen und schalten funktioniert.

Soweit so gut. Wenn allerdings der Stick abgezogen wird oder er bei einem Neustart eine neue Nummer bekommt passt sich diese Konfiguration nicht an. Er wird nicht richtig durchgereicht. Das ist nicht optimal und ich versuche einen ergänzenden Ansatz...

Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Clyde

Strategie: Auf dem Host wird ein Symlink erzeugt der dem Stick entspricht, auch wenn sich seine Zuordnung ändert. Über diesen Symlink soll das Durchreichen flexibler werden.

Mit Bus und Device Nummer aus dem vorhergehenden Post bekommt man
  idVendor           0x1b1f eQ-3 Entwicklung GmbH
  idProduct          0xc00f HM-CFG-USB/HM-CFG-USB-2 [HomeMatic Configuration adapter]

root@proxmox:~# lsusb -vs 003:005

Bus 003 Device 005: ID 1b1f:c00f eQ-3 Entwicklung GmbH HM-CFG-USB/HM-CFG-USB-2 [HomeMatic Configuration adapter]
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x1b1f eQ-3 Entwicklung GmbH
  idProduct          0xc00f HM-CFG-USB/HM-CFG-USB-2 [HomeMatic Configuration adapter]
  bcdDevice            9.67
  iManufacturer           4 eQ-3
  iProduct               14 HM-CFG-USB
...

Jetzt damit eine Regel anlegen und den Symlink erzeugen:

root@proxmox:~# nano /etc/udev/rules.d/99-usb-serial.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b1f", ATTRS{idProduct}=="c00f", SYMLINK+="hmusb"
Einbinden:
root@proxmox:~# udevadm trigger
Der Link ist hier zu sehen:
root@proxmox:~# ls -l /dev/hm*
lrwxrwxrwx 1 root root 15 Jan 14 16:08 /dev/hmusb -> bus/usb/003/005

Stick einmal abstecken und wieder dran:

root@proxmox:~# ls -l /dev/hm*
lrwxrwxrwx 1 root root 15 Jan 14 16:08 /dev/hmusb -> bus/usb/003/006


Der Link folgt dem Stick. Jetzt muß ein funktionsfähiger Mount erzeugt werden:
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Clyde

#16
Mit dem Symlink

/dev/hmusb -> bus/usb/003/006

  root@proxmox:~# nano /etc/udev/rules.d/99-usb-serial.rules
  SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b1f", ATTRS{idProduct}=="c00f", SYMLINK+="hmusb"

versuche ich die Containerconfig wie folgt anzupassen;

100.conf
arch: amd64
cores: 2
features: nesting=1
hostname: fhem
memory: 2048
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:22:77:02,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local-lvm:vm-100-disk-1,size=8G
swap: 512
tags: automation;community-script
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/hmusb            dev/hmusb             none bind,optional,create=file


Der Link ist im LXC vorhanden wird aber nicht "gefunden"
root@fhem:~# ls -l /dev/hm*
crw-rw-r-- 1 root root 189, 261 Jan 14 16:11 /dev/hmusb

Die statische Durchreichung ist rausgenommen und auch nicht da.
root@fhem:~# ls -l /dev/bus/usb/003/006
ls: cannot access '/dev/bus/usb/003/006': No such file or directory

Also kann FHEM mit dem Link so nichts anfangen.
Jetzt frage ich mich, wie man diesen Link durchreichen kann?
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Ralli

#17
Zitat von: Clyde am 14 Januar 2025, 15:56:50Soweit so gut. Wenn allerdings der Stick abgezogen wird oder er bei einem Neustart eine neue Nummer bekommt passt sich diese Konfiguration nicht an. Er wird nicht richtig durchgereicht. Das ist nicht optimal und ich versuche einen ergänzenden Ansatz...

Zum dritten mal:

Lies auch die Kommentare unter dem von mir geposteten Link. Da steht die Lösung zu genau dieser Problemstellung drin, welche ich auch bei mir genau so (erfolgreich) übernommen habe. Stichwort: udev rule.
Gruß,
Ralli

Proxmox 8.4 Cluster mit HP ED800G2i7, Intel NUC11TNHi7+NUC7i5BNH, virtualisiertes fhem 6.4 dev, virtualisierte RaspberryMatic (3.81.5.20250326) mit HB-RF-ETH 1.3.0 / RPI-RF-MOD, HM-LAN-GW (1.1.5) und HMW-GW, FRITZBOX 7490 (07.59), FBDECT, Siri und Alexa

Clyde

Ja, udev rule wird wie oben gezeigt bei mir ja angesetzt, läuft aber nicht durch. In deinem Link wird ein Stick verwendet, der nicht wie der HM-CFG-USB-2 eingebunden wird, vorrausgesetzt. Damit komme ich hier nicht weiter. Die Rule ist übrigens gleich angesetzt. Der durchgereichte Symlink kann von FHEM aber so nicht verwendet werden.

Ich vermute FHEM sucht in /dev/bus/usb/...
der Symlink steht aber bei /dev/hmusb

Genau da komme ich nicht weiter.
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Otto123

was sagt denn der hmland dazu?
ZitatRun hmland (with debugging the first time, see -h switch): ./hmland -p 1234 -D
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Clyde

root@fhem:/# /etc/init.d/hmland stop
Stopping hmland (via systemctl): hmland.service.
root@fhem:/# /opt/hmcfgusb/hmland -p 1234 -D


Keine Ausgabe auf der Konsole. Gibts irgendwo ein Logfile?
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Ralli

#21
Zitat von: Clyde am 14 Januar 2025, 17:04:30Ja, udev rule wird wie oben gezeigt bei mir ja angesetzt, läuft aber nicht durch. In deinem Link wird ein Stick verwendet, der nicht wie der HM-CFG-USB-2 eingebunden wird, vorrausgesetzt. Damit komme ich hier nicht weiter. Die Rule ist übrigens gleich angesetzt. Der durchgereichte Symlink kann von FHEM aber so nicht verwendet werden.

Mir scheint, dass deine Berechtigungen nicht passen.

Auf dem Host, auf dem mein lxc mit durchgereichtem Stick läuft, habe ich folgendes:

root@pve-n3:/dev# ls -la ttyA*
crw-rw-rw- 1 root dialout 166, 0 Jan 11 13:51 ttyACM0
root@pve-n3:/dev# ls -la /dev/bus/usb/001/002
crw-rw-r-- 1 root root 189, 1 Jan 11 13:51 /dev/bus/usb/001/002

Im lxc wiederum habe ich folgendes:

root@weather-fhem:/dev# ls -la ttyA*
crw-rw-rw- 1 nobody nogroup 166, 0 Jan 11 13:51 ttyACM0
root@weather-fhem:/dev# ls -la /dev/bus/usb/001/002
crw-rw-r-- 1 nobody nogroup 189, 1 Jan 11 13:51 /dev/bus/usb/001/002

Das ist ein Auszug aus meiner lxc.conf:

root@pve-n3:/etc/pve/local/lxc# cat 109.conf
arch: amd64
cores: 4
features: nesting=1
memory: 512
onboot: 1
ostype: debian
swap: 512
unprivileged: 1
lxc.cgroup.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/001/002 dev/bus/usb/001/002 none bind,optional,create=file
lxc.cgroup.devices.allow: c 166:* rwm
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file

Und das ist die rule:

root@pve-n3:/etc/udev/rules.d# cat 50-myusb.rules
KERNEL=="ttyACM[0-9]*",MODE="0666"

Die Zahlen (IDs) werden bei dir so nicht genau passen, da ist es wichtig, dass man Schritt für Schritt die Anleitung entsprechend verfolgt.
Gruß,
Ralli

Proxmox 8.4 Cluster mit HP ED800G2i7, Intel NUC11TNHi7+NUC7i5BNH, virtualisiertes fhem 6.4 dev, virtualisierte RaspberryMatic (3.81.5.20250326) mit HB-RF-ETH 1.3.0 / RPI-RF-MOD, HM-LAN-GW (1.1.5) und HMW-GW, FRITZBOX 7490 (07.59), FBDECT, Siri und Alexa

Clyde

Wenn statisch durchgereicht wird läuft es, es ist das Problem wenn der stick dann abgesteckt wird und wieder dran kommt dann stimmt die Devicenummer nicht mehr. Daher versuchte ich mit einem Symlink zu arbeiten.
Da weiß ich aber nicht wie ich den ansetzen muss, damit er richtig durchgegeben wird.

root@fhem:~# /etc/init.d/hmland stop
Stopping hmland (via systemctl): hmland.service.
root@fhem:~# /opt/hmcfgusb/hmland -p 1234 -D
2025-01-14 17:39:11.462022: Client 127.0.0.1 connected!

USB < 0x0000: 4b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   K...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 48 09 48 4d 2d 55 53 42 2d 49 46 03 c7 0a 4d 45   H.HM-USB-IF...ME
USB > 0x0010: 51 30 32 33 32 35 36 32 37 2e 24 42 42 42 00 02   Q02325627.$BBB..
USB > 0x0020: 57 53 00 02 06 00 00 00 00 00 00 00 00 00 00 00   WS..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-14 17:39:11.544069: LAN < HHM-USB-IF,03C7,MEQ0232562,372E24,424242,00025753,0002,06
usb-transfer took 64ms!
2025-01-14 17:39:11.544223: LAN > A424242

USB < 0x0000: 41 42 42 42 00 00 00 00 00 00 00 00 00 00 00 00   ABBB............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-14 17:39:11.607812: LAN > C

USB < 0x0000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   C...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-14 17:39:11.671945: LAN > +5FFF1C,00,00,00

USB < 0x0000: 2b 5f ff 1c 00 00 01 00 00 00 00 00 00 00 00 00   +_..............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-14 17:39:11.735975: LAN > +52CD03,00,00,00

USB < 0x0000: 2b 52 cd 03 00 00 01 00 00 00 00 00 00 00 00 00   +R..............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-14 17:39:11.799935: LAN > Y01,00,

USB < 0x0000: 59 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00   Y...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 49 00 00 00 00 55 53 42 2d 49 46 03 c7 0a 4d 45   I....USB-IF...ME
USB > 0x0010: 51 30 32 33 32 35 36 32 37 2e 24 42 42 42 00 02   Q02325627.$BBB..
USB > 0x0020: 57 53 00 02 06 00 00 00 00 00 00 00 00 00 00 00   WS..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-14 17:39:11.864051: LAN < I00,00,00,00
usb-transfer took 64ms!
2025-01-14 17:39:11.864143: LAN > Y02,00,

USB < 0x0000: 59 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00   Y...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 49 00 00 00 00 55 53 42 2d 49 46 03 c7 0a 4d 45   I....USB-IF...ME
USB > 0x0010: 51 30 32 33 32 35 36 32 37 2e 24 42 42 42 00 02   Q02325627.$BBB..
USB > 0x0020: 57 53 00 02 06 00 00 00 00 00 00 00 00 00 00 00   WS..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-14 17:39:11.928045: LAN < I00,00,00,00
usb-transfer took 63ms!
2025-01-14 17:39:11.928159: LAN > Y03,00,

USB < 0x0000: 59 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00   Y...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 49 00 00 00 00 55 53 42 2d 49 46 03 c7 0a 4d 45   I....USB-IF...ME
USB > 0x0010: 51 30 32 33 32 35 36 32 37 2e 24 42 42 42 00 02   Q02325627.$BBB..
USB > 0x0020: 57 53 00 02 06 00 00 00 00 00 00 00 00 00 00 00   WS..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-14 17:39:11.992020: LAN < I00,00,00,00
usb-transfer took 63ms!
2025-01-14 17:39:11.992134: LAN > T2F194FAF,02,00,00000000

USB < 0x0000: 54 2f 19 4f af 02 00 00 00 00 00 00 00 00 00 00   T/.O............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 64ms!
2025-01-14 17:39:12.055917: LAN > S65AEF2FA,00,00000000,01,65AEF2FA,998112424242000000

USB < 0x0000: 53 65 ae f2 fa 00 00 00 00 00 01 65 ae f2 fa 09   Se.........e....
USB < 0x0010: 99 81 12 42 42 42 00 00 00 00 00 00 00 00 00 00   ...BBB..........
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 52 65 ae f2 fa 00 02 00 00 00 00 ff 7f ff 09 99   Re..............
USB > 0x0010: 81 12 42 42 42 00 00 00 37 2e 24 42 42 42 00 02   ..BBB...7.$BBB..
USB > 0x0020: 57 53 00 02 06 00 00 00 00 00 00 00 00 00 00 00   WS..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-14 17:39:12.120048: LAN < R65AEF2FA,0002,00000000,FF,7FFF,998112424242000000
usb-transfer took 64ms!
2025-01-14 17:39:12.165460: LAN > K

USB < 0x0000: 4b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   K...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 48 09 48 4d 2d 55 53 42 2d 49 46 03 c7 0a 4d 45   H.HM-USB-IF...ME
USB > 0x0010: 51 30 32 33 32 35 36 32 37 2e 24 42 42 42 00 02   Q02325627.$BBB..
USB > 0x0020: 59 f3 00 02 06 00 00 00 00 00 00 00 00 00 00 00   Y...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-14 17:39:12.216015: LAN < HHM-USB-IF,03C7,MEQ0232562,372E24,424242,000259F3,0002,06
usb-transfer took 50ms!
2025-01-14 17:39:17.466056: LAN > S65AF0A6D,00,00000000,01,65AF0A6D,77A00142424252CD03010E

USB < 0x0000: 53 65 af 0a 6d 00 00 00 00 00 01 65 af 0a 6d 0b   Se..m......e..m.
USB < 0x0010: 77 a0 01 42 42 42 52 cd 03 01 0e 00 00 00 00 00   w..BBBR.........
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 61ms!

USB > 0x0000: 52 65 af 0a 6d 00 08 00 00 00 00 ff 7f ff 0b 77   Re..m..........w
USB > 0x0010: a0 01 42 42 42 52 cd 03 01 0e 24 42 42 42 00 02   ..BBBR....$BBB..
USB > 0x0020: 59 f3 00 02 06 00 00 00 00 00 00 00 00 00 00 00   Y...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-14 17:39:18.103651: LAN < R65AF0A6D,0008,00000000,FF,7FFF,77A00142424252CD03010E
2025-01-14 17:39:18.468001: LAN > S65AF0E57,00,00000000,01,65AF0E57,4DB0014242425FFF1C010E

USB < 0x0000: 53 65 af 0e 57 00 00 00 00 00 01 65 af 0e 57 0b   Se..W......e..W.
USB < 0x0010: 4d b0 01 42 42 42 5f ff 1c 01 0e 00 00 00 00 00   M..BBB_.........
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 51ms!

USB > 0x0000: 45 5f ff 1c 00 00 00 02 74 8a ff ff d8 0e 4d a4   E_......t.....M.
USB > 0x0010: 10 5f ff 1c 42 42 42 06 01 c8 00 00 42 42 00 02   ._..BBB.....BB..
USB > 0x0020: 59 f3 00 02 06 00 00 00 00 00 00 00 00 00 00 00   Y...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-14 17:39:19.031605: LAN < E5FFF1C,0000,0002748A,FF,FFD8,4DA4105FFF1C4242420601C80000

USB > 0x0000: 52 65 af 0e 57 00 01 00 02 74 8f ff ff d8 0e 4d   Re..W....t.....M
USB > 0x0010: a4 10 5f ff 1c 42 42 42 06 01 c8 00 00 42 00 02   .._..BBB.....B..
USB > 0x0020: 59 f3 00 02 06 00 00 00 00 00 00 00 00 00 00 00   Y...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-14 17:39:19.127538: LAN < R65AF0E57,0001,0002748F,FF,FFD8,4DA4105FFF1C4242420601C80000
2025-01-14 17:39:19.469997: LAN > S65AF1241,00,00000000,01,65AF1241,4EB0014242425FFF1C020E

USB < 0x0000: 53 65 af 12 41 00 00 00 00 00 01 65 af 12 41 0b   Se..A......e..A.
USB < 0x0010: 4e b0 01 42 42 42 5f ff 1c 02 0e 00 00 00 00 00   N..BBB_.........
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 41ms!
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Clyde

#23
Der Stick wird mit

lxc.mount.entry: /dev/bus/usb/003/003  dev/bus/usb/003/003   none bind,optional,create=file
durchgereicht und wird erkannt wenn /dev/bus/usb/003/003 passt.

ttyACM0
ttyACM1
ttyUSB0
ttyUSB1

sind beim HM-CFG-USB-2 nicht relevat wie ich es verstehe.
Die reiche ich nicht durch und es funktioniert.

Problem ist nach dem An/Abstecken ändert es sich von

/dev/bus/usb/003/003  -> /dev/bus/usb/003/005


und es geht nicht mehr.

Daher der Versuch mit der Rule

SUBSYSTEMS=="usb",DRIVERS=="usb", ATTRS{idVendor}=="1b1f", ATTRS{idProduct}=="c00f", SYMLINK+="hmusb"

und

lxc.mount.entry: /dev/hmusb            dev/hmusb             none bind,optional,create=file

Das wird so durchgegeben aber bei /dev/hmusb scheint FHEM nicht zu suchen bzw. kann mit dem Link nicht arbeiten.
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Otto123

Zitat von: Clyde am 14 Januar 2025, 17:33:40Keine Ausgabe auf der Konsole. Gibts irgendwo ein Logfile?
Ich habe das Teil nicht und kann nur Googeln: 11 Jahre früher ;)
https://forum.fhem.de/index.php?topic=13071.msg110681#msg110681
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Ralli

Zitat von: Clyde am 14 Januar 2025, 17:52:12SUBSYSTEMS=="usb",DRIVERS=="usb", ATTRS{idVendor}=="1b1f", ATTRS{idProduct}=="c00f", SYMLINK+="hmusb"

und

lxc.mount.entry: /dev/hmusb            dev/hmusb            none bind,optional,create=file

Das wird so durchgegeben aber bei /dev/hmusb scheint FHEM nicht zu suchen bzw. kann mit dem Link nicht arbeiten.


Die Rule sieht grds. gut aus. Berechtigungen auf /dev/hmusb ? Kann in FHEM das Device nicht fest auf diesen Pfad definiert werden?
Gruß,
Ralli

Proxmox 8.4 Cluster mit HP ED800G2i7, Intel NUC11TNHi7+NUC7i5BNH, virtualisiertes fhem 6.4 dev, virtualisierte RaspberryMatic (3.81.5.20250326) mit HB-RF-ETH 1.3.0 / RPI-RF-MOD, HM-LAN-GW (1.1.5) und HMW-GW, FRITZBOX 7490 (07.59), FBDECT, Siri und Alexa

Otto123

Zitat von: Ralli am 15 Januar 2025, 08:01:19Kann in FHEM das Device nicht fest auf diesen Pfad definiert werden?
ich will nochmal klar sagen: FHEM redet hier nicht direkt mit dem Gerät, das entsprechende FHEM Modul spricht über das Netzwerk mit einem Dienst der mit dem Gerät redet.
Es geht darum, ob > hmland < das Gerät ansprechen kann. Der läuft mW als root.
Eventuell kann der aber mit dem symlink im Container nichts anfangen?

Ich war schon früher mal der Meinung, ob es in solch offenbar schwierigen Fällen nicht einfacher ist diesen Dienst auf dem Host laufen zu lassen. Ob der dort damit klar kommt, dass der Stick im Betrieb ab und angesteckt wird, weiß ich nicht.
Ich weiß nur, der "Nachfolge Stick" von eq3 HmIp-RFUSB läuft in einem LXC Container für RaspberryMatic nur, wenn Kernelmodule auf dem Host installiert werden. Deswegen betreibe ich den in einer fertigen VM.
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Ralli

Otto, das kommt halt darauf an.

Du kannst natürlich auch im FHEM-Contaniner den hmland laufen lassen, dann braucht der hmland bzw. dieser Container den Zugriff auf den durchgereichten Stick. Wenn du den hmland woanders laufen lässt, bspw. auf dem Host oder auf einer ganz anderen Maschine, dann brauchst du natürlich auch aus dem FHEM-Container keinen Zugriff auf das USB-Device - und ja, da bin ich bei dir, das ist sicherlich die einfachere Methode.

Ich persönlich habe für HmIP und HM-RF eh einen anderen Weg beschritten, ich nutze HB-RF-ETH 1.3.0 / RPI-RF-MOD, da muss ich mir über die Themen überhaupt keine Gedanken machen.
Gruß,
Ralli

Proxmox 8.4 Cluster mit HP ED800G2i7, Intel NUC11TNHi7+NUC7i5BNH, virtualisiertes fhem 6.4 dev, virtualisierte RaspberryMatic (3.81.5.20250326) mit HB-RF-ETH 1.3.0 / RPI-RF-MOD, HM-LAN-GW (1.1.5) und HMW-GW, FRITZBOX 7490 (07.59), FBDECT, Siri und Alexa

Clyde

Also wenn ich das richtig verstehe könnte man hmland auf dem Proxmox Host laufen lassen und dann vom LXC FHEM darauf dann zugreifen. Dazu bin ich jetzt einmal wie folgt vorgegangen. Ich habe hmland mit dem Script aus dem Wiki installiert:

https://forum.fhem.de/index.php/topic,13071.msg190887.html#msg190887

Das läuft so:
root@proxmox:~# service hmland status
● hmland.service - LSB: Start hmland daemon at boot time
     Loaded: loaded (/etc/init.d/hmland; generated)
     Active: active (running) since Sun 2025-01-19 11:45:43 CET; 13min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 10531 ExecStart=/etc/init.d/hmland start (code=exited, status=0/SUCCESS)
      Tasks: 2 (limit: 18845)
     Memory: 816.0K
        CPU: 3ms
     CGroup: /system.slice/hmland.service
             ├─10533 perl -ne "\$|=1; print localtime . \": [hmland] \$_\""
             └─10534 /opt/hmcfgusb/hmland -r 0 -d -P -l 127.0.0.1 -p 1234

Jan 19 11:45:43 proxmox systemd[1]: Starting hmland.service - LSB: Start hmland daemon at boot time...
Jan 19 11:45:43 proxmox systemd[1]: Started hmland.service - LSB: Start hmland daemon at boot time.
root@proxmox:~# service hmland stop
root@proxmox:~# /opt/hmcfgusb/hmland -p 1234 -D
2025-01-19 12:00:14.251172: Client 192.168.2.37 connected!

USB > 0x0000: 45 79 4e 98 00 00 00 01 4f 91 ff ff cd 0f 51 86   EyN.....O.....Q.
USB > 0x0010: 10 79 4e 98 00 00 00 0a 68 9f 0f 00 40 03 47 09   .yN.....h...@.G.
USB > 0x0020: 24 fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00   $...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB < 0x0000: 4b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   K...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 36 d2 4f 00 00 00 2b 91 f9 ff ff b3 14 0f 84   E6.O...+........
USB > 0x0010: 5e 36 d2 4f 00 00 00 85 d1 2a 00 07 73 00 90 09   ^6.O.....*..s...
USB > 0x0020: 2f fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00   /...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 21 c3 97 00 00 00 2b 9e d5 ff ff d8 0f 58 86   E!.....+......X.
USB > 0x0010: 10 21 c3 97 00 00 00 0a 98 d1 0e 00 40 00 90 09   .!..........@...
USB > 0x0020: 2f fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00   /...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-19 12:00:14.335651: LAN > A424242

USB < 0x0000: 41 42 42 42 00 00 00 00 00 00 00 00 00 00 00 00   ABBB............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 21 c3 97 00 00 00 2b 9e d5 ff ff d8 0f 58 86   E!.....+......X.
USB > 0x0010: 10 21 c3 97 00 00 00 0a 98 d1 0e 00 40 01 87 09   .!..........@...
USB > 0x0020: 33 fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00   3...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 36 d2 4f 00 00 00 2b af 58 ff ff b4 14 60 a4   E6.O...+.X....`.
USB > 0x0010: 5f 36 d2 4f 42 42 42 85 d1 2b 00 16 87 01 87 09   _6.OBBB..+......
USB > 0x0020: 33 fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00   3...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-19 12:00:14.399698: LAN > C

USB < 0x0000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   C...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 42 42 42 00 00 00 2b af cc ff ff c3 0a 60 80   EBBB...+......`.
USB > 0x0010: 02 42 42 42 36 d2 4f 00 d1 2b 00 16 87 01 87 09   .BBB6.O..+......
USB > 0x0020: 33 fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00   3...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 22 01 0f 00 00 00 2b c7 40 ff ff d1 0f ff 86   E".....+.@......
USB > 0x0010: 10 22 01 0f 00 00 00 0a 90 c5 0b 00 40 01 87 09   ."..........@...
USB > 0x0020: 33 fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00   3...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-19 12:00:14.463677: LAN > +5FFF1C,00,00,00

USB < 0x0000: 2b 5f ff 1c 00 00 01 00 00 00 00 00 00 00 00 00   +_..............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 36 d2 4f 00 00 00 2b ce 98 ff ff b4 14 61 a4   E6.O...+......a.
USB > 0x0010: 5f 36 d2 4f 42 42 42 85 d1 2c 00 0f 67 01 17 09   _6.OBBB..,..g...
USB > 0x0020: 2e fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 42 42 42 00 00 00 2b cf 0c ff ff c9 0a 61 80   EBBB...+......a.
USB > 0x0010: 02 42 42 42 36 d2 4f 00 d1 2c 00 0f 67 01 17 09   .BBB6.O..,..g...
USB > 0x0020: 2e fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-19 12:00:14.527694: LAN > +52CD03,00,00,00

USB < 0x0000: 2b 52 cd 03 00 00 01 00 00 00 00 00 00 00 00 00   +R..............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 36 d2 4f 00 00 00 2c 0d b8 ff ff b6 14 62 a4   E6.O...,......b.
USB > 0x0010: 5f 36 d2 4f 42 42 42 85 d1 2e 00 07 60 00 90 09   _6.OBBB.....`...
USB > 0x0020: 30 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00   0...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 42 42 42 00 00 00 2c 0e 2c ff ff cb 0a 62 80   EBBB...,.,....b.
USB > 0x0010: 02 42 42 42 36 d2 4f 00 d1 2e 00 07 60 00 90 09   .BBB6.O.....`...
USB > 0x0020: 30 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00   0...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-19 12:00:14.591687: LAN > +36D24F,00,00,00

USB < 0x0000: 2b 36 d2 4f 00 00 01 00 00 00 00 00 00 00 00 00   +6.O............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 37 04 ea 00 00 00 2c 1b 5b ff ff d1 14 bc 84   E7.....,.[......
USB > 0x0010: 5e 37 04 ea 00 00 00 8d 44 25 00 51 c8 04 1b 09   ^7......D%.Q....
USB > 0x0020: 1e fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 36 d2 4f 00 00 00 2c 2c 58 ff ff b5 14 63 a4   E6.O...,,X....c.
USB > 0x0010: 5f 36 d2 4f 42 42 42 85 d1 2f 00 17 38 01 95 09   _6.OBBB../..8...
USB > 0x0020: 30 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00   0...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-19 12:00:14.655707: LAN > Y01,00,

USB < 0x0000: 59 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00   Y...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 42 42 42 00 00 00 2c 2c cc ff ff c6 0a 63 80   EBBB...,,.....c.
USB > 0x0010: 02 42 42 42 36 d2 4f 00 d1 2f 00 17 38 01 95 09   .BBB6.O../..8...
USB > 0x0020: 30 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00   0...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 36 d2 4f 00 00 00 2c 4b 97 ff ff b6 14 64 a4   E6.O...,K.....d.
USB > 0x0010: 5f 36 d2 4f 42 42 42 85 d1 30 00 0d ec 00 f9 09   _6.OBBB..0......
USB > 0x0020: 2f ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00   /...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-19 12:00:14.719694: LAN > Y02,00,

USB < 0x0000: 59 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00   Y...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 36 d2 4f 00 00 00 2c 4b 97 ff ff b6 14 64 a4   E6.O...,K.....d.
USB > 0x0010: 5f 36 d2 4f 42 42 42 85 d1 30 00 0d ec 00 f9 09   _6.OBBB..0......
USB > 0x0020: 2f ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00   /...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 42 42 42 00 00 00 2c 4c 0c ff ff c3 0a 64 80   EBBB...,L.....d.
USB > 0x0010: 02 42 42 42 36 d2 4f 00 d1 30 00 0d ec 00 f9 09   .BBB6.O..0......
USB > 0x0020: 2f ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00   /...............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
usb-transfer took 63ms!
2025-01-19 12:00:14.783694: LAN > Y03,00,

USB < 0x0000: 59 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00   Y...............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 45 42 42 42 00 00 00 2c 4c 0c ff ff c3 0a 64 80   EBBB...,L.....d.
USB > 0x0010: 02 42 42 42 36 d2 4f 00 37 2e 24 42 42 42 00 2c   .BBB6.O.7.$BBB.,
USB > 0x0020: 6d 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00   mb..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 48 09 48 4d 2d 55 53 42 2d 49 46 03 c7 0a 4d 45   H.HM-USB-IF...ME
USB > 0x0010: 51 30 32 33 32 35 36 32 37 2e 24 42 42 42 00 2c   Q02325627.$BBB.,
USB > 0x0020: 6d 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00   mb..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-19 12:00:14.847658: LAN < HHM-USB-IF,03C7,MEQ0232562,372E24,424242,002C6D62,0000,00
2025-01-19 12:00:14.847749: LAN < E794E98,0000,00014F91,FF,FFCD,518610794E980000000A689F0F0040
2025-01-19 12:00:14.847772: LAN < E36D24F,0000,002B91F9,FF,FFB3,0F845E36D24F00000085D12A0007730090092FFE
2025-01-19 12:00:14.847785: LAN < E21C397,0000,002B9ED5,FF,FFD8,58861021C3970000000A98D10E0040
2025-01-19 12:00:14.847796: LAN < E21C397,0000,002B9ED5,FF,FFD8,58861021C3970000000A98D10E0040
2025-01-19 12:00:14.847807: LAN < E36D24F,0000,002BAF58,FF,FFB4,60A45F36D24F42424285D12B00168701870933FD
2025-01-19 12:00:14.847818: LAN < E424242,0000,002BAFCC,FF,FFC3,60800242424236D24F00
2025-01-19 12:00:14.847828: LAN < E22010F,0000,002BC740,FF,FFD1,FF861022010F0000000A90C50B0040
2025-01-19 12:00:14.847840: LAN < E36D24F,0000,002BCE98,FF,FFB4,61A45F36D24F42424285D12C000F670117092EFE
2025-01-19 12:00:14.847851: LAN < E424242,0000,002BCF0C,FF,FFC9,61800242424236D24F00
2025-01-19 12:00:14.847861: LAN < E36D24F,0000,002C0DB8,FF,FFB6,62A45F36D24F42424285D12E00076000900930FF
2025-01-19 12:00:14.847872: LAN < E424242,0000,002C0E2C,FF,FFCB,62800242424236D24F00
2025-01-19 12:00:14.847882: LAN < E3704EA,0000,002C1B5B,FF,FFD1,BC845E3704EA0000008D44250051C8041B091EFE
2025-01-19 12:00:14.847892: LAN < E36D24F,0000,002C2C58,FF,FFB5,63A45F36D24F42424285D12F00173801950930FF
2025-01-19 12:00:14.847902: LAN < E424242,0000,002C2CCC,FF,FFC6,63800242424236D24F00
2025-01-19 12:00:14.847913: LAN < E36D24F,0000,002C4B97,FF,FFB6,64A45F36D24F42424285D130000DEC00F9092FFF
2025-01-19 12:00:14.847924: LAN < E36D24F,0000,002C4B97,FF,FFB6,64A45F36D24F42424285D130000DEC00F9092FFF
2025-01-19 12:00:14.847933: LAN < E424242,0000,002C4C0C,FF,FFC3,64800242424236D24F00
2025-01-19 12:00:14.847939: LAN < E424242,0000,002C4C0C,FF,FFC3,64800242424236D24F00
usb-transfer took 64ms!
2025-01-19 12:00:14.847970: LAN > T2F1F97BE,02,00,00000000

USB < 0x0000: 54 2f 1f 97 be 02 00 00 00 00 00 00 00 00 00 00   T/..............
USB < 0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 48 09 48 4d 2d 55 53 42 2d 49 46 03 c7 0a 4d 45   H.HM-USB-IF...ME
USB > 0x0010: 51 30 32 33 32 35 36 32 37 2e 24 42 42 42 00 2c   Q02325627.$BBB.,
USB > 0x0020: 6d 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00   mb..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-19 12:00:14.879700: LAN < HHM-USB-IF,03C7,MEQ0232562,372E24,424242,002C6D62,0000,00

USB > 0x0000: 49 00 00 00 00 55 53 42 2d 49 46 03 c7 0a 4d 45   I....USB-IF...ME
USB > 0x0010: 51 30 32 33 32 35 36 32 37 2e 24 42 42 42 00 2c   Q02325627.$BBB.,
USB > 0x0020: 6d 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00   mb..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-19 12:00:14.911656: LAN < I00,00,00,00
usb-transfer took 63ms!
2025-01-19 12:00:14.911758: LAN > S7E386CC0,00,00000000,01,7E386CC0,998112424242000000

USB < 0x0000: 53 7e 38 6c c0 00 00 00 00 00 01 7e 38 6c c0 09   S~8l.......~8l..
USB < 0x0010: 99 81 12 42 42 42 00 00 00 00 00 00 00 00 00 00   ...BBB..........
USB < 0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
USB < 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 

USB > 0x0000: 49 00 00 00 00 55 53 42 2d 49 46 03 c7 0a 4d 45   I....USB-IF...ME
USB > 0x0010: 51 30 32 33 32 35 36 32 37 2e 24 42 42 42 00 2c   Q02325627.$BBB.,
USB > 0x0020: 6d 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00   mb..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-19 12:00:14.943756: LAN < I00,00,00,00

USB > 0x0000: 49 00 00 00 00 55 53 42 2d 49 46 03 c7 0a 4d 45   I....USB-IF...ME
USB > 0x0010: 51 30 32 33 32 35 36 32 37 2e 24 42 42 42 00 2c   Q02325627.$BBB.,
USB > 0x0020: 6d 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00   mb..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-19 12:00:14.975637: LAN < I00,00,00,00
usb-transfer took 63ms!

USB > 0x0000: 49 00 00 00 00 00 02 00 00 00 00 ff 7f ff 09 99   I...............
USB > 0x0010: 81 12 42 42 42 00 00 00 37 2e 24 42 42 42 00 2c   ..BBB...7.$BBB.,
USB > 0x0020: 6d 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00   mb..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-19 12:00:15.007752: LAN < I00,00,00,00

USB > 0x0000: 52 7e 38 6c c0 00 02 00 00 00 00 ff 7f ff 09 99   R~8l............
USB > 0x0010: 81 12 42 42 42 00 00 00 37 2e 24 42 42 42 00 2c   ..BBB...7.$BBB.,
USB > 0x0020: 6d 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00   mb..............
USB > 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................                                                 
2025-01-19 12:00:15.039757: LAN < R7E386CC0,0002,00000000,FF,7FFF,998112424242000000
^C

Im LXC FHEM bekomme ich allerdings keine Verbindung.


Internals:
   Clients    :CUL_HM:
   DEF        192.168.2.36:1234
   DeviceName 192.168.2.36:1234
   FUUID      678cdf2b-f33f-5c7b-b23a-8bbc495c75e7ca08
   NAME       hmusb
   NEXT_OPEN  1737285872.2312
   NR         63
   NTFY_ORDER 47-hmusb
   PARTIAL   
   STATE      disconnected
   TYPE       HMLAN
   XmitOpen   0
   assignedIDsCnt 3 report:0
   eventCount 1
   msgKeepAlive
   msgLoadCurrent 0
   nextOpenDelay 10
   owner     
   READINGS:
     2025-01-19 12:21:59   Xmit-Events     disconnected:2
     2025-01-19 12:21:59   cond            disconnected
     2025-01-19 12:21:59   prot_disconnected last
     2025-01-19 12:24:22   state           disconnected
   helper:
     assIdCnt   3
     assIdRep   0
     cnd:
       253        2
     ids:
       36D24F:
         cfg        +36D24F,00,00,00
         name       HM_36D24F
       52CD03:
         cfg        +52CD03,00,00,00
         name       HM_52CD03
       5FFF1C:
         cfg        +5FFF1C,00,00,00
         name       HM_5FFF1C
     k:
       BufMin     30
       DlyMax     0
     loadLvl:
       bl         40
       a:
         99
         90
         40
         0
       h:
         0          low
         40         batchLevel
         90         high
         99         suspended
     log:
       all        0
       sys        0
       ids:
         ARRAY(0x5e2bb9a82868)
     q:
       HMcndN     253
       answerPend 0
       hmLanQlen  1
       loadLastMax 0
       loadNo     0
       scnt       0
       sending    0
       ald:
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
         0
       apIDs:
Attributes:
   hmId       424242
   hmLanQlen  1_min
   loadLevel  0:low,40:batchLevel,90:high,99:suspended

2025.01.19 12:21:59 1: HMLAN_Parse: hmusb new condition disconnected
2025.01.19 12:21:59 1: Including ./log/fhem.save
2025.01.19 12:21:59 3: Opening hmusb device 192.168.2.36:1234
2025.01.19 12:21:59 1: hmusb: Can't connect to 192.168.2.36:1234: Connection refused
2025.01.19 12:21:59 1: HMLAN_Parse: hmusb new condition disconnected


Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Wernieman

Nur mal als Info:
Der Symlink zeigt auf ein Gerät auf den Host. Wenn Du jetzt nur den Symlink in den Container/VM-Host übernimmst, und nicht das Ziel, wie soll er dann darauf zugreifen können? Der Container/VM sieht im Symlink, greife aufs Gerät XYZ zu .. was er aber eben nicht sehen kann (im Container/VM). Du müsstest dann also den kompletten usbtree mit übernehmen, damit der Symlink auch auf das Gerät zeigen kann.

Um es zu verdeutlichen, nehmen wir an der Symlink /dev/Test Zeigt auf /dev/Ziel und um es zu verkürzen nehmen wir eine VM, bei Containern wie Docker) ist es analog.Hinweis: Es ist etwas vereinfacht ausgedrückt!
/dev/Test übergibst Du in die VM
Jetzt sieht die VM, wenn er auf /dev/Test zugreifen soll, nimm doch /dev/Ziel ... er sieht aber kein /dev/Ziel, weil dieses nicht in die VM übernomen wurde. Das es auf dem Host so geht, interessiert die VM nicht.
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Otto123

#30
Zitat von: Clyde am 19 Januar 2025, 12:34:33192.168.2.36
Das ist die IP von deinem Host?

was sagt ss -lntu auf deinem Host? sieht man den Port 1234 ?

Weil im debug Modus zeigt er ja
Zitat2025-01-19 12:00:14.251172: Client 192.168.2.37 connected!
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Clyde

#31
@Wernieman

Der Symlink wird auf dem Host eingerichtet mit (udev rule)

/dev/hmusb -> bus/usb/003/002               
In der Containerconfig wird er zum Durchreichen eingetragen:

lxc.mount.entry: /dev/hmusb            dev/hmusb             none bind,optional,create=file


Der Stick wird auf dem Host angezeigt mit

/dev/bus/usb/003/002                     
In der Containerconfig muss er zum Durchreichen eingetragen werden:

lxc.mount.entry: /dev/bus/usb/003/002  dev/bus/usb/003/002   none bind,optional,create=file

Das kann ich ja aber nur einrichten, wenn mir ..003/002 bekannt sind.
Es könnte auch ..003/006 sein. Dem folgt der Symlick durch die .rules aber nicht der
statisch angelegte mount. Da liegt ja das Problem. Oder verstehe ich dich falsch?

Wie würdest du beides durchreichen?
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Clyde


HostIP ist 192.168.2.36 Ja

Und der Port ist auch da.

root@proxmox:~# service hmland status
● hmland.service - LSB: Start hmland daemon at boot time
     Loaded: loaded (/etc/init.d/hmland; generated)
     Active: active (running) since Sun 2025-01-19 14:48:36 CET; 24min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 664 ExecStart=/etc/init.d/hmland start (code=exited, status=0/SUCCESS)
      Tasks: 2 (limit: 18845)
     Memory: 1.1M
        CPU: 4ms
     CGroup: /system.slice/hmland.service
             ├─668 perl -ne "\$|=1; print localtime . \": [hmland] \$_\""
             └─675 /opt/hmcfgusb/hmland -r 0 -d -P -l 127.0.0.1 -p 1234

Jan 19 14:48:36 proxmox systemd[1]: Starting hmland.service - LSB: Start hmland daemon at boot time...
Jan 19 14:48:36 proxmox systemd[1]: Started hmland.service - LSB: Start hmland daemon at boot time.
root@proxmox:~# ss -lntu
Netid       State        Recv-Q        Send-Q               Local Address:Port               Peer Address:Port       Process       
udp         UNCONN       0             0                          0.0.0.0:111                     0.0.0.0:*                       
udp         UNCONN       0             0                        127.0.0.1:323                     0.0.0.0:*                       
udp         UNCONN       0             0                             [::]:111                        [::]:*                       
udp         UNCONN       0             0                            [::1]:323                        [::]:*                       
tcp         LISTEN       0             128                        0.0.0.0:22                      0.0.0.0:*                       
tcp         LISTEN       0             4096                       0.0.0.0:111                     0.0.0.0:*                       
tcp         LISTEN       0             4096                     127.0.0.1:85                      0.0.0.0:*                       
tcp         LISTEN       0             100                      127.0.0.1:25                      0.0.0.0:*                       
tcp         LISTEN       0             1                        127.0.0.1:1234                    0.0.0.0:*                       
tcp         LISTEN       0             128                           [::]:22                         [::]:*                       
tcp         LISTEN       0             4096                          [::]:111                        [::]:*                       
tcp         LISTEN       0             100                          [::1]:25                         [::]:*                       
tcp         LISTEN       0             4096                             *:3128                          *:*                       
tcp         LISTEN       0             4096                             *:8006                          *:*                       
root@proxmox:~#

2025-01-19 12:00:14.251172: Client 192.168.2.37 connected!
Stimmt, er ist mit dem Client connected.
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Clyde

Aber am Client 192.168.2.37 geht er nicht drauf.

2025.01.19 15:17:50 3: Opening hmusb device 192.168.2.36:1234
2025.01.19 15:17:50 1: hmusb: Can't connect to 192.168.2.36:1234: Connection refused
2025.01.19 15:17:50 1: HMLAN_Parse: hmusb new condition disconnected
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Otto123

Zitat von: Clyde am 19 Januar 2025, 15:16:48tcp         LISTEN       0             1                        127.0.0.1:1234                    0.0.0.0:*         
ok das ist die crux: der service bindet sich nur an die localhost Adresse  >:(  hatte ich irgendwie befürchtet.

Mal schauen ob man dies dem hmland sagen kann.
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Otto123

die Zeile ändern:
/opt/hmcfgusb/hmland -r 0 -d -P -l 192.168.2.36 -p $port 2>&1 | perl -ne '$|=1; print localtime . ": [hmland] $_"' >> /var/log/hmland.log &oder
/opt/hmcfgusb/hmland -r 0 -d -P -l 0.0.0.0 -p $port 2>&1 | perl -ne '$|=1; print localtime . ": [hmland] $_"' >> /var/log/hmland.log &
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Clyde

root@proxmox:~# service hmland stop
root@proxmox:~# /opt/hmcfgusb/hmland -r 0 -d -P -l 192.168.2.36 -p $port 2>&1 | perl -ne '$|=1; print localtime . ": [hmland] $_"' >> /var/log/hmland.log &
[1] 14938
root@proxmox:~# tail -10 /var/log/hmland.log
Sun Jan 19 15:35:48 2025: [hmland]      -i              interactive mode (connect HM-CFG-USB to terminal)
Sun Jan 19 15:35:48 2025: [hmland]      -l ip           listen on given IP address only (for example 127.0.0.1)
Sun Jan 19 15:35:48 2025: [hmland]      -L logfile      log network-communication to logfile
Sun Jan 19 15:35:48 2025: [hmland]      -P              create PID file /var/run/hmland.pid in daemon mode
Sun Jan 19 15:35:48 2025: [hmland]      -p n            listen on port n (default: 1000)
Sun Jan 19 15:35:48 2025: [hmland]      -r n            reboot HM-CFG-USB after n seconds (0: no reboot, default: 86400 if FW < 0.967, 0 otherwise)
Sun Jan 19 15:35:48 2025: [hmland]         hh:mm        reboot HM-CFG-USB daily at hh:mm
Sun Jan 19 15:35:48 2025: [hmland]      -S serial       use HM-CFG-USB with given serial (for multiple hmland instances)
Sun Jan 19 15:35:48 2025: [hmland]      -v              verbose mode
Sun Jan 19 15:35:48 2025: [hmland]      -V              show version (0.103-git)
[1]+  Done                    /opt/hmcfgusb/hmland -r 0 -d -P -l 192.168.2.36 -p $port 2>&1 | perl -ne '$|=1; print localtime . ": [hmland] $_"' >> /var/log/hmland.log
root@proxmox:~# ss -lntu
Netid       State        Recv-Q        Send-Q               Local Address:Port               Peer Address:Port       Process       
udp         UNCONN       0             0                          0.0.0.0:111                     0.0.0.0:*                       
udp         UNCONN       0             0                        127.0.0.1:323                     0.0.0.0:*                       
udp         UNCONN       0             0                             [::]:111                        [::]:*                       
udp         UNCONN       0             0                            [::1]:323                        [::]:*                       
tcp         LISTEN       0             128                        0.0.0.0:22                      0.0.0.0:*                       
tcp         LISTEN       0             4096                       0.0.0.0:111                     0.0.0.0:*                       
tcp         LISTEN       0             4096                     127.0.0.1:85                      0.0.0.0:*                       
tcp         LISTEN       0             100                      127.0.0.1:25                      0.0.0.0:*                       
tcp         LISTEN       0             128                           [::]:22                         [::]:*                       
tcp         LISTEN       0             4096                          [::]:111                        [::]:*                       
tcp         LISTEN       0             100                          [::1]:25                         [::]:*                       
tcp         LISTEN       0             4096                             *:3128                          *:*                       
tcp         LISTEN       0             4096                             *:8006                          *:*                       
root@proxmox:~#
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Otto123

#37
aber so hast Du es jetzt ohne port aufgerufen?
/opt/hmcfgusb/hmland -r 0 -d -P -l 192.168.2.36 -p 1234 Ich meinte ja die Zeile in dem Script aus deinem Link. Wie gesagt der hmlan-cfg-usb ist für mich ne reine Trockenübung :)
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Clyde

Port 1234

root@proxmox:~# service hmland stop
root@proxmox:~# /opt/hmcfgusb/hmland -r 0 -d -P -l 0.0.0.0 -p 1234 2>&1 | perl -ne '$|=1; print localtime . ": [hmland] $_"' >> /va
r/log/hmland.log &
[1] 16154
root@proxmox:~# ss -lntu
Netid       State        Recv-Q        Send-Q               Local Address:Port               Peer Address:Port       Process       
udp         UNCONN       0             0                          0.0.0.0:111                     0.0.0.0:*                       
udp         UNCONN       0             0                        127.0.0.1:323                     0.0.0.0:*                       
udp         UNCONN       0             0                             [::]:111                        [::]:*                       
udp         UNCONN       0             0                            [::1]:323                        [::]:*                       
tcp         LISTEN       0             1                          0.0.0.0:1234                    0.0.0.0:*                       
tcp         LISTEN       0             128                        0.0.0.0:22                      0.0.0.0:*                       
tcp         LISTEN       0             4096                       0.0.0.0:111                     0.0.0.0:*                       
tcp         LISTEN       0             4096                     127.0.0.1:85                      0.0.0.0:*                       
tcp         LISTEN       0             100                      127.0.0.1:25                      0.0.0.0:*                       
tcp         LISTEN       0             128                           [::]:22                         [::]:*                       
tcp         LISTEN       0             4096                          [::]:111                        [::]:*                       
tcp         LISTEN       0             100                          [::1]:25                         [::]:*                       
tcp         LISTEN       0             4096                             *:3128                          *:*                       
tcp         LISTEN       0             4096                             *:8006                          *:*                       
root@proxmox:~#
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Otto123

Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Clyde

 :)

2025.01.19 15:44:39 1: HMLAN_Parse: hmusb new condition disconnected
2025.01.19 15:44:39 1: Including ./log/fhem.save
2025.01.19 15:44:39 3: Opening hmusb device 192.168.2.36:1234
2025.01.19 15:44:39 1: HMLAN_Parse: hmusb new condition init
2025.01.19 15:44:39 3: hmusb device opened
2025.01.19 15:44:39 1: usb create starting
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Clyde

#41
Hab den Stick jetzt ab und abgesteckt und eine neue Zuordnung bekommen:

root@proxmox:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 1b1f:c00f eQ-3 Entwicklung GmbH HM-CFG-USB/HM-CFG-USB-2 [HomeMatic Configuration adapter]
Bus 003 Device 003: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@proxmox:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 1b1f:c00f eQ-3 Entwicklung GmbH HM-CFG-USB/HM-CFG-USB-2 [HomeMatic Configuration adapter]
Bus 003 Device 003: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 0

Dieser Wechsel am Host macht dem FHEM im Container kein Problem.
Das ist nun von daher die beste Lösung.

Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Clyde

#42
Zusammenfassung der Lösung für das Durchreichen des HM-CFG-USB-2 vom Proxmox-Host in den FHEM-Container:

1) hmland auf dem Proxmox Host (hier <192.168.2.36>) installieren

https://forum.fhem.de/index.php/topic,13071.msg190887.html#msg190887

2) Port durchreichen mit

root@proxmox:~# /opt/hmcfgusb/hmland -r 0 -d -P -l 192.168.2.36 -p 1234 2>&1 | perl -ne '$|=1; print localtime . ": [hmland] $_"' >
> /var/log/hmland.log &
3) Im FHEM Container (hier <192.168.2.37>) in der FHEM Kommandozeile hmusb einrichen

define <name> HMLAN <ip-address>[:port]
define hmusb HMLAN  192.168.2.36:1234
4) ID vergeben attr hmusb hmId <hmId>

attr hmusb hmId 424242
Damit muss sich FHEM nicht um den Stick kümmern, das läuft über hmland auf dem Host.
Man braucht ferner keinen Symlink und keine Änderungen an der Containerkonfig diesbezüglich.

Vielen Dank für die Hilfe!
Proxmox auf MINIX-Z100, LXC: FHEM, FS20, FHT, HM, Tradfri, Alexa, Anker Solix Solarbank 2

Otto123

Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Wernieman

Zitat von: Clyde am 19 Januar 2025, 15:11:01@Wernieman

Der Symlink wird auf dem Host eingerichtet mit (udev rule)

Anstatt eines Symlinks kann man auch einen festen Devicenamen vergeben .. nur selber habe ich es zwar mal gemacht, aber schon wider vergessen .....

Da es mittlerweile eine Lösung gibt, würde ich es jetzt nicht weiterverfolgen
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html