The following is the bare minimum of changes to the config.yaml
file that are necessary to get Insteon-MQTT started.
-
Configure Modem Set the Insteon port as
port
under theinsteon
section to be the USB port or address of the PLM modem on your system. If using an Insteon Hub, see Hub Instructions. -
Config Devices Edit the
insteon
->devices
section and enter the hex addresses of all the devices you have under the appropriate device types. -
Configure MQTT Broker Under the
mqtt
section, setbroker
to the broker IP or domain name, and theport
to the proper port. If you have installed the moquitto broker locally, you may not need to alter anything here. You can also set theusername
andpassword
if necessary.
Starting in version 1.0.0 InsteonMQTT now includes a base configuration file which the user configuration file is overlayed over the top. You should not directly edit the base configuration file, as it will be overwritten during updates. If you want to change a default setting, simply define the same key in your user configuration file and set your desired value.
You can view the contents of the base configuration file here: config-base.yaml
Settings in your user config file will replace those in the base config file pursuant to the following rules:
- Any unique key found in user_config will be added to the base_config.
- Any value in user_config that is not an associative array, will be copied to the same key in base_config.
- Any value in user_config that is an associative array, will be recursively examined applying these same rules.
So for example, assuming the following base_config
and user_config
files:
base_config:
insteon:
devices:
switch: []
mqtt:
broker: example.com
switch:
topic: some-topic
discovery_entities:
- component: switch
config: some-config
dimmer:
topic: some-topic2
discovery_entities:
- component: dimmer
config: some-config
user_config:
insteon:
devices:
switch:
- aa.bb.cc: my device
mqtt:
broker: my.broker.com
switch:
topic: new_topic
dimmer:
The resulting config file will be:
insteon:
devices:
switch:
- aa.bb.cc: my device
mqtt:
broker: my.broker.com
switch:
topic: new_topic
discovery_entities:
- component: switch
config: some-config
dimmer:
The device storage folder contains a json file for each device that is used to cache the various values on the device, most importantly it contains a cache of the device link database. Everything in this folder can be recreated by querying the device. There is no need to backup these files. Generally, most users should not edit these files.
Insteon-MQTT uses Jinja2 templates for the greatest interoperability. Each device category modem
, switch
, dimmer
, ... uses templates for defining the mqtt topic and payload for each message type. See Templating for help with Jinja2 templates.