Skip to content

4.7. Automatic configuration

John edited this page Feb 5, 2022 · 8 revisions

Starting with version 2.0, ebusd supports picking the right CSV configuration files automatically.

This feature is enabled by using the "--scanconfig" option during startup.

With this option, ebusd no longer loads all CSV files from the configuration directory and all subdirectories recursively, but instead during startup only loads the files residing directly in the configuration directory. Further CSV files in subdirectories are loaded individually after a successful scan of each new slave address seen on the bus.

ebusd then waits for messages to appear on the bus and for each newly detected slave, ebusd automatically initiates a scan of that slave (a special message that the slave is supposed to answer with the manufacturer, identification, software and hardware version). If the scan message was received, ebusd picks the corresponding CSV file from the configuration path and the manufacturer subdirectory.

The fields of the scan message (called "identification, service 07h 04h" in the eBUS specifications) for a slave determine the manufacturer subdirectory to use and the best matching CSV file. The available scan fields are:

  • manufacturer:
    The first byte of the scan message result contains a manufacturer ID. This is resolved to the primary name of the manufacturer in lower case (e.g. 0xB5="vaillant", 0x10="tem", 0x19="wolf", 0xc5="weishaupt", 0x50="kromschröder", etc.). This is then used as the name of the subdirectory to look for CSV files.
  • ID:
    The device ID is made of 5 characters. All characters besides alphanumeric ones and the underscore character are removed from the ID and CSV file names in the manufacturer subdirectory are checked against the remaining lower case name. This is repeated as long as removing another trailing digit from the name keeps at least one character in the name, i.e. the full name is checked first, and subsequently each name with one more trailing digit removed is checked as well.
    For example, when the ID in the scan is "!HP56", the sequence of names used for finding a CSV file is "hp56", "hp5", and "hp".
  • software version:
    The software version number is composed of two bytes starting with the major version number and followed by the revision number. Both are interpreted as BCD and converted to a 4 digit number, e.g. binary "0x0160" would result in version number "0160". Each checked CSV file name is only treated as valid for a scan, if it either does not contain ".SW????." or if the "????" part matches the software version number.
  • hardware version:
    The hardware version is treated the same way as the software version. Each checked CSV file name is only treated as valid for a scan, if it either does not contain ".HW????." or if the "????" part matches the hardware version number.

In addition to these conditions, a CSV file name has to start with the slave address in question followed by a dot, i.e. "ZZ.". In total, a matching CSV file name from the manufacturer subdirectory is supposed to look like this:

ZZ.[ID.][*.][HW????.][*.][SW????.][*.]csv

When more than one CSV file matches these rules, the one with the longest matching ID part is used.

Example

The following list of files would all match the scan message data FF08070400 (master part) / 0AB5454850303003277201 (slave part):

  • vaillant/08.ehp00.csv
  • vaillant/08.ehp00.heatpump.csv
  • vaillant/08.ehp00.HW6666.csv
  • vaillant/08.ehp00.SW5555.csv
  • vaillant/08.ehp00.HW6666.SW5555.csv
  • vaillant/08.ehp0.csv
  • vaillant/08.ehp.csv
  • vaillant/08.ehp.HW7201.csv
  • vaillant/08.ehp.HW7201.SW0327.csv

If all of these files were available, ebusd would pick the one highlighted in bold.