Control the air conditioner

Does not work for me

I have improved on my previous version for making my dumb daikin airconditioner smart.
Basic idea is to use input_selects to choose the settings (mode/temp/fan speed) you want. Learn the broadlink IR codes for every AC setting you want available and save them as scripts with formulaic names. A template sensor uses the input_select settings to show the correct script. Turning on an input_boolean, triggers an automation. The automation action turns on the correct script, causing the correct IR Code to be sent to the AC. Make a template switch which has turn_on turning on the input_boolean, and turn off turning on the off script.

Code to get the AC working is here: https://pastebin.com/Y75VhTua
Lovelace is here: https://pastebin.com/CRF4bis3

Old version: https://pastebin.com/q5MaXyMV

4 Likes

This is pretty cool @PodPerson - thanks for sharing.

This is neat. Thanks for sharing.
Do you then digest the input booleans in automations? Care to share?
Am also curious about your condensation chance sensor… I could see some use for this!

I’m travelling and don’t have access to my config at the moment. Yes all actioned in automations.

The condensation sensor is this:

1 Like

Cheers. That’s great!
Let us know when you’re back. Safe travels…

I use this:

It looks like this:

and works with Broadlink IR bridges. If anyone wants to see the config let me know.

1 Like

I use something similiar as @zoogara - Instead of purchasing a Broadlink I’m using a Nodemcu to send the IR codes. I’ve also attached a temperature/humidity sensor which sends data back to my HA. The Nodemcu is communicating via MQTT. Works great and the whole set up is no more that $4 per AC.
( I cannot figure out how to change the temperature to F, i have my units set to metric as i need it in celsius for my 3d printer cards.)

2 Likes

Nice. I use the Daikin component. In Lovelace, the card defaults to the standard thermostat card. Unfortunately, I can’t set things like fan speed via these. May need to come up with a custom card for it…

Hi, Can you show me how to put it to work ? Mine only turns off the AC. All the other buttons won’t work.
thanks a lot.

For starters, does your air conditioner appear in this list? https://github.com/smartHomeHub/SmartIR/blob/9691aaaf622de33eaaeab7b02c452ce054d8e395/docs/CLIMATE.md#available-codes-for-climate-devices

If it doesn’t then you have a long and arduous process ahead capturing codes, but no different than most other climate control solutions in HA.

Hello, thx for your reply,
And yes, my ac appears in this list, I have a gree ac.

I am also able to learn the remote codes.
What I can’t figure out os how to create the entities/service/devices ao I can create the ac card amd add the controls to it.

Ok - I am assuming you have installed the SmartIR custom component.

First thing is to enable SmartIR and define your Broadlink IR bridge, substituting your IP, MAC and type:

smartir:

switch:
  - platform: broadlink
    host: 192.168.0.136
    mac: '34:ea:34:e3:ad:52'
    type: rm_mini
    friendly_name: "Kitchen IR"

Then add SmartIR as a climate integration:

climate:
  - platform: smartir
    name: Kitchen AC
    device_code: 1282
    controller_data: 192.168.0.136
    temperature_sensor: sensor.kitchen_temperature
    humidity_sensor: sensor.kitchen_humidity

Your device code should match the one for your A/C, and ensure it exists in /config/custom_components/smartir/codes/climate. Choose a suitable sensor for temp and humidity, if you don’t have these I believe you can leave them out.

Lastly add a suitable card to Lovelace:

  - cards:
      - type: thermostat
        entity: climate.kitchen_ac
        name: Kitchen Air Conditioner
    icon: 'mdi:air-conditioner'
    state_color: true
    title: ac_view

The instructions for the SmartIR are actually on GitHub: https://github.com/smartHomeHub/SmartIR/blob/9691aaaf622de33eaaeab7b02c452ce054d8e395/docs/CLIMATE.md

Otherwise feel free to ask questions in the SmartIR thread: SmartIR - Control your Climate, TV and Fan devices via IR/RF controllers

And don’t forget to post your config if you have an issue.

If it still doesn’t work after this then maybe your a/c is a newer model and you will have to capture your own codes.

1 Like

I got all the, just the card I don’t have.
Still it doesn’t work like it should.

  • platform: broadlink
    host: 172.16.0.56
    mac: ‘24:df:a7:42:c6:8b’
    type: “rm_mini”
    friendly_name: “Mainroom IR”

climate:

  • platform: smartir
    name: Main AC
    unique_id: main_ac
    device_code: 1180
    controller_data: 172.16.0.56
    temperature_sensor: sensor.temperature
    humidity_sensor: sensor.humidity

The only thing I can suggest is that the IR codes don’t match, i.e. that your aircon is a slighly different model.

When you move the slider to a new temperature, your aircon will only get one code when you stop moving it, that code comprises the temperature, fan speed and mode. The air con should normally acknoweledge receipt of a valid sequence, mine beeps.

If you don’t have a card defined I am not sure how you are controlling the component? Through service calls?

Yes, through service calls

I suggest you create a suitable thermostat card, turn on the a/c using one of the mode buttons below the temperature display and then see if you can set the temperature using the circular slider.

If that doesn’t work then it’s probably time to ask some questions on the other thread.

Hi there, my AC model is not on the supported list is there an easier way to add support, or I have to manually learn all the codes?

Hi Tom

Are you able to share the automation configuration you are using?

Thanks

There’s nearly 400 lines of code to my lounge heating and cooling automations so I pastebinned it: https://paste.ubuntu.com/p/WH7wGB7ppN/

These take care of:

  • manually selecting a heating or cooling mode
  • scheduled heating and cooling on/off
  • switching off the heating/cooling if an external door or window is opened
  • manual temperature set point adjustment
  • automatically boosting/retarding the heat or cooling power as required to quickly get to the set point
  • automatic temperature set point adjustment based on season and morning weather forecast

There are also a bunch of binary sensors associated with these automations: https://paste.ubuntu.com/p/BxWXpSw3Vj/

1 Like