AIRDUINO | Adding Network Remote Control to the Daikin VRV with the BRC1D61 or similar thermostats

Wouldn’t it be nice if your air conditioner could be switched on or off remotely, make intelligent decisions and be made to follow your own custom rules? Why not automatically switch off when you leave the house? If the house is at 17 degrees and you are heating it to 19 degrees, but the temperature outside is 20 degrees, why not just open the windows and turn off the air conditioner?

There are some smarter thermostats now available such as NEST, but they don’t necessarily give you the control customisation you require, cost too much or are simply not compatible with your air conditioner.

Unfortunately my Daikin VRV system uses a proprietary 2 way protocol and electrical standard  between the thermostat and main unit. Although it uses 2 wires, it is not compatible with most other thermostats including NEST. Daikin offers a WiFi add-on called SkyFi, but the costs are quite ridiculous (around $600 AUD fitted) and you are stuck with a proprietary app that doesn’t support intelligent processing or integration with common IoT methods.

The Goal

The goal was really quite simple:

  1. Preserve existing thermostat controller capabilities.
  2. Add network connectivity.
  3. Switch the air conditioner on or off based on commands received over the network.
  4. Send air conditioner on/off status information over the network
  5. Budget under $100.

I could then add whatever software rules I liked running from another network location to control the air conditioner. There are plenty of other potential options to control such as switch between heat/cool, zones, etc. but these features are well managed by the controller and are not really required for typical remote operations.

Where to start?

Hacking the protocol was going to be complex given its closed nature and 2 way signalling methods, so hacking the controller itself was the best option. As it turns out, it was easy to do.

The picture below shows the on/off switch and the status led. The aim was to trigger the button with a relay and measure the voltage across the led to detect on/off status without affecting the basic operation of the controller.

20150728_215928-e1438483866450-1020x1014

Modifying the Controller

The casing is easily removed by levering with a small flat end screwdriver in the casing slots at the top of the casing. The circuit board can then be carefully lifted out after removing all the anchoring screws. You should switch the air conditioner off at the mains before proceeding. I also suggest labelling the main connecting wires before detaching from the circuit board.

After removing the main circuit board, solder the four connecting wires in the locations shown. The black and red wires are soldered to the on/off button pins and the green and yellow wires are soldered to the cathode and anode pins of the on/off LED. Note: if you zoom in on the picture, you will see the yellow wire is connected to the left pin and the green to the right pin.

20150728_220044-e1438921960315-1020x1347

Route the cable along the available channel (no modification required) in the casing, replace the circuit board and pass the cable back through the wall cavity.

Controlling via an Arduino

The Arduino is ideal for this task with the addition of a basic relay and network capabilities. The key tasks required are:

  • Toggle a relay to emulate the on/off button
  • Measure the voltage across the LED to distinguish between the on and off state
  • Measure the ambient temperature/s where relevant (assuming you don’t already have this+data)
  • Publish the status and temperature to MQTT topics over an IP connection
  • Subscribe to an MQTT topic to listen for on/off commands.

A basic relay shield and ethernet or wifi shield are all that is needed. I was lucky enough to have a spare ethernet and pebble shield available that provided the relay, temperature sensor and as a bonus, an LCD display. If you don’t have temperature data already, I would recommend connecting at least one DS18B20 or similar sensor.

Wiring

After running the cable back through the wall cavity, I connected it to the arduino on an adjacent wall as shown below. Note: the ethernet shield is stacked on the arduino directly below the pebble shield shown.  The pebble has additional circuitry for zigbee and lcd support which are not needed, so don’t get put off by the picture.

20150728_223259-1020x574

The black and red button wires are connected directly to the relay terminals on pin 6 (polarity is not important).  When the relay is tripped (closed) for 500ms, a button press action is generated.

The green wire from the LED is connected to Analog pin 4 and via a 10k pulldown resistor to ground. The yellow wire from the LED is connected to +5V.

