initialize
This commit is contained in:
48
eg4battery/config/eg4-battery.yaml.example
Normal file
48
eg4battery/config/eg4-battery.yaml.example
Normal file
@@ -0,0 +1,48 @@
|
||||
# eg4-battery config — deploys to ~/.config/eg4-battery/eg4-battery.yaml (mode 600)
|
||||
|
||||
bus:
|
||||
# ---- mode: pick one ----
|
||||
# active ← RECOMMENDED. We are the master on a dedicated bus to the
|
||||
# battery's pin-1/2 external monitor port. Speaks the EG4
|
||||
# 7E/0D protocol at 9600 baud. Returns named, decoded HA
|
||||
# entities (pack V, cell voltages, SoC, temps, alarms).
|
||||
#
|
||||
# passive ← Listen-only Modbus-RTU sniffer at 19200 baud. Use only when
|
||||
# the FTDI is on a bus that already has a Modbus master
|
||||
# (e.g. the LVX6048 parallel-comm bus — although see NOTES.md:
|
||||
# the LVX6048 doesn't poll EG4 packs that way, so this mode
|
||||
# is mostly diagnostic). Publishes raw `register_NN` per slave.
|
||||
mode: active
|
||||
|
||||
transport: serial # serial | mock (--dry-run on the CLI forces mock)
|
||||
|
||||
# Stable /dev/serial/by-id symlink survives USB reshuffles. Find yours with
|
||||
# ls -l /dev/serial/by-id/
|
||||
port: /dev/serial/by-id/usb-FTDI_<YOUR_ADAPTER_ID>-if00-port0
|
||||
|
||||
# Default 9600 (active EG4 protocol). Set 19200 for passive Modbus mode.
|
||||
baud: 9600
|
||||
|
||||
# Active mode only:
|
||||
timeout_s: 1.5 # per-query response wait
|
||||
poll_interval_s: 10.0 # round-robin cycle target
|
||||
|
||||
mqtt:
|
||||
host: <MQTT_BROKER_IP> # e.g. 10.0.0.41 (HA Mosquitto broker)
|
||||
port: 1883
|
||||
username: <MQTT_USER>
|
||||
password: <MQTT_PASSWORD>
|
||||
discovery_prefix: homeassistant
|
||||
|
||||
# One entry per pack. `name` is the HA entity prefix and device identifier.
|
||||
# `address` is the EG4 7E protocol address in active mode (master = 1, slaves
|
||||
# typically 2, 3, ...) or the Modbus slave ID in passive mode.
|
||||
packs:
|
||||
- name: lifepower4_1
|
||||
address: 1
|
||||
- name: lifepower4_2
|
||||
address: 2
|
||||
- name: lifepower4_3
|
||||
address: 3
|
||||
|
||||
cell_count: 16 # 16S for 48V LFP — active mode only
|
||||
Reference in New Issue
Block a user