Configuration is done through
config.yml The parent folder of the file can be specified with
-c PATH or
If nothing is specified the file
config.yml is searched in the subdirectory
the current working directory
the venv directory
the user home
If the config does not yet exist in the folder a blank configuration will be created
directories: logging: log # If the filename for the logfile in logging.yml is not absolute it will be placed in this directory rules: rules # All *.py files in this folder (and subfolders) will be loaded. Load order will be alphabetical by path. param: param # Optional, this is the folder where the parameter files will be created and loaded from config: config # Folder from which configuration files for openHAB will be loaded lib: lib # Custom modules, libraries and files can be placed there. # (!) Attention (!): # Don't create rule instances in files inside the lib folder! It will lead to strange behaviour. location: # Specify the location where your HABApp instance is running latitude: 0.0 # The value is used to calculate the Sunrise/Sunset etc accordingly longitude: 0.0 elevation: 0.0 openhab: ping: enabled: true # If enabled the configured item will show how long it takes to send an update from HABApp # and get the updated value back in milliseconds item: 'HABApp_Ping' # Name of the NumberItem that will show the ping interval: 10 # Seconds between two pings connection: url: http://localhost:8080 user: '' password: '' general: listen_only: False # If True HABApp will not change any value on the openHAB instance. # Useful for testing rules from another machine. wait_for_openhab: True # If True HABApp will wait for items from the openHAB instance # before loading any rules on startup mqtt: connection: client_id: HABApp host: '' port: 8883 user: '' password: '' tls: enabled: false # Enable TLS for the connection insecure: false # Validate server hostname in server certificate ca cert: '' # Path to a CA certificate that will be treated as trusted # (e.g. when using a self signed certificate) subscribe: # Changes to Subscribe get picked up without restarting HABApp qos: 0 # Default QoS for subscribing topics: - '#' # Subscribe to this topic, qos is default QoS - ['my/topic', 1] # Subscribe to this topic with explicit QoS publish: qos: 0 # Default QoS when publishing values retain: false # Default retain flag when publishing values general: listen_only: False # If True HABApp will not publish any value to the broker. # Useful for testing rules from another machine.
It’s possible to use environment variables and files (e.g. docker secrets) in the configuration. See the easyconfig documentation for the exact syntax and examples.
All possible configuration options are described here. Not all entries are created by default in the config file and one should take extra care when changing those entries.
- settings ApplicationConfig
Structure that contains the complete configuration
- settings DirectoriesConfig
Configuration of directories that are used
Path] = 'config'
Folder from which configuration files (e.g. for textual thing configuration) will be loaded
Path] = 'lib'
Folder where additional libraries can be placed
Folder where the logs will be written to
Path] = 'params'
Folder from which the parameter files will be loaded
Folder from which the rule files will be loaded
- classmethod ensure_folder(value)
- field config:
- settings MqttConfig
- settings Connection
ClientId that is used to uniquely identify this client on the mqtt broker.
Connect to this host. Empty string (“”) disables the connection.
- field client_id:
- settings OpenhabConfig
- settings Connection
Buffer for reading lines in the SSE event handler. This is the buffer that gets allocated for every(!) request and SSE message that the client processes. Increase only if you get error messages or disconnects e.g. if you use large images.
field topic filter:
Topic filter for subscribing to openHAB. This filter is processed by openHAB and only events matching this filter will be sent to HABApp.
Connect to this url. Empty string (“”) disables the connection.
Check certificates when using https
- field buffer:
- settings Ping
If enabled the configured item will show how long it takes to send an update from HABApp and get the updated value back from openHAB in milliseconds
float] = 10
Seconds between two pings
ge = 0.1
Name of the Numberitem
- field enabled:
- settings General
If True HABApp does not change anything on the openHAB instance.
Minimum openHAB start level to load items and listen to events
ge = 0
le = 100
If True HABApp will wait for a successful openHAB connection before loading any rules on startup
- field listen_only:
- settings HABAppConfig
HABApp internal configuration. Only change values if you know what you are doing!
- settings ThreadPoolConfig
When the thread pool is disabled HABApp will become an asyncio application. Use only if you have experience developing asyncio applications! If the thread pool is disabled using blocking calls in functions can and will break HABApp
int] = 10
Amount of threads to use for the executor
ge = 1
le = 16
- field enabled: