Installs the lscr.io/linuxserver/homeassistant image. Modifies the Dockerfile to enable avahi-tools.
homeassistant_port
- Default:
8123
- Description: The port on which HomeAssistant will be accessible.
- Type: int
- Required: no
- Default:
homeassistant_network
- Default:
homeassistant
- Description: The name of the Docker network.
- Type: str
- Required: no
- Default:
homeassistant_install_dir
- Default:
/opt/docker/homeassistant
- Description: The directory where HomeAssistant will be installed.
- Type: str
- Required: no
- Default:
homeassistant_env
- Default:
{}
- Description: Docker container environment variables. See linuxserver/homeassistant.
- Type: dict
- Required: no
- Default:
homeassistant_config
- Default: See homeassistant_config_default
- Description: Configuration for configuration.yaml.
- Type: dict
- Required: no
homeassistant_homekit_config
- Default: See homeassistant_homekit_config_default
- Description: Configuration for the HomeKit integration.
- Type: dict
- Required: no
homeassistant_mdns_host_network_interface
- Default:
eth0
- Description: The host network interface from which mDNS requests are sent to the HomeAssistant container.
- Type: str
- Required: no
- Default:
- hosts: localhost
roles:
- artyorsh.smarthome.homeassistant
- hosts: localhost
vars:
homeassistant_homekit_config:
filter:
include_entity_globs: ["light.*"]
roles:
- artyorsh.smarthome.homeassistant
Running HomeAssistant in a Docker bridge network causes issues with the discoverability of the HomeKit integration by Apple Home. This is because HomeKit relies on mDNS for device discovery, which doesn't work out of the box across Docker's bridge network due to the way Docker handles networking. By enabling Avahi tools, which provide mDNS services, the HomeAssistant container can broadcast its presence on the network, making it discoverable by Apple Home. For more details, please refer to this community thread.
Running in a bridge network provides isolation between the Docker containers and the host machine, which enhances the security of IoT infrastructure. It allows containers to communicate with each other while keeping them isolated from the host's network.
Yes, it is. In this case, mDNS replication and customization of HomeAssistant image are not required.