@@ -260,7 +260,7 @@ order to run DMPACK:
260260 FreeBSD.
261261* <<sys-conf-tz>> – Set the correct time zone of the sensor node.
262262* <<sys-conf-ntp>> – Enable synchronisation with an NTP server.
263- * <<sys-conf-power>> – Disable USB power saving.
263+ * <<sys-conf-power>> – Disable USB power saving on Linux .
264264* <<sys-conf-cron>> – Add cron jobs to run programs periodically.
265265
266266The shared libraries `libgcc.so`, `libgfortran.so`, and `libquadmath.so` have to
@@ -851,6 +851,8 @@ are written to file or _stdout_.
851851program sends requests to a connected sensor to receive responses. The program
852852pre-processes the response data using regular expressions and forwards
853853observations via POSIX message queue.
854+ <<dmved>>:: Reads status information of a connected Victron Energy MPPT solar
855+ charge controller or SmartShunt battery monitor, using the VE.Direct protocol.
854856
855857=== Utilities
856858
@@ -2616,6 +2618,138 @@ $ echo "3d3eee7ae1fb4259b5df72f854aaa369" | dmuuid --convert
261626183d3eee7a-e1fb-4259-b5df-72f854aaa369
26172619....
26182620
2621+ === dmved [[dmved]]
2622+
2623+ The *dmved* program captures VE.Direct status data received from a connected
2624+ Victron Energy Maximum Power Point Tracking (MPPT) solar charge controller or
2625+ battery monitor, either:
2626+
2627+ * BlueSolar MPPT series,
2628+ * SmartSolar MPPT series,
2629+ * SmartShunt.
2630+
2631+ An official Victron Energy USB cable or TTL adapter with JST PH connector is
2632+ required for data link. The TTY will be configured to 19200 baud (8N1). The
2633+ following VE.Direct fields are supported, depending on the device:
2634+
2635+ [cols="1,1,5,1,1"]
2636+ |===
2637+ | Name | Unit | Description | MPPT | Shunt
2638+
2639+ | `Alarm` | – | Alarm condition active (on/off). | | ✓
2640+ | `AR` | – | Alarm reason. | | ✓
2641+ | `CE` | mAh | Consumed amp hours. | | ✓
2642+ | `CS` | – | State of operation. | ✓ |
2643+ | `DM` | ‰ | Mid-point deviation of the battery bank. | | ✓
2644+ | `ERR` | – | Error code. | ✓ |
2645+ | `FW` | – | Firmware version (16 bit). | ✓ | ✓
2646+ | `H1` | mAh | Depth of the deepest discharge. | | ✓
2647+ | `H2` | mAh | Depth of the last discharge. | | ✓
2648+ | `H3` | mAh | Depth of the average discharge. | | ✓
2649+ | `H4` | – | Number of charge cycles. | | ✓
2650+ | `H5` | – | Number of full discharges. | | ✓
2651+ | `H6` | mAh | Cumulative amp hours drawn. | | ✓
2652+ | `H7` | mV | Minimum main (battery) voltage. | | ✓
2653+ | `H8` | mV | Maximum main (battery) voltage. | | ✓
2654+ | `H9` | sec | Number of seconds since last full charge. | | ✓
2655+ | `H10` | – | Number of automatic synchronisations. | | ✓
2656+ | `H11` | – | Number of low main voltage alarms. | | ✓
2657+ | `H12` | – | Number of high main voltage alarms. | | ✓
2658+ | `H15` | mV | Minimum auxiliary (battery) voltage. | | ✓
2659+ | `H16` | mV | Maximum auxiliary (battery) voltage. | | ✓
2660+ | `H17` | kWh/100 | Amount of produced energy. | | ✓
2661+ | `H18` | kWh/100 | Amount of consumed energy. | | ✓
2662+ | `H19` | kWh/100 | Yield total (user resettable counter). | ✓ |
2663+ | `H20` | kWh/100 | Yield today. | ✓ |
2664+ | `H21` | W | Maximum power today. | ✓ |
2665+ | `H22` | kWh/100 | Yield yesterday. | ✓ |
2666+ | `H23` | W | Maximum power yesterday. | ✓ |
2667+ | `HSDS` | – | Day sequence number (0 to 364). | ✓ |
2668+ | `I` | mA | Main or channel 1 battery current. | ✓ | ✓
2669+ | `IL` | mA | Load current. | ✓ |
2670+ | `LOAD` | – | Load output state (on/off). | ✓ |
2671+ | `MON` | – | DC monitor mode. | | ✓
2672+ | `MPPT` | – | Tracker operation mode. | ✓ |
2673+ | `OR` | – | Off reason. | ✓ |
2674+ | `P` | W | Instantaneous power. | | ✓
2675+ | `PID` | – | Product ID. | ✓ | ✓
2676+ | `PPV` | W | Panel power. | ✓ |
2677+ | `Relay` | – | Relay state (on/off). | ✓ | ✓
2678+ | `SOC` | ‰ | State-of-charge. | | ✓
2679+ | `T` | °C | Battery temperature. | | ✓
2680+ | `TTG` | min | Time-to-go. | | ✓
2681+ | `V` | mV | Main or channel 1 (battery) voltage. | ✓ | ✓
2682+ | `VM` | mV | Mid-point voltage of the battery bank. | | ✓
2683+ | `VPV` | mV | Panel voltage. | ✓ |
2684+ | `VS` | mV | Auxiliary (starter) voltage. | | ✓
2685+ |===
2686+
2687+ The response names of the created observations equal the field names in
2688+ lower-case. Observations are sent to the receiver via message queue in the
2689+ specified interval.
2690+
2691+ [discrete]
2692+ ==== Command-Line Options
2693+
2694+ [cols="2,1,1,5"]
2695+ |===
2696+ | Option | Short | Default | Description
2697+
2698+ | `--config _file_` | `-c` | – | Path to configuration file.
2699+ | `--debug` | `-D` | off | Forward log messages of level _debug_ (if logger is set).
2700+ | `--device _name_` | `-d` | – | Type of connected device (`mppt`, `shunt`).
2701+ | `--help` | `-h` | – | Output available command-line arguments and quit.
2702+ | `--interval _seconds_` | `-I` | 60 | Observation emit interval in seconds.
2703+ | `--logger _name_` | `-l` | – | Optional name of logger. If set, sends logs to <<dmlogger>> process of given name.
2704+ | `--name _name_` | `-n` | `dmved` | Name of instance and table in configuration.
2705+ | `--node _id_` | `-N` | – | Optional node id.
2706+ | `--path _path_` | `-p` | – | Path to TTY device (for example, `/dev/ttyUSB0`).
2707+ | `--receiver _name_` | `-r` | – | Name of receiver/message queue.
2708+ | `--sensor _id_` | `-S` | – | Sensor id.
2709+ | `--target _id_` | `-T` | – | Target id.
2710+ | `--verbose` | `-V` | off | Print log messages to _stderr_.
2711+ | `--version` | `-v` | – | Output version information and quit.
2712+ |===
2713+
2714+ [discrete]
2715+ ==== Examples
2716+
2717+ For a connected SmartSolar MPPT charger, create a configuration file
2718+ `dmved.conf`, set the device to `mppt` and the path to the TTY path, for
2719+ example `/dev/ttyUSB0` if a Victron Energy USB adapter cable is used. Change
2720+ node id, sensor id, and target id according to your set-up:
2721+
2722+ [source,lua]
2723+ ....
2724+ -- dmved.conf
2725+ dmved = {
2726+ logger = "",
2727+ device = "mppt",
2728+ node = "dummy-node",
2729+ sensor = "dummy-sensor",
2730+ target = "dummy-target",
2731+ path = "/dev/ttyUSB0",
2732+ receiver = "dmrecv",
2733+ interval = 60 * 10,
2734+ debug = false,
2735+ verbose = true
2736+ }
2737+ ....
2738+
2739+ Start <<dmrecv>> to receive observations and output them to _stdout_ in JSONL
2740+ format:
2741+
2742+ ....
2743+ $ dmrecv --name dmrecv --type observ --format jsonl --output -
2744+ ....
2745+
2746+ Start *dmved* to read and forward status data from the connected MPPT every 60
2747+ seconds:
2748+
2749+ ....
2750+ $ dmved --name dmved --config /usr/local/etc/dmpack/dmved.conf --verbose
2751+ ....
2752+
26192753=== dmweb [[dmweb]]
26202754
26212755*dmweb* is a CGI-based web user interface for DMPACK database access on client
0 commit comments