I ran some simple tests on the analog pin values when the led was on and off to determine the threshold values for the LED state. The mid value between the high and low values was 760 (out of 1024 units).  Above 760 the LED is detected as OFF and below 760 the LED is detected as ON.

Note: with the wiring as shown, when power is lost to the arduino, the LED will turn off, even though the air conditioner is active.

The DS18B20 temperature sensor is connected on digital pin 5.  I actually chained a second DS18B20 sensor off the same pin on a long cable so I could also measure the temperature more accurately closer to the controller and not be affected by any heat generated by the arduino.

Code

The following code shows how to remotely switch the controller on and off via subscribed MQTT commands and report on/off status and temperature back via MQTT published messages.

/* DaikinAircon.ino
 * ~~~~~~~~~~~~~
 * Daikin VRV/BRC1D61 (or similar) Airconditioning network ON/OFF control and status reporting
 * ~~~~~~~~~~~~~
 * Please do not remove the following notices.
 * Version: 0.2
 * Copyright (c) 2015 by Mike Thompson
 * Documentation: http://mattala.com.au/2016/08/14/airduino-network-enabling-the-daikin-vrv-with-the-brc1d61-or-similar-thermostats/
 * License: This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Australia License.
 * Further information is available here - http://creativecommons.org/licenses/by-nc-sa/3.0/au/deed.en_GB 
 * 
 * Description: This code allows the Daikin BRC1D61 or similar airconditioning thermostat controller to be remotely switched on and off via
 * MQTT commands and report on/off status and temperature back via MQTT. Using tools such as Node-red, complex rules
 * can be created to automatically control the air conditioner well beyond the basic controller capabilities.
 *
 * This code requires connecting an ardunio to the BRC1D61 with four wires to emulate an on/off button press and to capture
 * the the on/off ststus. Further details can be obtained from the supporting documentation.
 *
 * Third-Party libraries
 * ~~~~~~~~~~~~~~~~~~~~~
 * There are several third-party libararies such as OnweWire that are not included in the Arduino IDE and
 * need to be downloaded and installed separately.
 *
 */
 
#include <OneWire.h>
#include <DallasTemperature.h>
#include <SPI.h>
#include <Ethernet.h>
#include <PubSubClient.h>
#include <PString.h>

#define PIN_ONE_WIRE           5  // DS18B20
#define RELAY_A                6
#define PIN_AIR               A4  //Aircon LED ON Voltage (1.84v) detect
#define BUFFER_SIZE          200

char globalBuffer[BUFFER_SIZE];  // Store dynamically constructed strings
PString globalString(globalBuffer, sizeof(globalBuffer));
String globalState;

//Ethernet config
byte mac[]     = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFD, 0x02 };
byte ip[]      = { 192, 168, 2, 100 };
byte gateway[] = { 192, 168, 2, 1 };
byte netmask[] = { 255, 255, 255, 0 };

//IP address of MQTT server
byte server[]  = { 192, 168, 2, 22 };

OneWire oneWire(PIN_ONE_WIRE);  // Maxim DS18B20 temperature sensor
DallasTemperature sensors(&oneWire);
EthernetClient ethClient;
PubSubClient client(server, 1883, callback, ethClient);

void setup() 
{
  pinMode(RELAY_A, OUTPUT);

  globalString.begin();
  sensors.begin(); //DS18B20
  
  delay(2000); //allow time for Ethernet initialisation

  Ethernet.begin(mac, ip, gateway, netmask);
  while(!client.connect("ArduinoAircon"))
  {
    delay(500);
  }
  client.subscribe("Daikin/command"); //subscribe to topic to receive MQTT commands
}

