# LVX6048 (MPP Solar / Voltronic) USB-HID — dialout access only. # Logical unit identification is done via the lvx-resolve-links oneshot, which # reads each inverter's PI18 serial and writes /dev/lvx6048-{1,2} symlinks. # powermon services have Requires=lvx-resolve-links so they wait for it at boot. SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0665", ATTRS{idProduct}=="5161", MODE="0660", GROUP="dialout" # Hot-plug recovery: when an inverter re-enumerates (e.g. after a power cycle), # hidraw indices can shuffle, leaving /dev/lvx6048-{1,2} symlinks pointing at # the wrong physical unit. Re-run the resolver and bounce the powermon services # so HA stops receiving crossed-up entity data. Fires only on add (avoid double # restart on disconnect+reconnect). SUBSYSTEM=="hidraw", ACTION=="add", ATTRS{idVendor}=="0665", ATTRS{idProduct}=="5161", \ RUN+="/bin/systemctl --no-block restart lvx-resolve-links.service powermon.service powermon2.service"