Sendo A/C unit with Wifi Control (BroadLink_OEM-T1)

ssh to your linux system,

  1. pip install paho-mqtt
    pip install pyyaml
    pip install PyCrypto
  2. git clone https://github.com/liaan/broadlink_ac_mqtt.git
  3. cd broadlink_ac_mqtt
  4. cp settings/config_sample.yml settings/config.yml
  5. open settings/config.yml with your editor (nano / vi) and add your MQTT details
  6. run python monitor.py

That should get it going. Note, you’ll have to have python, python-pip and git installed.

2 Likes

Sorry how do I open permissions to make change to config.yml? I’m signed in as sudo -s then open with text editor but seems I don’t have permissions to save any changes

update: sudo gedit
Got it!

Got it running but then it stopped.
No devices defined.

Almost there!

I’ve defined the 2 AC devices (Ip and mac correct) in the config.yml but after running monitor.py still returning no devices found.

Any further assistance would be appreciated. Thanks

UPDATE:

Manged to get a dump from the monitor now with lots of config details for the 2 A/C units.

Do I place this in the HA climate yaml? Had issues trying to do this. ids/mf/pl_avil etc were not being recognized by ha.

 - action_topic: /aircon/24dfa7cb98fc/homeassistant/set
   availability_topic: /aircon/LWT
   current_temperature_topic: /aircon/24dfa7cb98fc/ambient_temp/value
   device:
     ids: 24dfa7cb98fc
     mf: Broadlink
     model: Aircon
     name:"
     sw: 1.1.1
   fan_mode_command_topic: /aircon/24dfa7cb98fc/fanspeed_homeassistant/set
   fan_mode_state_topic: /aircon/24dfa7cb98fc/fanspeed_homeassistant/value
   fan_modes:
   - Auto
   - Low
   - Medium
   - High
   - Turbo
   - Mute
   max_temp: 32.0
   min_temp: 16.0
   mode_command_topic: /aircon/24dfa7cb98fc/mode_homeassistant/set
   mode_state_topic: /aircon/24dfa7cb98fc/mode_homeassistant/value
   modes:
   - 'off'
   - cool
   - heat
   - fan_only
   - dry
   name: "
   pl_avail: online
   pl_not_avail: offline
   platform: mqtt
   precision: 0.5
   temperature_command_topic: /aircon/24dfa7cb98fc/temp/set
   temperature_state_topic: /aircon/24dfa7cb98fc/temp/value  
   unique_id: 24dfa7cb98fc
  Invalid config for [climate.mqtt]: [ids] is an invalid option for [climate.mqtt]. Check: climate.mqtt->device->ids. (See ?, line ?). 

Fixed the configs with this:

    device:
      identifiers : 24DFA7CB8C91
      manufacturer : Broadlink
      model: Aircon
      name: Office
      sw_version: 1.1.1

Will try again

The climate control created in lovelace is being picked up by mqtt discovery but not changing any settings on the actual a/c unit.
What bit am I missing?

image

Tested various mqtt.publish commands from developer tools with the AC unit on but nothing it reaching the unit but the mqtt explorer is picking them up:
I’m stuck now. :frowning:

image

mqtt broker config:

logins:
  - username: user
    password: password
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false
discovery_prefix: homeassistant

Anyone please? Still stuck on this, unfortunately.

1 Like

Any help will be good. I’ve configured climate.yml manually in HA and running monitor.py on the Linux machine that runs HA as well. Everything works well till I have to restart HA due to an update or a config change I’ve made. If I restart HA, then I need to restart monitor.py as well, if I don’t I don’t get the info from the ACs correctly.
Will setting auto discovery solve this ? Or is there anything else I can try?
Thanks

Hi All,
I have AUX ac working with AC Freedom. I created a docker with ac2mqtt running on host network.
My MQTT broker is running on the same network as the AC.

When I’m running “monitor.py” script - I see that new “aircon” topic was created, LWT => online, but I get “no devices found”.

Any help would be much appreciated.

Thanks

==============================

UPDATE:
for some reason the auto discovery didn’t worked.
I changed self_discovery to false in config.yaml and added the ip and mac address of the AC in to the devices list and that seem to solve it and I managed to get all the information in MQTT.

I’m at the same place as you.

I think the mqtt is still not talking to the AC unit. Can’t seem to understand the hole process.

1 Like

Did you manage to do the component for HA?

Hi,

I’m trying to install the broadlink_ac_mqtt_docker but no luck

I have 2 AC and I need your help (with payment).

If you kind and willing to help - [email protected]

Thank you

2 Likes

Hi Guys,

Can anybody tell me how I can start monitor.py automatically upon raspbian booting?

Thx

Yeah I can seem to get it working I get errors on startup. Tried 3 different version of linux and the docker.

I get:

