User-defined counters

The cFos Charging Manager allows you to create your own meter definitions in order 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 certain registers, while HTTP/JSON counters get their data via HTTP request and parse JSON as a response. The cFos Charging Manager uses a small "query language" for parsing.

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.

With bidirectional meters, it helps the Charging Manager if you specify definitions for "power_w_l1", "power_w_l2" and "power_w_l3" (ie signed values for the power on the individual phases). It is only important that the sign is recognized correctly. Alternatively, you can also use phased values for apparent power.

You can omit values that the counter does not support. With "type_designation", "version", "firmware_version" and "serial" you should set these to fixed values using "fixed".

For Modbus, enter a number in decimal or hex with the prefix 0x as the "address".

With HTTP/JSON, the address is a string that/". The HTTP request URL is formed from the actual IP address of the device and the "address" specified here. Optionally, you can also prefix GET or POST.
In addition, for HTTP/JSON you have to specify where the desired value can be found in the JSON response. You indicate this with "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 the object element "name". "idx" can be a number, e.g. for arrays or a string
name["u2"]Element "u2" of the 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".