There are many people trying to get this integration to work, and I though it needed a better guide (Tutorial) on how to implement it.
First of all, the integration was not created by me. It was created by a guy named Liaan and you can find his integration on GitHub by navigating to this link: GitHub - liaan/broadlink_ac_mqtt: Broadlink Air Conditioners to mqtt
The are 2 versions: One is for docker, which is not the one I am using and you can find here: GitHub - broadlink-ac/broadlink_ac_mqtt_docker: Docker version of Broadlink AC to Mqtt and one for non docker, Linux installations. If I got this right, this program, becomes the middleman between your Broadlink AC and your Home Assistant application.
In my case, I have installed this program on a raspberry pi that I use to host my Unifi Controller.
To get started, you are some prerequisites:
You need to have an MQTT broker setup on your Home Assistant. As this is completely outside our scope, you can watch this video to set it up:
You need to have PIP installed, which if you don’t can be installed using this command:
- apt install python-pip
You also need to have git installed, which if you don’t can be installed using this command:
- apt install git
You also need to have nano installed, which if you don’t can be installed using this command:
- apt install nano
Then you are ready to start installing the program. Copy and paste the commands one by one and run them on your Linux Machine (Not HA).
- pip install paho-mqtt
- pip install pyyaml
- pip install PyCrypto
- git clone GitHub - liaan/broadlink_ac_mqtt: Broadlink Air Conditioners to mqtt
- cd broadlink_ac_mqtt
- cp settings/config_sample.yml settings/config.yml
- cd settings
- nano config.yml
You now need to edit the config.yml file and add your MQTT details.
This will look something like this:
service:
daemon_mode: True
update_interval: 10
self_discovery: True
bind_to_ip: False
mqtt:
host: 192.168.10.200
port: 1883
client_id: ac_to_mqtt
user: yourmqttuserhere
passwd: yourpassowrdhere
topic_prefix: /aircon
auto_discovery_topic: homeassistant
auto_discovery_topic_retain: False
discovery: False
##Devices
devices:
- ip: 192.168.10.56
mac: a3df4af45f
name: Living Room
port: 80
There are 5 things that you need to edit under mqtt and 3 things you need to edit under devices:
mqtt:
- You need to add your mqtt ip address next to host
- You need to add your mqtt broker port next to port
- You need to add your mqtt username next to user
- You need to add your mqtt user password next to passwd
devices
- You need to add your Air Conditioner’s IP address next to ip
- You need to add your Air Conditioner’s MAC address next to mac
- You need to add a name for your Air Conditioner next to name
Once done, you can press ctrl & x on your keyboard and then enter to save and exit the config.yml file.
You are now ready to start the program: Please note that you need to be inside the root broadlink_ac_mqtt folder to do so. As you are currently at broadlink_ac_mqtt/settings directory, type
- cd …
to go back on directory.
Now start the program by typing
- python monitor.yml
If everything starts correctly without errors, you are ready to go.
Restart your Home Assistant, navigate to Integrations, find your MQTT broker, for example Mosquitto broker and check if your devices have been increased by one.
If yes, you can navigate to your Lovelace dashboard, edit, add card by entity, search for your AC, select it and add it your dashboard.
By following this guide you should be able to control Power, Modes, Temperature and Fan speed.
As for these properties: fixation_v, mildew, ifeel, sleep, clean, health, display, or fixation_h, unfortunately, you can get the values from the mqtt broker but cannot currently set them via mqtt. To be honest the only one i care is the fixation_v property which is a bit of a deal breaker for me.
This guy also managed to get it to work as a service, so that you don’t have to keep starting the program. Air conditioner - AUX - mqtt configuration
Finally if you need Swing, the developer just added it to his program!
Just copy and paste this to your Home Assistant configuration.yaml file:
climate:
- action_topic: /aircon/c8f742348bec/homeassistant/set
availability_topic: /aircon/LWT
current_temperature_topic: /aircon/c8f742348bec/ambient_temp/value
fan_mode_command_topic: /aircon/c8f742348bec/fanspeed_homeassistant/set
fan_mode_state_topic: /aircon/c8f742348bec/fanspeed_homeassistant/value
fan_modes:
- Auto
- Low
- Medium
- High
- Turbo
- Mute
max_temp: 32.0
min_temp: 16.0
mode_command_topic: /aircon/c8f742348bec/mode_homeassistant/set
mode_state_topic: /aircon/c8f742348bec/mode_homeassistant/value
modes:
- 'off'
- cool
- heat
- fan_only
- dry
name: 'Living Room AC'
platform: mqtt
precision: 0.5
temp_step: 0.5
temperature_command_topic: /aircon/c8f742348bec/temp/set
temperature_state_topic: /aircon/c8f742348bec/temp/value
unique_id: c8f742348bec
swing_mode_command_topic: /aircon/c8f742348bec/fixation_v/set
swing_mode_state_topic: /aircon/c8f742348bec/fixation_v/value
swing_modes:
- SWING
- TOP
- AUTO
- MIDDLE1
- MIDDLE2
- MIDDLE3
Note. If you had this integration before and need swing support. Delete everything, redownload and set it up again from scratch. Here is the relevant topic: Feature Request: Control of the Vertical and or Horizontal "Fixation" · Issue #84 · liaan/broadlink_ac_mqtt · GitHub
MAY 2022 update!
This issue is first and foremost with the AC Freedom app.
V2 and above does not work at all, but version 1.2.28 from apkpure, manages to successfully
add the AC WIFI modules to your WIFI router.
Important! These modules cannot be connected to 5Ghz WIFI. If you are running a mixed band WIFI you will need to disable 5Ghz and enable it after this process has ended.
Just open the AC Freedom 1.2.28 app press the health button 8 times on your AC remote
until you hear the bip bip, and tap on the app to add a new device.
Continue with the add process adding the WIFI network and password.
Adding using the app will most likely fail, but the AC WIFI module will most likely be
added successfully to your WIFI router.
As you can see bellow in my unify controller the modules have been added successfully.
All you need now is to set the devices to use a fixed IP address on your router.
After you have done that, copy the mac address of your WIFI module and add
the device to the configuration file, where you have installed broadlink_ac_mqtt
for multiple devices you can reference the example bellow.
service:
daemon_mode: True
update_interval: 10
self_discovery: True
bind_to_ip: False
mqtt:
host: 10.10.10.244
port: 1883
client_id: ac_to_mqtt
user: yourmqttuserhere
passwd: yourpassowrdhere
topic_prefix: /aircon
auto_discovery_topic: homeassistant
auto_discovery_topic_retain: False
discovery: False
##Devices
devices:
- ip: 10.10.10.139
mac: c8f742348bec
name: 'Living Room AC'
port: 80
- ip: 10.10.10.79
mac: a043b0088f14
name: 'Home Cinema AC'
port: 80
- ip: 10.10.10.80
mac: a043b008e504
name: 'Office AC'
port: 80
Then go to the configuration.yaml file and add the device there.
More multiple devices please reference the example bellow.
climate:
- action_topic: /aircon/c8f742348bec/homeassistant/set
availability_topic: /aircon/LWT
current_temperature_topic: /aircon/c8f742348bec/ambient_temp/value
fan_mode_command_topic: /aircon/c8f742348bec/fanspeed_homeassistant/set
fan_mode_state_topic: /aircon/c8f742348bec/fanspeed_homeassistant/value
fan_modes:
- Auto
- Low
- Medium
- High
- Turbo
- Mute
max_temp: 32.0
min_temp: 16.0
mode_command_topic: /aircon/c8f742348bec/mode_homeassistant/set
mode_state_topic: /aircon/c8f742348bec/mode_homeassistant/value
modes:
- 'off'
- cool
- heat
- fan_only
- dry
name: 'Living Room AC'
platform: mqtt
precision: 0.5
temp_step: 0.5
temperature_command_topic: /aircon/c8f742348bec/temp/set
temperature_state_topic: /aircon/c8f742348bec/temp/value
unique_id: c8f742348bec
swing_mode_command_topic: /aircon/c8f742348bec/fixation_v/set
swing_mode_state_topic: /aircon/c8f742348bec/fixation_v/value
swing_modes:
- SWING
- TOP
- AUTO
- MIDDLE1
- MIDDLE2
- MIDDLE3
- action_topic: /aircon/a043b008e504/homeassistant/set
availability_topic: /aircon/LWT
current_temperature_topic: /aircon/a043b008e504/ambient_temp/value
fan_mode_command_topic: /aircon/a043b008e504/fanspeed_homeassistant/set
fan_mode_state_topic: /aircon/a043b008e504/fanspeed_homeassistant/value
fan_modes:
- Auto
- Low
- Medium
- High
- Turbo
- Mute
max_temp: 32.0
min_temp: 16.0
mode_command_topic: /aircon/a043b008e504/mode_homeassistant/set
mode_state_topic: /aircon/a043b008e504/mode_homeassistant/value
modes:
- 'off'
- cool
- heat
- fan_only
- dry
name: 'Office AC WIFI'
platform: mqtt
precision: 0.5
temp_step: 0.5
temperature_command_topic: /aircon/a043b008e504/temp/set
temperature_state_topic: /aircon/a043b008e504/temp/value
unique_id: a043b008e504
swing_mode_command_topic: /aircon/a043b008e504/fixation_v/set
swing_mode_state_topic: /aircon/a043b008e504/fixation_v/value
swing_modes:
- SWING
- TOP
- AUTO
- MIDDLE1
- MIDDLE2
- MIDDLE3
- action_topic: /aircon/a043b0088f14/homeassistant/set
availability_topic: /aircon/LWT
current_temperature_topic: /aircon/a043b0088f14/ambient_temp/value
fan_mode_command_topic: /aircon/a043b0088f14/fanspeed_homeassistant/set
fan_mode_state_topic: /aircon/a043b0088f14/fanspeed_homeassistant/value
fan_modes:
- Auto
- Low
- Medium
- High
- Turbo
- Mute
max_temp: 32.0
min_temp: 16.0
mode_command_topic: /aircon/a043b0088f14/mode_homeassistant/set
mode_state_topic: /aircon/a043b0088f14/mode_homeassistant/value
modes:
- 'off'
- cool
- heat
- fan_only
- dry
name: 'Home Cinema AC'
platform: mqtt
precision: 0.5
temp_step: 0.5
temperature_command_topic: /aircon/a043b0088f14/temp/set
temperature_state_topic: /aircon/a043b0088f14/temp/value
unique_id: a043b0088f14
swing_mode_command_topic: /aircon/a043b0088f14/fixation_v/set
swing_mode_state_topic: /aircon/a043b0088f14/fixation_v/value
swing_modes:
- SWING
- TOP
- AUTO
- MIDDLE1
- MIDDLE2
- MIDDLE3
Hope this helps.
- I had an issue where the device was actually successfully added to the AC Freedom
1.2.28 app but broadlink_ac_mqtt get spitting out an error.
I removed the device from AC Freedom and re-added it using the process above
without being added to AC Freedom and it works great without issues.
Note that of course you need to restart Home Assistant after adding the devices in the configuration.yaml file.