void loop() 
{
  if(client.loop()==false) //reconnect and subscribe if connection lost
  { 
    while(!client.connect("ArduinoAircon"))
    {
      delay(500);
    }
    client.subscribe("Daikin/command"); //resubscribe if connection reset
  }
  
  int ledVoltage = analogRead(PIN_AIR);
  if (ledVoltage > 760) //mean value between upper and lower limits
  {
    globalState = "Off";
  }
  else
  {
    globalState = "On";
  }
  globalString = globalState;
  client.publish("Daikin/state", globalBuffer);
  
  sensors.requestTemperatures(); // Send the command to get DS18B20 temperature
  globalString = sensors.getTempCByIndex(0); //change index to retrieve other linked DS18B20 sensors
  client.publish("Daikin/temp", globalBuffer);
  
  delay(1000);
}

//function to extract values from string.  Used to process MQTT message payload
String getValue(String data, char separator, int index)
{
  int found = 0;
  int strIndex[] = {0, -1};
  int maxIndex = data.length()-1;

  for(int i=0; i<=maxIndex && found<=index; i++){
    if(data.charAt(i)==separator || i==maxIndex){
        found++;
        strIndex[0] = strIndex[1]+1;
        strIndex[1] = (i == maxIndex) ? i+1 : i;
    }
  }
  return found>index ? data.substring(strIndex[0], strIndex[1]) : "";
}

void callback(char* topic, byte* payload, unsigned int length) //process MQTT command when received  
{
  payload[length] = '\0'; //adds null to end of string to create correct string
  String strPayload = String((char*)payload);
  String strTopic = String(topic);
  
  if (strTopic=="Daikin/command")
  {
    globalString = getValue(strPayload,' ',0);
    if (globalString == "Off")
    {
      if (globalState == "On")
      {
        tripRelay();
      }
    }
    else
    {
      if (globalState == "Off")
      {
        tripRelay();
      }        
    }
  }          
}

//toggle relay to emulate button press
void tripRelay(void) 
{
  digitalWrite(RELAY_A, HIGH);
  delay(500);
  digitalWrite(RELAY_A, LOW);
}

Advanced

Adding Node-RED smarts

You can easily build your own smart thermostat capability in Node-RED and make intelligent decisions such as opening windows, turning off when leaving home etc. using external and internal temperature values, geo-fencing etc.

