working in production - not entirely validated. parallel mode working.

This commit is contained in:
2026-04-26 19:26:44 -04:00
parent f771ec2b46
commit 00ab311d92
8 changed files with 344 additions and 27 deletions

View File

@@ -1,6 +1,13 @@
# LVX6048 (MPP Solar / Voltronic) USB-HID — dialout access only.
# Logical unit identification is done via PI18 `ID` query at powermon startup
# (see powermon.yaml: path: /dev/hidraw*, serial_number: <SN>).
# No SYMLINK here — powermon resolves the right /dev/hidrawN by inverter serial,
# which survives cable moves / hub port changes.
# 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"