Daikin Cloud Controller - BRP069C4

For heating/cooling related questions in Domoticz

Moderator: leecollings

ksacca
Posts: 80
Joined: Thursday 31 May 2018 21:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Daikin Cloud Controller - BRP069C4

Post by ksacca »

Hello Daikin users,

I have one AC unit that works with the old integration(local API). Since my 4 new units were installed, I really missed being able to control them.
I started looking for a solution to have some basic control for my own use. I then decided I would do my best to have a completely dynamic flow that can be used by everyone (at least I hope). I already told about this in another topic.

As I have 5 different units, testing was a disaster since I had to manually create and map dummy devices for each test. Fortunately, the new 2022.1 stable version came to the rescue with the MQTT autodiscovery feature. My flow will go over all devices available in the daikin cloud and will create appropriate devices in domoticz using autodiscovery. I know this is not ideal, but it's something while we wait for native support.

The flow supports:

- Configuration using a dashboard
- Custom discovery and state prefix for mqtt

Devices:
- Support for On/Off mode
- Temperature setpoint (mode dependant)
- Mode Selection (auto, cooling, heating, fanOnly, dry)
- Fan Direction (horizontal, vertical, 3D-swing or off)
- Fan Speed (Level 1 through 5, auto and quiet)
- Powerful mode On/Off toggle
- Econo mode On/Off toggle
- Enable/disable LED
- Indoor temperature reading
- Outdoor temperature reading
- Cooling kWh reading
- Heating kWh reading
- Total kWh reading

Device status is also read from the cloud (every minute), and domoticz is updated if needed. Thanks to the implementation of MQTT autodiscovery, there are no loops as different mqtt topics are used for configuration, state confirmation and setting a device. If node red would ever be offline, the switch state in domoticz would not change as there's no response on the state topic. You can immediately see something is wrong.

If you don't need some devices (because you don't use it like for example econo mode), you can disable them in the dashboard before launch and no devices will be created. The configuration data is stored in 2 files, and another file is used to store the state of the energy (kWh) counters. You can select the file location yourself (so you could put it on a networked device if using a raspberry pi). I only write data to the filesystem if kwh usage changes to avoid too many writes. I store it because domoticz expects the total kwh usage + new usage to be sent, so it has to be stored in nodered in case of a reboot.

When you set a device using domoticz, the information is not immediately available when reading from the cloud. To avoid having a wrong state in domoticz, reading of the cloud is disabled for 2 to 3 minutes. Sensor devices are updated at least once an hour to avoid they are red in domoticz (sensor timeout). This is applicable for setpoints, temperature and kWh devices.

Requirements: A recent node red version (that allows dynamic MQTT subscriptions), node-red-contrib-daikin-cloud,
an updated version of node-red-dashboard, an mqtt broker and one of the latest beta versions (or latest stable) of domoticz.

All my units have the same functionality, so I'm not really sure if some units don't support certain options. This means I'm looking for a few users that would like to test this flow and report any issues before making it available publicly. I would recommend to make a backup of domoticz or to install it on a test system first.

Let me know if you are interested!
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by solarboy »

This is great work. I am considering some Daikin units this summer, if it happens I will certainly be in touch. Very useful to have somewhere to dump excess PV in summer.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
prjames69
Posts: 2
Joined: Saturday 21 May 2022 8:27
Target OS: Linux
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by prjames69 »

Hello!
I'm interested!
I've just had 5 BRP069C4x modules installed and would really like them to work with Domoticz. (they don't with the

I'm using (just recently, because before it was hosted on a Raspberry Pi machine) a Domoticz from Docker on a Synology NAS.
Version of Domoticz is 2022.1, and I also have a Nodered install on another machine, but never used it.

What do I have to do?
Thanks!
boppos
Posts: 3
Joined: Wednesday 09 March 2016 13:14
Target OS: Windows
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by boppos »

I am interested. I have 2 ftxm20n and 1 ftxa35bt. I am dutch cab i help you with testing?
prjames69
Posts: 2
Joined: Saturday 21 May 2022 8:27
Target OS: Linux
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by prjames69 »

Dear Ksacca, I am hightly interested, as stated above I have 5 BRP069C4x modules. How may I help? :D Thank you!

ksacca wrote: Thursday 17 February 2022 19:02 Hello Daikin users,

