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:
- Preserve existing thermostat controller capabilities.
- Add network connectivity.
- Switch the air conditioner on or off based on commands received over the network.
- Send air conditioner on/off status information over the network
- 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.
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.
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.
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.
thanks for that, I am looking to do something similar, but via z-wave…
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.
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
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?
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
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
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
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
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
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
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
Hi Fernando
Great news. It would be great to see the finished result.
Are you sensing the A/C state?
Cheers
Mike
Hi Mike,
I’m not sensing the A/C state.
I will send a picture of the final installation when done
Cheers
-Fernando
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!
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
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?
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.
Hi Dan,
a little bit more info, have a look to:
https://www.intesisbox.com/intesis/product/media/intesisBox_dk-rc-knx-1_datasheet_en.pdf?v=2.1
in the technical specifications section mentions 45mA from de p1/p2.
Cheers
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.
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.
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
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
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.
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”.
Hi Dan, Fernando,
The signal is definitely polarized, in the sense that the voltage is 15V dc average with a data signal modulated on top of it (the voltage fluctuates between 10V and 20V). When Daikin states the bus has no polarity the message is that you can reverse the wires as the Daikin devices don’t care which wire is the positive one.
When using the bus to power electronics, it takes some effort not to distort the data signal – this requires special inductors. After some experiments I gave up bus powered electronics myself.
Kind regards,
Arnold
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”.
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
Hi Brian,
interesting!!!
can you elaborate a little bit more: schema and how to program BRC1D61 for it.?
Thanks
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
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
– 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
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.
Hi Jarie,
The sonoff model I’m using is:
https://www.itead.cc/inching-self-locking-wifi-wireless-switch.html
I bought connectors for the Daikin card in eBay (50 connectors = 2 $ hahahaha, I have 48 spare connectors).
The control is throughAlexa just to switch ON/OFF, but for me is enough.
If you want some pictures let me know, I will send to you.
All the best
Hi Fernando,
You mentioned Daikin card connectors – I thought T1 /T2 are just screw terminals.
Could you please tell more about these connectors? link on ebay ?
I am in the same boat with BRC1E62 remote.
So far using Sonoff switch connected to T1/T2 terminals on the indoor unit seems to be the easiest way.
I understand your attempts to power Sonoff from P1/P2 bus failed.
Did you end up wiring it to L1/L2 power terminals on indoor unit via 240 to 5v convertor ?
Would you rate these sonoff switches as reliable so you can just leave them hooked up close to the indoor unit or you would you need easy access to the switch ? (I have one of my Xiaomi temp/humidity sensors in crawl space and it drops off from time to time so I have to get there to pair it again)
Regards
Hi Fernando could you post a conexiones schema or any picture in order to see how did you implemented the sonoff?
Gracias
Nice project! If you want to have status info from the heat pump, you can read the the P1/P2 bus data directly as documented on https://github.com/Arnold-n/P1P2Monitor
Thanks Arnold. Appreciate the tip. Will definitely have a look. Cheers Mike
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
Hi Fernando,
Thanks – and sorry for the late reply, I don’t visit these comments regularly.
The circuit will not work directly on a Raspberry Pi Zero, but will work on an Arduino Uno connected over USB to a zero.
For the shield, please contact me via mail (which is in the github code).
Kind regards,
Arnold
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!
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.
I have just implemented this for BRC1E62 based on sonoff SV and ESPhome. So I can turn it off and on and see the current status reading power from LED(not assumed status based on last on/off action)
see code below.
I disconnected power from relay by cutting but you could just remove resistors based on video below
https://www.youtube.com/watch?v=AU1KD_aJSMY
I used 4 wires:
2 wires from the on/off button on control pad going to relay in/out on sonoff SV
2 wires from the on/off LED on the control pad. (voltage 2.55 volts) to GPIO 14 (“-” from LED to Ground, “+” from LED to Signal )
I had to connect 10uF electrolytic capacitor to GPIO14 – “-” to Ground and “+” to Signal as status was jittering in Home Assistant when connecting wires from LED, but working well when testing with AA battery. So looks like LED power has some frequency, I don’t have oscilloscope to check it though.
esphome:
name: aircon
platform: ESP8266
board: esp01_1m
wifi:
ssid: “House of pain”
password: “ToHardForYouToCrack”
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: “Aircon Fallback Hotspot”
password: “123qwe123qwe”
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
binary_sensor:
– platform: gpio
pin:
number: GPIO14
mode: INPUT
name: “Aircon status”
device_class: power
switch:
– platform: gpio
pin: GPIO12
id: relay
– platform: template
icon: “mdi:ac_unit”
name: “Aircon Control”
turn_on_action:
– switch.turn_on: relay
– delay: 500ms
– switch.turn_off: relay
Cool implementation. Makes it really simple with the Sonoff.
Hello Vad, where did you connect Sonoff SV power?
I don’t know if It possible to supply power from controller board. Display maybe?
Thanks Mike and all for the comments!!!
I used an old USB connector, soldered to the Arduino board and connected to my W-Fi router (it has a couple of USB ports to share external storage)
I couldn’t found how to source 5v from the Daikin control pad
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
Thank you Mike, from the comfort of my bed in Canberra’s cold mornings I can now fire-up the Daikin split system!
Mine is similar but older model of the pictured thermostat. I used speaker wire for the connection to the board.
I am also using a Sonoff 4 channel WiFi Pro controller with an RF remote that now gives me three ways to switch the aircon on or off.
It would be nice if the eWeLink program could provide visual feedback once triggered.
You’re welcome. Have a look at flashing the sonoff with Tasmota firmware, then wiring a gpio pin to read the state. Cheers Mike 🙂
Hi
I want to buy this. In plug and play form. For converting daikin brc1d52 to smart controller via iOS app.
Hi,
I was implementing smart control in Daikin A/C for Arduino and Xiaomi Smart Home. When I opened Daikin I also found “P1 &P2” connectors… I expected to found voltage switch control, WTF! Then I arrived at your web. You are really skill guys. I haven’t so much time for this implementation.
For other guys in case interested, I have installed a controlled relay directly in power cable of A/C equipment. It isn’t so fancy and elegant like your solution but it took me only 30 minutes to implement it. So I’m controlling A/C just removing or applying power supply to main unit.
Hi,
I started hacking the Daikin remote control(model BRC1E631) by using the same idea several months ago but failed and gave up on this, then I read about this article days ago and started the journey again and finished the job just now.
For those who still wanna do this about your Daikin wired control panel, Here is my solution:
1. It needs 4 wires out from the panel, one piece of ESP01s, one LDO(3.3V); No need for any relay, for what I thought, the relay may increase the power consumption.
2. There are 5v DC supply on the back of this panel, connect vcc and gnd to a LDO for the power supply for the ESP8266
3. Connect one side of the “ON/OFF” button to the RX pin, and use it as OUTPUT to control the panel. Write it LOW and then HIGH to simulate the “Push” action.
4. Connect One side of the LED to GPIO-2 pin, and use it as INPUT to read state of the AC. LOW for On and HIGH for Off.
5. Program the ESP8266 and Use MQTT to integrate it to the HASS.