initialize
This commit is contained in:
13
LVX6048/etc/systemd/system/lvx-resolve-links.service
Normal file
13
LVX6048/etc/systemd/system/lvx-resolve-links.service
Normal file
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Resolve LVX6048 hidraw symlinks by PI18 serial
|
||||
After=systemd-udev-settle.service
|
||||
Wants=systemd-udev-settle.service
|
||||
# powermon services Requires= this unit, so they won't start until it succeeds.
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/local/sbin/lvx-resolve-links
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
15
LVX6048/etc/systemd/system/powermon.service
Normal file
15
LVX6048/etc/systemd/system/powermon.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=powermon LVX6048 -> MQTT bridge
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=noise
|
||||
Group=dialout
|
||||
ExecStart=/home/noise/.local/bin/powermon -C /home/noise/.config/powermon/powermon.yaml
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,3 @@
|
||||
[Unit]
|
||||
After=lvx-resolve-links.service
|
||||
Requires=lvx-resolve-links.service
|
||||
15
LVX6048/etc/systemd/system/powermon2.service
Normal file
15
LVX6048/etc/systemd/system/powermon2.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=powermon LVX6048 #2 -> MQTT bridge
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=noise
|
||||
Group=dialout
|
||||
ExecStart=/home/noise/.local/bin/powermon -C /home/noise/.config/powermon/powermon2.yaml
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,3 @@
|
||||
[Unit]
|
||||
After=lvx-resolve-links.service
|
||||
Requires=lvx-resolve-links.service
|
||||
6
LVX6048/etc/udev/rules.d/99-lvx6048.rules
Normal file
6
LVX6048/etc/udev/rules.d/99-lvx6048.rules
Normal file
@@ -0,0 +1,6 @@
|
||||
# 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.
|
||||
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0665", ATTRS{idProduct}=="5161", MODE="0660", GROUP="dialout"
|
||||
Reference in New Issue
Block a user