I have one AC unit that works with the old integration(local API). Since my 4 new units were installed, I really missed being able to control them.
I started looking for a solution to have some basic control for my own use. I then decided I would do my best to have a completely dynamic flow that can be used by everyone (at least I hope). I already told about this in another topic.

As I have 5 different units, testing was a disaster since I had to manually create and map dummy devices for each test. Fortunately, the new 2022.1 stable version came to the rescue with the MQTT autodiscovery feature. My flow will go over all devices available in the daikin cloud and will create appropriate devices in domoticz using autodiscovery. I know this is not ideal, but it's something while we wait for native support.

The flow supports:

- Configuration using a dashboard
- Custom discovery and state prefix for mqtt

Devices:
- Support for On/Off mode
- Temperature setpoint (mode dependant)
- Mode Selection (auto, cooling, heating, fanOnly, dry)
- Fan Direction (horizontal, vertical, 3D-swing or off)
- Fan Speed (Level 1 through 5, auto and quiet)
- Powerful mode On/Off toggle
- Econo mode On/Off toggle
- Enable/disable LED
- Indoor temperature reading
- Outdoor temperature reading
- Cooling kWh reading
- Heating kWh reading
- Total kWh reading

Device status is also read from the cloud (every minute), and domoticz is updated if needed. Thanks to the implementation of MQTT autodiscovery, there are no loops as different mqtt topics are used for configuration, state confirmation and setting a device. If node red would ever be offline, the switch state in domoticz would not change as there's no response on the state topic. You can immediately see something is wrong.

If you don't need some devices (because you don't use it like for example econo mode), you can disable them in the dashboard before launch and no devices will be created. The configuration data is stored in 2 files, and another file is used to store the state of the energy (kWh) counters. You can select the file location yourself (so you could put it on a networked device if using a raspberry pi). I only write data to the filesystem if kwh usage changes to avoid too many writes. I store it because domoticz expects the total kwh usage + new usage to be sent, so it has to be stored in nodered in case of a reboot.

When you set a device using domoticz, the information is not immediately available when reading from the cloud. To avoid having a wrong state in domoticz, reading of the cloud is disabled for 2 to 3 minutes. Sensor devices are updated at least once an hour to avoid they are red in domoticz (sensor timeout). This is applicable for setpoints, temperature and kWh devices.

Requirements: A recent node red version (that allows dynamic MQTT subscriptions), node-red-contrib-daikin-cloud,
an updated version of node-red-dashboard, an mqtt broker and one of the latest beta versions (or latest stable) of domoticz.

All my units have the same functionality, so I'm not really sure if some units don't support certain options. This means I'm looking for a few users that would like to test this flow and report any issues before making it available publicly. I would recommend to make a backup of domoticz or to install it on a test system first.

Let me know if you are interested!
User avatar
djdevil
Posts: 101
Joined: Friday 26 July 2019 18:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by djdevil »

hi I'm interested where can I find the code?

ksacca wrote: Thursday 17 February 2022 19:02 Hello Daikin users,

I have one AC unit that works with the old integration(local API). Since my 4 new units were installed, I really missed being able to control them.
I started looking for a solution to have some basic control for my own use. I then decided I would do my best to have a completely dynamic flow that can be used by everyone (at least I hope). I already told about this in another topic.

As I have 5 different units, testing was a disaster since I had to manually create and map dummy devices for each test. Fortunately, the new 2022.1 stable version came to the rescue with the MQTT autodiscovery feature. My flow will go over all devices available in the daikin cloud and will create appropriate devices in domoticz using autodiscovery. I know this is not ideal, but it's something while we wait for native support.

The flow supports:

- Configuration using a dashboard
- Custom discovery and state prefix for mqtt

Devices:
- Support for On/Off mode
- Temperature setpoint (mode dependant)
- Mode Selection (auto, cooling, heating, fanOnly, dry)
- Fan Direction (horizontal, vertical, 3D-swing or off)
- Fan Speed (Level 1 through 5, auto and quiet)
- Powerful mode On/Off toggle
- Econo mode On/Off toggle
- Enable/disable LED
- Indoor temperature reading
- Outdoor temperature reading
- Cooling kWh reading
- Heating kWh reading
- Total kWh reading

