Configuration¶
The library uses a configuration file, vcontrold_config.yml, in YAML format, which contains all known commands and defines several parameters for each command. The initial configuration will be created automatically within your project root (based on __file__ from which __main__ is called). After the creation you can modify the configuration file as you like.
vcontrold_config.yml¶
vcontrold_commands¶
As said above, the file is created automatically when starting for first time, or with other word, if the file doesn’t exist. If, at any point, you messed up with the configuration file, just delete it and it will be re-created at the next run.
Following is the structure of the file:
vcontrold_commands:
get:
getBetriebArtM1:
description: Betriebsart M1
devices:
- 2094
groups:
- operation-mode
status: enabled
unit: text
getBrennerStatus:
description: Ermittle den Brennerstatus
devices:
- 2094
groups:
- burner
status: enabled
unit: switch
getSystemTime:
description: Ermittle Systemzeit
devices:
- 2094
groups:
- system
status: enabled
unit: time
...
set:
setBetriebArtM1:
description: Setze Betriebsart M1
devices:
- 2094
groups: []
status: enabled
unit: none
...
The file basically consists of a single dict, vcontrold_commands, with two sub items get and set, both are of type dict as well. These are used to differ between get- and set-commands. set-commands are currently not yet implemented, although they already exist in the configuration.
Each item of get or set is a vcontrold command, i.e.
getBrennerStatus: # <-- vcontrold command
description: Brennerstatus # <-- description of the command (used in output)
devices: # <-- list of device IDs, for which this command is valid
- 2094
groups: # <-- list of groups, to which this command is assigned
- burner
status: enabled # <-- status of the command
unit: switch # <-- pre-defined unit for sanitization
Each command contains the following parameters:
Parameter |
Type |
Description |
|---|---|---|
|
|
A descriptive text for what the command returns. The description can be changed to anything else. |
|
|
Each heating system control unit has its own ID in vcontrold, documented at [Github openv Wiki](https://github.com/openv/openv/wiki/Ger%C3%A4te). Not each command is available for each heating system. Which commands are available need to be defined in vcontrold itself.<br/>This parameter controls, whether the command will be automatically executed for the detected system. If your device ID is not listed, just add it to the list or replace the existing ID with your own (I assume, that everyone has only one heating system :wink:). |
|
|
Each get-command is assigned to at least one group by default, to make filtering of read commands available. The list of groups may be expanded or changed as you like. |
|
|
Used to skip single commands in general. If the status of a command is disabled, it will not be executed, independently from the group or anything else.<br />Additionally, the status is used to automatically disable commands, which return unexpected outputs or not supported by the heating system. If, during read_all execution a command returns data, that doesn’t match the expecation, it will be automatically disabled in the config file. |
|
|
|
Other options¶
Currently there are no other configuration options available. Probably some of the class properties may be available in the future.