Log Output:` 2021-01-14 15:12:48,281,281 CRITICAL [AcToMqtt.py:112] unsupported operand type(s) for +: ‘NoneType’ and ‘int’

I can run ./monitor.py -S and get the discovery list but when I try to run it I get the error. I creates the device in home assistant but that it. They show up but never update after that. The issues has been on the git hub for like a month, and I posted my additional information to it the other day. Hopefully liaan or one of the other contributors will look into it eventually. I was really looking forward to integrating my AUX AC units.

1 Like

Yep this thread seems to have gone really quiet. I still haven’t been able to connect the mqtt and feed the data into homeassistant with a nice thermostat for controls.
None of my mqtt commands seem to do anything although mqtt explorer displays the units

I did get some feedback from the Devs on Github. There are several of us having issues and they have been trying to debug it. Is been a little quite over there for a week or so. But hey they are not getting paid t do the work so i will be patient.

1 Like

Hi, I’ve tried to get the Docker version working, but I’ve already bumped into an obstacle and don’t know how to fix it. I never used Docker before, bear with me :slight_smile:

Trying to compose the cointainer, I start getting

ac2mqtt    | Starting Monitor...
ac2mqtt    | [Errno -2] Name does not resolve
ac2mqtt    | Stopping

Whole log:

docker-compose up
WARNING: The CONFIG variable is not set. Defaulting to a blank string.
WARNING: The PUID variable is not set. Defaulting to a blank string.
WARNING: The PGID variable is not set. Defaulting to a blank string.
WARNING: The TZ variable is not set. Defaulting to a blank string.
Docker Compose is now in the Docker CLI, try `docker compose up`

Starting ac2mqtt ... done
Attaching to ac2mqtt
ac2mqtt    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
ac2mqtt    | [s6-init] ensuring user provided files have correct perms...exited 0.
ac2mqtt    | [fix-attrs.d] applying ownership & permissions fixes...
ac2mqtt    | [fix-attrs.d] done.
ac2mqtt    | [cont-init.d] executing container initialization scripts...
ac2mqtt    | [cont-init.d] 01-envfile: executing...
ac2mqtt    | [cont-init.d] 01-envfile: exited 0.
ac2mqtt    | [cont-init.d] 10-adduser: executing...
ac2mqtt    | usermod: no changes
ac2mqtt    |
ac2mqtt    | -------------------------------------
ac2mqtt    |           _         ()
ac2mqtt    |          | |  ___   _    __
ac2mqtt    |          | | / __| | |  /  \
ac2mqtt    |          | | \__ \ | | | () |
ac2mqtt    |          |_| |___/ |_|  \__/
ac2mqtt    |
ac2mqtt    |
ac2mqtt    | Brought to you by linuxserver.io
ac2mqtt    | We gratefully accept donations at:
ac2mqtt    | https://www.linuxserver.io/donate/
ac2mqtt    | -------------------------------------
ac2mqtt    | GID/UID
ac2mqtt    | -------------------------------------
ac2mqtt    |
ac2mqtt    | User uid:    911
ac2mqtt    | User gid:    911
ac2mqtt    | -------------------------------------
ac2mqtt    |
ac2mqtt    | [cont-init.d] 10-adduser: exited 0.
ac2mqtt    | [cont-init.d] 30-config: executing...
ac2mqtt    | **** Config file exists already ****
ac2mqtt    | **** Already at latest version ****
ac2mqtt    | [cont-init.d] 30-config: exited 0.
ac2mqtt    | [cont-init.d] 99-custom-files: executing...
ac2mqtt    | [custom-init] no custom files found exiting...
ac2mqtt    | [cont-init.d] 99-custom-files: exited 0.
ac2mqtt    | [cont-init.d] done.
ac2mqtt    | [services.d] starting services
ac2mqtt    | [services.d] done.
ac2mqtt    | Starting Monitor...
ac2mqtt    | [Errno -3] Try again
ac2mqtt    | Stopping
ac2mqtt    | Starting Monitor...
ac2mqtt    | [Errno -2] Name does not resolve
ac2mqtt    | Stopping
ac2mqtt    | Starting Monitor...
ac2mqtt    | [Errno -2] Name does not resolve
ac2mqtt    | Stopping
ac2mqtt    | Starting Monitor...
ac2mqtt    | [Errno -2] Name does not resolve
ac2mqtt    | Stopping
Gracefully stopping... (press Ctrl+C again to force)
Stopping ac2mqtt ... done

I’d be grateful if anyone can point me in the right direction. Thanks.

Hi, I’m trying to use the docker version. When I run discovery I get
“authentication failed to ac” error. The AC is an RCOOL Display 2 unit. Does it mean it is not compatible, or can you suggest what to check? Thank you.

I have 2 AUX Air Conditioners, both working flawlessly through AC Freedom app, but when I try to use your app I also end up with “Authentication failed to AC” error. Any tips for troubleshooting?

I have to apologize for the slow responses on the Dev of this. also, I don’t follow this thread at all, I just found it google for the other HA plugin that someone made based on my code, in the hope it might resolve the current issues.

It was very much a clobbered together project to make my own 2 units work with openhab. the HA was just a fun addon I did cause people asked.

It seems like the Aux units have either fixed there Auth part, or change the way the talk .

Some people are having issues with comms as there local network don’t allow broadcast UDP traffic, so just make sure that is allowed. On some devices one need to enable/install the helper for this, you can test this by disabling the internet and check if the AC Freedom app still works. If the AC freedom app don’t work without internet, the broadlink_ac_mqtt won’t ever worked as its purley lan only.

1 Like

Hi guys, I have AUX AC too, can someone tell me what and where should I run to get it working with home assistant?
I’m using hassio on my rpi4. So can I run ac2mqtt on it? Or I shall use separate rpi with linux installed with docker etc.???

1 Like

How on earth do i send mqtt packets for Display for example.
Publishing a package using the bellow and sending the value ON does nothing. But when i listen to the value it picks it up correctly.

/aircon/c8f742348bec/display/set

Really? Why cant i set fixation_v ? Is this a limitation of the integration, or something else?