Device status is also read from the cloud (every minute), and domoticz is updated if needed. Thanks to the implementation of MQTT autodiscovery, there are no loops as different mqtt topics are used for configuration, state confirmation and setting a device. If node red would ever be offline, the switch state in domoticz would not change as there's no response on the state topic. You can immediately see something is wrong.

If you don't need some devices (because you don't use it like for example econo mode), you can disable them in the dashboard before launch and no devices will be created. The configuration data is stored in 2 files, and another file is used to store the state of the energy (kWh) counters. You can select the file location yourself (so you could put it on a networked device if using a raspberry pi). I only write data to the filesystem if kwh usage changes to avoid too many writes. I store it because domoticz expects the total kwh usage + new usage to be sent, so it has to be stored in nodered in case of a reboot.

When you set a device using domoticz, the information is not immediately available when reading from the cloud. To avoid having a wrong state in domoticz, reading of the cloud is disabled for 2 to 3 minutes. Sensor devices are updated at least once an hour to avoid they are red in domoticz (sensor timeout). This is applicable for setpoints, temperature and kWh devices.

Requirements: A recent node red version (that allows dynamic MQTT subscriptions), node-red-contrib-daikin-cloud,
an updated version of node-red-dashboard, an mqtt broker and one of the latest beta versions (or latest stable) of domoticz.

All my units have the same functionality, so I'm not really sure if some units don't support certain options. This means I'm looking for a few users that would like to test this flow and report any issues before making it available publicly. I would recommend to make a backup of domoticz or to install it on a test system first.

Let me know if you are interested!
mgugu
Posts: 208
Joined: Friday 04 November 2016 12:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: France
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by mgugu »

Personally I use daikin-controller nodejs to control my units. The glue necessary to communicate with Domoticz is also written in nodejs.
To avoid manually creating all Domoticz hardware and devices, I wrote a nodejs script which does that automatically.
Let me know if you are interested by the code.
DuDo
Posts: 14
Joined: Saturday 18 November 2017 9:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by DuDo »

so how are things

i read in the topic starter a post that seems it already working but where to find it?
ksacca
Posts: 80
Joined: Thursday 31 May 2018 21:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by ksacca »

I’m very sorry, but due to some personal issues I wasn’t able to give a status update or reply to PM’s. My solution is still working fine, and I’ll try to write some instructions later today and post them here.
ksacca
Posts: 80
Joined: Thursday 31 May 2018 21:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by ksacca »

Daikin Cloud Controller instructions:

Requirements:

Your daikin devices set up in the daikin/onecta app.
You will need to have a functioning daikin setup using the daikin onacte app, otherwise your devices will not be accessible through the cloud. The names of the devices you set up in the app will be used to name the devices in domoticz.

A recent domoticz version with MQTT autodiscovery support.
If using an old version of domoticz, you will need to update at least to at least the latest stable release (V2022.1). This node red flow creates and updates devices using MQTT autodiscovery. If you go to the hardware page of your domoticz and can select “MQTT Auto Discovery Client Gateway with LAN interface”, you should be fine.

A working MQTT broker
You will probably already use this, but if not you can always refer to the domoticz wiki page: https://www.domoticz.com/wiki/MQTT

