Here is a bash script with 2 lua scripts to intergrade the Daikin Heat Pumps/Airconditioners with the Wi-Fi Online Controller Daikin BRP069Axx
Only heating is supported as of now, if I have some more time I will also make cooling functions, but I am waiting for an heat/cool/off button.
Before it is 30C in the Netherlands cooling will be supported
This script will not work on Windows, but should be working on all linux systems. I use it on raspberry pi.
Installation instructions are for Raspberry Pi:
For this script to run, you need to install Curl and JQ.
SSH into your pi and:
first we install curl:
Then we need JQ, as there is no binary for the pi, we need to build it ourselfs, no worry, thanks to the wiki we know how to:
(Taken from the Mindergas.nl wikipage)
Install the tools so you can build yourself:
Code: Select all
sudo apt-get install flex -y
sudo apt-get install bison -y
sudo apt-get install gcc -y
sudo apt-get install make -y
sudo apt-get install autotools -y
Now we are going to build JQ
Code: Select all
curl -O http://stedolan.github.io/jq/download/source/jq-1.4.tar.gz
tar xfvz jq-1.4.tar.gz
cd jq-1.4
./configure
make
sudo make install
this will make jq and take some time, on my raspberry pi 2 it took only a few minutes, but on a pi 1 it could take (much) longer. Be patient.
Copy jq to /usr/bin
Now download the zip file and extract the 3 scripts.
Put daikin.sh in /home/pi/domoticz/scipts
then make it executable
Code: Select all
sudo chmod +x /home/pi/domoticz/scipts/daikin.sh
put the lua scripts in /home/pi/domoticz/scipts/lua
No open domoticz in your webbrowser, go to setup and then hardware.
We are going to make a new Dummy device, make sure enabled is on.
Name: Daikin
Type: Dummy (Does nothing, use for virtual switches only)
press Add
You will have the new hardware called Daikin in your list. Now click create virtual sensors behind your newly created hardware.
From the dropdownlist choose Thermostat Setpoint and click add.
Create another virtual sensor and select switch.
Now go to setup-> devices sort the list descending on IDX, you will see the newly created sensors in the top of the list. Note down the IDX number of both, you will need them later on.
On the right side of the new sensors you will see a blue green arrow, click them so the become blue, the devices will now be visible on the tabs in Domoticz.
Find the temperature device in "utility" and give it the name "DaikinTemp" (if you want another name, you need to also change the Lua script)
Find the on off device in switches and name it "DaikinHeat"
Now in your ssh session type
Code: Select all
sudo nano /home/pi/domoticz/scipts/daikin.sh
and change the settings:
Code: Select all
# Daikin IP Adress
DIP=192.168.1.xx #Put the ip adress of your Daikin wifi controller here
# Domoticz port
DomPort=8080 #If domoticz is running on a different port then change it here
# On/Off button idx
OoIdx=xx # The IDX of your DaikinHeat on of switch
# Temp idx
TempIdx=xx # The IDX of your DaikinTemp Virtual Thermostat
save the file (ctrl x and then yes)
Now we need to make domoticz check the daikin to see if it has been operated with the remote or daikin app and mirror these changes in domoticz.
scroll to the bottom and add this line:
Code: Select all
*/1 * * * * /home/pi/domoticz/scripts/daikin.sh check &
This will check the state of the daikin every minute, if you want it less frequent you can change the 1 (after */) in the number of minutes you want to check.
Thats it, now you can have fun, schedule, make blockly thingies etc...
Let me know if it helped you, or if you have other great ideas.