User-defined counters

The cFos Charging Manager allows you to create your own meter definitions to support meters that are not in the standard repertoire. There are currently two types: Modbus counters and HTTP/JSON counters. The definition files for these counters are very similar. Modbus counters read their data via Modbus from specific registers, while HTTP/JSON counters fetch their data via HTTP request and parse JSON as response. For parsing, the cFos Charging Manager uses a small "query language".

Here is an example definition for Modbus and one for HTTP/JSON:
Download sample definition for Modbus meter
Download sample definition for HTTP/JSON meter

The Charging Manager already comes with a few such files, but you can upload your own files under "System configuration" and also delete them again.

If you have created your own counter file and it could be relevant for other users, we would be very grateful if you could make it available to us. Then we will deliver it with future versions of the Charging Manager.

The cFos Charging Manager requires voltage information in volts, currents in milliamperes, power in watts or VA, and energy in Wh or VAh.

For bidirectional meters it will help the Charging Manager if you provide definitions for "power_w_l1", "power_w_l2" and "power_w_l3" (i.e. signed values for the power on the individual phases). It is only important that the sign is recognised corrently. Alternatively, you can also take phase-wise values for apparent power here.

Values that are not supported by the meter can be omitted. For "type_designation", "version", "firmware_version" and "serial" you should set them to fixed values using "fixed".

For "address", specify a number in decimal or hex with prefix 0x for Modbus.

For HTTP/JSON, the address is a string starting with /. The HTTP request URL is formed from the actual IP address of the device and the "address" specified here. Optionally, you can also prepend GET or POST.
For HTTP/JSON, you must also specify where the desired value can be found in the JSON response. You specify this using "query". The Charging Manager assumes that all responses are contained in a JSON object that begins with "{" and ends with "}".
Currently, in the "query" search expressions, member names and the operators "." and "[]" can be used, examples:

testElement named "test"
name1.name2Element named "name2" in child object "name1"
name[idx]Element "idx" of object element "name", idx can be a number, e.g. for arrays or a string
name["u2"]Element "u2" of object element "name", corresponds to name.u2

Note: Some counters which are read via HTTP require username/password as authorization. You can include this in the address for HTTP access, for example with http://username:password@192.168.2.111. If your username or password contains a "@", you must replace it with "%40".