this container is maintained by myself.
Here is a docker-compose snippet to help you get started creating a container.
Compatible with docker-compose v2+ schemas.
---
version: "2.1"
services:
ac2mqtt:
image: backslashh/docker-ac2mqtt
container_name: ac2mqtt
hostname: ac2mqtt
network_mode: host
volumes:
- ${CONFIG}/ac2mqtt:/config/ac2mqtt/
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
restart: unless-stopped
The container needs to use the host network to ensure it runs on the same subnet as your AC units.
Once the container starts you will need to edit your config.yml file with your MQTT host address and username/password.
After you have edited the config.yml file, restart your container.
You can then use a program like MQTT Explorer to watch for the aircon
topic to start populating with your AC unit mac addresses.
to set values just publish to /aircon/mac_address/option/value/set new_value :
/aircon/b4430dce73f1/temp/set 20
Parameter | Accepted Value | Function |
---|---|---|
power |
ON or OFF |
Power on/off the AC unit |
temp |
16 to 32 |
Sets the AC temperature. Values are between 16 and 32 and in 0.5 increments. e.g. 20.5 |
mode |
AUTO , HEATING , COOLING , OFF |
Sets the mode of the AC unit |
homeassist |
auto , heat , cool , off |
Same as mode but specifically for Home-Assistant. For Home-Assistant integration see home-assistant |
fanspeed |
AUTO , LOW , MID , HIGH |
Sets the fans speed for the AC unit |
AC2MQTT can be utilised with Home-Assistant using MQTT auto-discovery (https://www.home-assistant.io/docs/mqtt/discovery/)
To enable MQTT autodiscovery in your Home-Assistant configuration.yaml:
mqtt:
discovery: true
discovery_prefix: homeassistant
Edit your ac2mqtt config.yml file and ensure the following is under the mqtt
section:
auto_discovery_topic: homeassistant
The auto_discovery_toipc
must match the discovery_prefix
in your Home-Assistant configuration.yaml.