38 comments on “AIRDUINO | Adding Network Remote Control to the Daikin VRV with the BRC1D61 or similar thermostatsAdd yours →

  1. Thank you for making this. This is exactly what I need…

    Can you please explain a little bit more about the wiring of the LED. Im just a little confused.
    The green wire, one side of the LED is connected to the analog input via 10k pulldown resistor. Shouldn’t the yellow wire, the other side of the LED connected to ground and NOT 5V?

    Also can you please explain why the LED would not light up even when the aircon is running if the power to the arduino is removed.

  2. Hi James
    Sorry I didn’t get back to you earlier. Since putting this circuit together, I have had another look and suspect there is a better way to do it using a digital IO pin as follows:
    – connect the Arduino ground to the power ground of the controller
    – connect an Arduino digital I/O pin to the switched side of the LED
    – enable the internal pull-up resistor on the I/O input pin
    – when the LED is off, the input should read HIGH
    – when switched off, the input pin should be pulled to ground and read LOW

    I haven’t tried this yet, but I would be interested in giving it a go. Let me know if you get a chance to try it first.

    Cheers
    Mike

  3. Mike, this is awesome. I’ve been looking for a way to use my 2 x BRC1D61 with the home automation solution I have setup with Home Assistant and I think I have just found it. You’re a legend.

    Did you happen to try out your revised version idea?

  4. Not yet, but keen to give it a go when I can get some free time. Keep me posted if you get there first.

    Cheers Mike

  5. It is interesting, I will hack my Daikin remore in the same way and I will use a Sonoff switch managed by Android/Amazon Echo to do it.
    To avoid the use of an external power supply for the Sonoff I would like to know if the P1/P2 cable carries any voltage, do you know it?
    Thanks for your experience, keep in touch.
    Best
    -Fernando

    1. Hi Fernando
      The P1/P2 cable carries 15.4 volts (P2 positive) when I last checked with a multimeter, but I am not sure what load it can support.
      Cheers
      Mike

      1. Hi Mike, thanks a lot.
        The Sonoff is powered with 5v@80ma. I assume that I can add several BRC1D61 in series, therefore it should feed my Sonoff through a 15/5 converter. I have not found the power consumption for the BRC1D61, do you have an idea?
        Cheers
        -Fernando

        1. Hi Fernando
          I haven’t found any details on the power consumption of the BRC1D61. Checking with the multimeter didn’t seem to give me an accurate reading, however, Daikin sell a device known as the BRP15A61 SKYFi to enable wireless access via a phone app. That device is powered by the same P1/P2 connections, so it is reasonable to assume that the power is sufficient for a microcontroller and wifi chip and shouldn’t have any issues powering an esp8266.
          Cheers
          Mike

  6. Hi Mike,
    You confirm my idea, I founded also in the web several third party products for WiFi access powered by P1/P2. I assume there is not a problem to feed my Sonoff.
    What I’m confused is the following: you told me P2 is the positive. I assume your reading, 15.4 v, is DC. But Daikin technical documentation insist P1/P2 has not polarity.
    Thanks a lot for your help and your comments. All the very best
    -Fernando

  7. Hi Mike, today Sonoff arrived and I tested soldering and wiring the switch.
    Works!!!
    I can switch A/C using Alexa and my mobile phone. I am currently powering sonoff from external 5v waiting for the 15/5 converter and also I should route a new cable through wall … but working in progress.
    Thank you so much for your knowledge. Keep in touch
    Best
    -Fernando

    1. I’m also planning in using this article to connect an ESP8266 to the DAIKIN remote. I will try to get A/C state, but first I’ll start with the activation. Fernando, can you explain the connection?

      Thanks in advance and great job!

  8. Hi Lorenzo,
    I’m using a SONOFF device. I hacked the DAIKIN controller following Mike instructions, just for the switch i’m not using the led sensor. The SONOFF device is built around a ESP8266 and it is very cheap, 5 or 6 $ depending the shop and the advantage is that it is ALEXA controlled. Also you can control it via a Android/IOS app.
    Let me know if you need more information from my side.
    All the best
    -Fernando

    1. Hi Fernando
      Any luck with 15v to 5v step down and power?
      I’d like to do the same, but am unsure if the onboard capacitors would store enough charge to power the Daikin unit and arduino (in my case I am using an esp8266 chip without arduino) during data transmission along the P1/P2 wires (when the positive wire is pulled to GND I presume). Unless is it not pulled to ground, but pulled instead to lower voltage? Can anyone confirm/deny?

  9. Hi Dan, I made a test with a 15DC-2-5DC converter and didn’t work. I read on the Daikin technical manual that p1/p2 can be interchanged, and I assume this is because the 15V are 15VAC, not 15VDC. My next step is to include a simple diode and test again but I am busy now, may be in two weeks.
    Keep in touch.

  10. Hi Fernano,

    I have finished doing the cable part. By the way, I have use and old usb cable (4 wires) which seems handy for this project. I’m also using your same board which, a Sonoff Basic, but with Tasmota firmware, which will let it integrate with mqtt.

    I have connected red and black (as for mike schema) cables to sonoff input and output (not the directs one, but the others), but don’t seems to work. I have confirm, there is not a closed state between this ports. Where do yo connect this cables?

    Thanks in advance.

  11. Lorenzo,
    I made the Mike mod on the Daikin remote. It is just solder two cables (remember i’m not using led sensor) to the remote switch.
    I wire both cables to the Sonoff with the orinigal software. Now I am able to make a 500 ms short-circuit on the switch and therefore simulate a push over it. Works!! Also I can manage from Amazon Alexa.
    That’s all. I am not able, from now, to power the Sonoff from the p1/p2. I’m still investigating if the 15 volts is AC or DC.
    Let me know if I can help.

  12. Hi Fernando
    Interesting because I am getting 15vdc when I measure. There is definitely a polarity. (Mine is labeled with an additional P and an N presumably for positive and negative)
    I looked at the interesis tech doc – it looks like the box draws 45mA rather than that being the max current supplied by the P1/P2 bus… 45ma would be insufficient to power an ESP chip for wifi integration

  13. Hi Lorenzo,
    Mike answered mi some threads ago: “The P1/P2 cable carries 15.4 volts (P2 positive) when I last checked with a multimeter, but I am not sure what load it can support.”
    If you have a look to the documentation it seems it is possible to connect several boxes (45 mA each) and also several Daikin controlers. I assume there is enough current available to drive a sonoff device.
    Best
    -Fernando

    1. Hi Fernando,
      I am very curious about how your project ended up. I have a few spare sonoff basic’s and would like to achieve the same thing. If you could share your wiring and code, that would be great.

      1. Hi Davide,
        There is not code, I just installed a sonoff to simulate the “click” on the Daikin A/C “power on” button and the control is via Amazon Alexa.
        Say “Alexa switch on (or off) A/C”.

  14. Hi Davide,
    There is not code, I just installed a sonoff to simulate the “click” on the Daikin A/C “power on” button and the control is via Amazon Alexa.
    Say “Alexa switch on (or off) A/C”.

  15. Hi All,

    there are two contacts T1/T2 at the indoor unit next to P1/P2.
    these are for remote forced off or remote on/off depending on programming in the BRC1D61 control panel

    1. Hi Brian,
      interesting!!!
      can you elaborate a little bit more: schema and how to program BRC1D61 for it.?
      Thanks

  16. Hi again Brian,
    I founded the info in the web, connected sonoff direct to T1/T2, programming the BRC for “Remote on/off”, and works!! Thanks for the info.
    I have just an issue, the connector for the X40A (T1/T2) is a JST, but which model?
    Thanks

    1. This is really interesting, I’m planning to look into this as well but I have a few questions:
      – does shorting T1 and T2 turn it on or off?
      – what is the voltage running across T1-T2 (i.e., can I power a Sonoff SV or D1 Mini + power shield, using it)?
      – could you paste the URL to how to program the “Remote on/off” via the control panel, please?
      – when the “remote off” is triggered, does the LED on the control panel also go off?
      Thanks Nick

      1. – does shorting T1 and T2 turn it on or off? Yes, it works.
        – what is the voltage running across T1-T2 (i.e., can I power a Sonoff SV or D1 Mini + power shield, using it)? Contact that can ensure the minimum applicable load of 15 V DC, 1 mA.
        – could you paste the URL to how to program the “Remote on/off” via the control panel, please? https://www.manualslib.com/manual/561782/Daikin-Fxaq07mvju.html?page=21#manual
        – when the “remote off” is triggered, does the LED on the control panel also go off? yes

  17. To Fernando:

    I have been searching for an answer for making my daikin sky air wired remote to wireless and via alexa(echo dot). Saw your post!!! May I know what kind of sonoff you used and maybe detailed photo on how you managed to tap to the controller? I know this has been a year, maybe there are a few developments where we can adjust the temp and fan speed via voice activation and yet keeping the wired controller.

    1. Hi Arnold,
      I had a look to your link, impressive!!!
      I am interesting on a circuit kit, are you providing it yet?
      I personally think to use a Raspberry Pi Zero with it.
      All the best

  18. Hi Mike,

    A big thank you for the inspiration. I implemented this yesterday using esphome on a esp32 running under Home Assistant. The same esp32 is also receiving and relaying temperature data from a Xiaomi temp/humidity sensor so I can see the house temp when away and get the aircon on as I head home. Absolutely delighted!

    1. Hi John,
      I am very new to home assistant. Would you mind sharing your settings for esphome and home assistant for esp32. I plan to do the same thing as you… control the air conditioner and also use the xiaomi temperature and humidity sensor.

  19. Hi John

    Thanks for the feedback. It is really appreciated. Great to hear it was helpful and would love to see updates as you progress.

    Cheers
    Mike

Leave a Reply

Your email address will not be published. Required fields are marked *