# Zenergy PID Boxes

### Purpose

The purpose of this plugin is to collect data from Zenergy PID Offset Boxes.

### Usage

This plugin reads the data from Zenergy PID Offset Box. This plugin relies on the `Modbus Ardexa` plugin. It uses the Modbus TCP Specification, and collects from RS485 or TCP connected inverters. Data will be collected to the `solar` table. The plugin will be run every 5 minutes, by default. When installing and accessing data via Modbus, the RTU (Modbus) address is the last 2 numbers of the PID Box serial number. For example, if the serial number is something like `PID1N101811010` then the Modbus address is `10`. The serial number is located on the device itself. A photograph of the serial plate will allow Ardexa to determine the Modbus address. The following data is collected from the inverters. \*

```
Variable Name           Units
=============================
Insulation Protect Set
Output Voltage Set      V
Operating Mode Set
Start Voltage Set       V
Shut Off Voltage Set    V
PV1+ Voltage            V
PV2+ Voltage            V
PV- Voltage             V
PV- Current             mA
PV Resistance to Gnd    ohm
Protection Action
```

### Arguments

Arguments are as follows:

* `endpoint`. This is either a serial device like `/dev/ttyS0` or an IP or DNS like `192.168.1.15`
* `bus_addresses`. An RS485 address in the range 2-63. This can be a hyphenated list like `3-10` or a list like `2,5,7,9`
* `--port`. This is an optional parameter used in an Ethernet gateway, and is the TCP port used for the gateway. Default is `502`
* `--attempts`. This is an optional parameter, and determines how many times to times to attempt to read an inverter value. Default is `1`
* `--delay`. This is the delay in seconds between inverter send and receive commands, AND if `attempts` > 1. Fractions like `0.3` can be used. Default is \`0.05
