This archive collects modbus register descriptions for a many devices as possible.
Devices types are collected in subdirectories (e.g. energy_meter
). Each
device is described by a YAML file.
The "include" key contains a list of other device description files to include. Later values supersede earlier ones.
The "regs" key contains a hierarchy of register descriptions.
The "dev" key describes the device.
Terminal objects use the following keys:
-
register
The register to access. Zero-based. Use
regtype
instead of a leading digit. -
regtype
The register's type. The default is
i
for (numeric) Input. Useh
for a Holding register,c
for Coils (i.e. binary output), andd
for Discrete (binary) inputs. -
type
The type of the value in this register. Numbers use
int
orfloat
. You may prefix these with-
s (word-swapped: low word first)
-
u (unsigned; not used for
float
)
(in this order).
The types
str
andbin
require a length. Strings can be zero-terminated. For these types, the initials
designates byte-swapping.TODO: Binary registers don't have a type, but you can use
i
for inverting the value. Useu
if you need to un-invert a register. -
-
len
Number of words. The default is 2 for
float
and 1 forint
. -
unit
The unit of measurement. Use SI units only please, except for absolute degrees Celsius (expressed as "dC"). Factors like
k
for 1000 are specified with "scale". -
scale
The scale for the measurement, as a power of 10. Thus
kW
uses factor 3, 100th of an ampere uses factor -2. The default is zero.A trailing
b
indicates powers of two instead.Use a factor if the scale is not an integer.
-
factor
A correction factor that should be added to the measurement. Applied in addition to the scale. The default is 1.
-
offset
An offset that should be added to the measurement. Applied after scale+factor. The default is zero.
-
scale_reg
TODO: Dynamic scaling (i.e. the scale is configured / auto-adjusted, available in a different register). Read this register and add it to "scale".
The default is fixed scaling, designated by
-1
. -
scale_regtype
As
regtype
but for the scaling register. -
scale_type
l
for logarithmic,f
for a factor. -
value
For objects used to identify device types, the register's value is contained in this entry. This can be either an integer or a list.
Objects may not overlap.