Skip to content

configuration file

David Bonnes edited this page Jan 3, 2021 · 9 revisions

Configuration file

When using client.py, you can do this:

python client.py -c config.json monitor /dev/ttyUSB1

The configuration file should be JSON-formatted & can have:

  • configuration options
  • a schema (created a schema before discovery/eavesdropping)
  • an allowlist and/or a blocklist (you can use either, not both)
  • friendly names for devices (to use instead of device_id in messages)

Configuration options

These are all the available options, with their default values. Generally, null is the same as false:

{
    "config": {
        "disable_sending": null,
        "disable_discovery": false,
        "enforce_allowlist": null,
        "enforce_blocklist": null,
        "evofw_flag": null,
        "max_zones": 12,
        "packet_log": null,
        "reduce_processing": 0,
        "serial_port": null,
        "use_names": true,
        "use_schema": null
    }
}

Note that most config options can be given via the CLI, and they will take precedence. For example:

python client.py -rr -c config.json listen /dev/ttyUSB1 -o packet.log

Schema options

{
    "config": {
        "use_schema": true
    },

    "schema": {
        "controller": "01:145038",
        "system": {
            "heating_control": "13:237335"
        }
    }
}

Allow / Block lists

An example config file would be as follows: { "config": { "enforce_allowlist": false, "enforce_blocklist": true, "use_names": true },

"allowlist": {
    "01:145038": {"name": "Controller"},
    "13:999997": {"name": "Boiler relay"},
    "13:999998": {"name": null},
    "13:999999": {},
},

"blocklist": {
    "12:999999": {}
}

} The allow list will take precedence of the block list.

Friendly names

Friendly names are used in preference to device IDs, and are truncated at 18 characters.