-
Notifications
You must be signed in to change notification settings - Fork 29
configuration register
The whole modbus protocol can be configure by appropriate json file at /data/regs/.
The first Level are the inverter type. The second Level are "configuration" and "data". Third Level are the data level and contains the items of available "id data" and "live data".
This section describes the behaviour of modbus protocoll of selected inverter
| Option | Example | Description |
|---|---|---|
| RequestLiveData | [["#ClientID", "0x04", "0x00", "0x00", "0x00", "0x77"], |
The Request message for Live Data. See hints below. |
| RequestIdData | [["#ClientID", "0x03", "0x00", "0x00", "0x00", "0x14"]] |
Same as RequestLiveData, See hints below. |
| LiveDataErrorPos | 1 | At this position the error code is expect if Live Data was requested |
| LiveDataErrorCode | 0x83 | This code indicates an error of requeted Live data |
| IdDataErrorPos | 1 | At this position the error code is expect if ID Data was requested |
| IdDataErrorCode | 0x84 | This code indicates an error of requested ID Data |
It´s possible to request multiples, because only max 250 bytes are allowed to get back. So this item is designed as array of byte arrays. Each Message array will send, waiting 100ms, get response, waiting 1000ms and the next loop starts. Only after the last request message the whole concatinated response of all requests starts to parse. That means, the item positions are increasing.
If you want to add new items or change something it´s recommend to enable at least debug level 4.
there is a process implemented to get all avaialbe inverters from json. So a random item is picked up to get the json small. The selected item is: ClientIdPos. So please don´t change this name. Otherwise the Inverter selection list don´t work properly.
This section describes the available items of Inverter ID-Data.
The configured name "InverterSN" is showing at status webgiu page. Please don´t change the name.
This section describes the available items of Livedata.
multiple inverter configs are supported in one file.
| Option | Example | Mandantory / Optional | Description |
|---|---|---|---|
| position | [67, 68] | M | byte position in inverter answer |
| position2 | [69, 70] | O | like "position", used if negative value has his own register. Value at "position" must 0 to use "position2" |
| name | Input Energy Charge Today | M | internal unique name, this name is a part of mqtt topic name too |
| realname | InputEnergyChargeToday | O | a pretty writable name in webgui |
| datatype | float | M | need to convert from byte to target value. Possible datatypes: string, integer, float, binary |
| factor | 0.1 | O | need to get the right value too |
| valueAdd | -100 | O | to add or sub a static value, (value * <factor>) + <valueAdd> |
| unit | kWh | O | only for showing in webgui |
| mapping | [[0,"WaitMode"],[1,"NormalMode"],[3,"FaultMode"]] |
O | a mapping to exchange a specific value with a static string (see chapter mapping tables) |
| setbatw | O | send out the value twice with this additional topic. Please see chapter openWB Topics (-> page Item Config) |
the mapping table define a matching of a plain non-readable value to a readable string. In case a binary error code register has to been parsed (eg. 0000001001010000"), the datatype binary is the right one. The mapping table now contains a plain list auf readable strings for each bit. If you dont define a mapping table, the plain binary string will print.
example
{
"position": [76,77,74,75],
"name": "InverterFaultMessage",
"realname": "Inverter Fault Message",
"datatype": "binary",
"mapping": ["TZ Protect Fault","Grid Lost Fault","Grid Volt Fault","Grid Freq Fault","PV Volt Fault","Bus Volt Fault","Bat Volt Fault","AC10mins Volt Fault","DCI OCP Fault","DCV OCP Fault","SW OCP Fault","RC OCP Fault","Isolation Fault","Temp Over Fault","BatConnDir Fault","Off-Grid Overload","Overload","Bat Power Low","BMS Lost","Fan Fault","Low Temp Fault","Parallel Fault","Hard Limit Fault","INV Volt Sample Fault","Inner Comm Fault","INV EEPROM Fault","RCD Fault","Grid Relay Fault","Off-grid Relay Fault","PV Conndir Fault","Charger Relay Fault","Earth Relay Fault","no Error"]
}
It is activated if item is set as active and openWB Support is enabled. For OpenWB Topics exists a mapping table too. In register item config only the key of the particular topic has to be referenced. Please refer data/misc/openwb.json in github.
- Overview
- Schematic
- Start it
- Configuration
- Compiling firmware
- Advanced stuff
- Questions and Answers