A working Node Red installation, version 2.1.0 or greater
Install node red (for raspberry pi, use instructions at https://nodered.org/docs/getting-started/raspberrypi). You nead at least version 2.1.0 of node red as this is the version where dynamic mqtt subscriptions were introduced. This is used to have custom discovery topics.

Daikin cloud and node red dashboard
I used the daikin cloud integration ( https://flows.nodered.org/node/node-red ... ikin-cloud) to communicate with the daikin cloud, and node red dashboard to have a visual interface for the setup (https://flows.nodered.org/node/node-red-dashboard). As those are not included in node red, you will have to install this separately.
In node red, go to “manage palette” and switch to the “install” tab. Search for each node and click on the install button.


Getting the flow to work:
  1. Open up node red, open the menu ad select Import
  2. Paste this flow in the new window and click import: https://pastebin.com/PqW2rpMY (Posted on postebin as it was too long to post here).
  3. Double click the “Configuration File” node. You will need to setup a location to store the configuration files (for domoticz, for mqtt autodiscovery and to store the power usage). Make sure node red can access this location. If this is done, you can click the deploy button. If the folder didn’t exist yet, it should now (hopefully) have been created. If you use node red in docker, make sure node red has access to the folder (by either using the nodered folder, or by adding a bind in your container settings).
  4. At the top of the flow you will see a start button (inject node). Click on the little square. This will start a part of the flow so you configuration files are created.
  5. Press CTRL+Shift+D to open the dashboard and fill in the general settings. If your mqtt broker is on the same machine, you can enter 127.0.0.1 as IP. The port number is 1883 if you didn’t change it. If you don’t need authentication for your mqtt broker, just leave the username and password empty. You can now set the discovery and state set prefix/topic. For the autodiscovery prefix, use daikinAD, and for the state simply enter daikin (feel free to change this if you know what you are doing). Do not enable start flow yet, and click on “Save Settings”.
  6. On the same page, you can set up which devices should be created. If you don’t plan to use the econo function for example, do not check the box and this device will not be created. Don’t forget to save the settings here as well (it’s a separate save button).
  7. Go back to node red and double click the “Daikin Cloud” node. Enter your daikin username and password and make sure the save token option is disabled. Click on Deploy. Note: you can only login with a username (which should be your e-mail) and password. Facebook login is not supported. If using facebook login, you should create a daikin account using a regular username.
  8. Go back to the settings dashboard (CTRL+SHIFT+D) and enable “start flow”. Click on Save settings.
  9. Now it is time to set up domoticz. Go to setup -> hardware and add a new line for your daikin AC’s. Give it a name (Daikin) and select the hardware type (MQTT Auto Discovery Client Gateway with LAN interface). Set the IP and port of your mqtt browser (and username and password if required). The autodiscovery prefix should be the one you set in the node red dashboard in Auto Discovery Prefix (daikinAD if you followed the example).
    In the log you should now see domoticz discovered your devices. It can take a few minutes for them to appear in your domoticz. For the kwh devices, those will only be available in domoticz once daikin reports a power change (which can take an entire day if your AC is not in use).
It is possible your devices (like current mode, fanspeed, ...) are not updated to the correct status at first. This is because the current status is stored in a variable inside node red, so devices don't get updated if their status doesn't change. The easiest way to fix this, is to restart node red. This will clear variables and update devices in domoticz. Again, this is only needed the very first time, right after configuring the flow.

Warning: I’m not a developer/programmer. This flow was created for my own use. Use at your own risk. I’m sure a lot of code or parts of this flow could be improved. I advise to test it on a test system first. If you have ideas on how to improve this, feel free to leave a comment.
PietjePuck
Posts: 20
Joined: Monday 16 March 2020 15:51
Target OS: -
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by PietjePuck »

Thank you for all the effort of developping this.
If have issues reading the indoor_temp and outdoor_temp on the Stylish units (Perferra is working fine)

Any idea how to debug / fix this ?
ksacca
Posts: 80
Joined: Thursday 31 May 2018 21:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by ksacca »

As there was no feedback, I wasn't sure someone successfully configured this flow. Glad to hear it works (even partially).
I have 3 perfera and 2 emura units , so it was indeed never tested with a stylish unit.

You can add a "debug" node right after the daikin cloud node (and connect them together of course) as seen in the image. Don't forget to deploy the changes.
nodereddaikin.png
nodereddaikin.png (80.86 KiB) Viewed 7291 times
Once the script retrieves the data from the cloud, you should be able to see an array in the debug window.

In the array, you will see a number for each unit. If you don't know which is which, you can find the name and number in the context data as shown below. You might have to click on the refresh button in the flow variables to load them.
nodereddaikin1.png
nodereddaikin1.png (14.88 KiB) Viewed 7291 times
For all my units, the temperature is found in payload[x].managementPoints.climateControl.sensoryData["/roomTemperature"].value for indoor temperature and payload[x].managementPoints.climateControl.sensoryData["/outdoorTemperature"].value for outdoor temperature. Could you check if this is available for you, and if not, tell me where it is located in your case?
PietjePuck
Posts: 20
Joined: Monday 16 March 2020 15:51
Target OS: -
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by PietjePuck »

Sorry for the delay.
I implemented the debug and is see a value for indoor temp : daikin/sensor/indoor_temp/Woonkamer/state "22" and daikin/sensor/outdoor_temp/Woonkamer/state "14"


When i look in the app the indoor temp is 18 and the outdoor is 14 so it looks like the value for indoor is invalid.

When i use the url local (/aircon/get_sensor_info)
The result gives the same temp as in the app
ret=OK,htemp=18.0,hhum=65,otemp=15.0,err=0,cmpfreq=0
PietjePuck
Posts: 20
Joined: Monday 16 March 2020 15:51
Target OS: -
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by PietjePuck »

What is the interval the script runs ?
It seems the value is also not updated the last half hour
PietjePuck
Posts: 20
Joined: Monday 16 March 2020 15:51
Target OS: -
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by PietjePuck »

And when i delete the outdoor temp value in the debug window, remove debugging and the add debugging again the value of outdoor for slaapkamer is added correctly and the value for woonkamer remains 0
daikin/sensor/indoor_temp/Slaapkamer/state
"21"
daikin/sensor/kwh_cool/Slaapkamer/state
"0.0"
S10NL
Posts: 12
Joined: Sunday 23 February 2020 19:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by S10NL »

Hi everybody,

i have everything working well. Everything syncs accordingly but i can't change the setpoint from within domoticz.
Is there something i missed?
ksacca
Posts: 80
Joined: Thursday 31 May 2018 21:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by ksacca »

S10NL wrote: Sunday 11 December 2022 14:20 Hi everybody,

i have everything working well. Everything syncs accordingly but i can't change the setpoint from within domoticz.
Is there something i missed?
You are right indeed, something must have changed as this used to work correctly (daikin accepted a string for the setpoint).
If you open the node red flow and double click on the function "Set Devices", could you replace the code on line 56

from

Code: Select all

daikinmsg.payload.value = Number(msg.payload).toFixed(1)
to

Code: Select all

daikinmsg.payload.value = Math.round(Number(msg.payload) / 0.5) * 0.5 
and see if it works after you redeploy the flow?
visvier
Posts: 10
Joined: Thursday 29 December 2022 15:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by visvier »

Hi,

I receive the following errors from the script :

- 29-12-2022 15:04:39node: Read Devices
function : (error)
"Error: Invalid property expression: unexpected ' ' at position 32

- 29-12-2022 15:04:39node: Read kWh
function : (error)
"Error: Invalid property expression: unexpected ' ' at position 6"

On top of that it seems that changing the values within my Onecta app does not affect the status in Domoticz. The other way around works fine.
And not all the devices show in Domoticz, the kWh and temp devices are all missing.

Any clue ?

regards,

Henk
ksacca
Posts: 80
Joined: Thursday 31 May 2018 21:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by ksacca »

visvier wrote: Thursday 29 December 2022 15:20 Hi,

I receive the following errors from the script :

- 29-12-2022 15:04:39node: Read Devices
function : (error)
"Error: Invalid property expression: unexpected ' ' at position 32

- 29-12-2022 15:04:39node: Read kWh
function : (error)
"Error: Invalid property expression: unexpected ' ' at position 6"

On top of that it seems that changing the values within my Onecta app does not affect the status in Domoticz. The other way around works fine.
And not all the devices show in Domoticz, the kWh and temp devices are all missing.

Any clue ?

regards,

Henk
Hi Henk,

Could it be there are spaces in the names of your units? It looks like the error suggest there's a space somewhere, so I suppose it might be the name.
I honestly never tested this as I don't have any units with spaces in the name. Thanks for letting me know, so I can look for a fix.

EDIT: I created a testflow, and the issue is probably due to a space in the name of your device (but I will wait for your confirmation).
There is a function node called "Set Unit Data". Can you test if it works when you replace line 8:

Code: Select all

flow.set("NameUnit"+i,msg.payload[i].managementPoints.climateControl.name.value)
with

Code: Select all

flow.set("NameUnit"+i,msg.payload[i].managementPoints.climateControl.name.value.split(' ').join('_'))
This should replace spaces in the name with an underscore, which should solve this issue. The problem is that for Read Devices and Kwh, the name of the device is used in a variable, and it can't contain spaces (but it used to work according to https://discourse.nodered.org/t/how-to- ... s/14576/21). I would advise to completely restart the flow after the change.

This is also the reason why the devices are not created for kwh and temperature and that some devices are not being updated.
Not all functions use the name in the variable, so they will probably update correctly.
visvier
Posts: 10
Joined: Thursday 29 December 2022 15:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by visvier »

Hi,

Some of the (5) unit names have a space, but two of them have not. They don't show kWh and temperature also.
I will trie your solution and come back to that.

Regards,

Henk
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest