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:

Re: Daikin Cloud Controller - BRP069C4

Post by ksacca »

If the first device (Unit 0 in the daikin cloud) contains a space, then it’s likely the entire loop in the code crashes because it tries to write a variable with a space (which is not allowed and I didn’t take this into account when testing). This means that those devices will never be created or updated.

Still have to find a good way to publish fixes instead of the code on pastebin.
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Daikin Cloud Controller - BRP069C4

Post by waltervl »

ksacca wrote: Friday 30 December 2022 18:57Still have to find a good way to publish fixes instead of the code on pastebin.
Perhaps GitHub can be used for this? A perfect tool to maintain and distribute software sources.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
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 »

hi Waltervl,

I already looked into node red projects (https://nodered.org/docs/user-guide/projects/) so you can treat a flow as a real project and commit changes to GitHub. The downside seems that you need a dedicated instance of node red as you can only have one project active (and no other flows either). I wasn’t able to link it to my GitHub repo, but I should indeed look into this again. I just wasn’t sure if there are a lot of daikin users that have domoticz and if it was worth it. I’m sure everyone would like a real plug-in, but for now that is beyond my skills. I’ll see if I can just put the entire flow on GitHub in plain text for now.
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 »

ksacca wrote: Friday 30 December 2022 14:33
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.

Hi,

Took the easy way and replaced the spaces in the unit name for an underscore :-). Restarted the flow and things started to run. Takes a while before temperature shows up in domoticz. kWH devices are not visible yet. But I think they wil show when values are changing.
I can see they are discovered in the log file of Domoticz.

Only one error still left in the debug window :

2-1-2023 16:03:04node: Read Devices
function : (error)
"TypeError: Cannot read properties of undefined (reading 'value')"

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 »

Ok, so the issue was indeed spaces in the name. This should be fixed with the code in the previous post, so I'll take this into account.
The kwh devices are indeed only created when there's an update (which is once per day for my unit, as the report a daily usage of 0,1 kwh).

For the next error, I suppose one of your devices doesn't support something that is being read out of the cloud. Since I only tested on 3 different devices, there's always a possibility some devices behave differently. If I get an example of the data I could always fix this.

For now, could you press the arrow next to the debug window button, go to "Context Data" and hit refresh next the flow variables.
Do you see any variable that has a value of "undefined"? If yes, could you tell me which one? If this feature is not supported by all devices, I know I'll have to do some extra checks.

PS: I was able to get node red projects to work, so I can push changes immediately to github from within nodered. I'm still testing, but for now the data is already available on https://github.com/ksacca/daikincloud-domoticz, which includes both fixes made after discussions in this topic. I still have to see what's the best way to install a flow directly from a project hosted on github.
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 »

ksacca wrote: Monday 02 January 2023 18:24 Ok, so the issue was indeed spaces in the name. This should be fixed with the code in the previous post, so I'll take this into account.
The kwh devices are indeed only created when there's an update (which is once per day for my unit, as the report a daily usage of 0,1 kwh).

For the next error, I suppose one of your devices doesn't support something that is being read out of the cloud. Since I only tested on 3 different devices, there's always a possibility some devices behave differently. If I get an example of the data I could always fix this.

For now, could you press the arrow next to the debug window button, go to "Context Data" and hit refresh next the flow variables.
Do you see any variable that has a value of "undefined"? If yes, could you tell me which one? If this feature is not supported by all devices, I know I'll have to do some extra checks.

PS: I was able to get node red projects to work, so I can push changes immediately to github from within nodered. I'm still testing, but for now the data is already available on https://github.com/ksacca/daikincloud-domoticz, which includes both fixes made after discussions in this topic. I still have to see what's the best way to install a flow directly from a project hosted on github.
Hi,

In the debug window there is no flow variable with "undefined".

How can I get an example of the data from my Daikin devices (the data you asked for) ? I have one (floorunit, FVXM-25A) which differs from te rest (FTXM).

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 »

You should be able to get the daikin output using a debug node. You should have enough info with my post on the previous page (see viewtopic.php?p=293296#p293296). There you will also find a screenshot for the context data (it is not in the debug part).

But if you have a floor model (which is untested), it could be some sensors are different. Can you switch it on/off and change the modem with the current 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 »

ksacca wrote: Tuesday 03 January 2023 19:29 You should be able to get the daikin output using a debug node. You should have enough info with my post on the previous page (see viewtopic.php?p=293296#p293296). There you will also find a screenshot for the context data (it is not in the debug part).

But if you have a floor model (which is untested), it could be some sensors are different. Can you switch it on/off and change the modem with the current flow?
Hi,

I created the debug node. Can see the data, what do you exactly need to se where the error comes from ?
Floorunit responses correctly on given commands from within Domoticz. So no problem there. So only one error left (as previous mentioned) in the flow.

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: Wednesday 04 January 2023 9:28
Hi,

I created the debug node. Can see the data, what do you exactly need to se where the error comes from ?
Floorunit responses correctly on given commands from within Domoticz. So no problem there. So only one error left (as previous mentioned) in the flow.

Regards,

Henk
Each item we check for (On/Off, mode, setpoint, indoor & outdoor temp, kwh, ...) has a specific place in the json payload we receive from daikin.

For example, the on off info is found under msg.payload[unitnumber].managementPoints.climateControl.onOffMode.value and for temperature in msg.payload[unitnumber].managementPoints.climateControl.sensoryData["/roomTemperature"].value. You can go through all this info when you expand the debug message to see all your unit details. In the code of read message, you can see what datapoint I check for each type of switch/sensor created in domoticz.

If this datapoint is different for your model, the data will not be found and will be "undefined". In the debug window you should have a "copy value" button next to the debug message.
debug.png
debug.png (3.81 KiB) Viewed 4472 times
It would be nice if you could paste this information in a txt file and send me a private message with this information in attachment. With this info, I can see if the issue comes from the data received from the cloud and try to fix it for you! You can of course troubleshoot it yourself if you want, but I don't know your knowledge level of node red or javascript ;-)

Edit: could you also let me know the name of your units, and which one is the floor model where we suppose the problem occurs?
mgugu
Posts: 218
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 »

Hi @ksacca thank you for this code with efficient AD automation..
I have also been obliged to switch to cloud version for my new Daikin units since local API is not working anymore unfortunately.
Some minor remarks:
1-Login with password is not working for me (captcha required), so I used the MITL proxy trick described at https://github.com/Apollon77/daikin-con ... n/PROXY.md to retrieve a token instead (not really easy).
2-Looks like the context variable "StateSetPrefix" is not taken into account, so that only works for default value "daikin". In the modules "Set Devices", "Read Devices" and "Read kWh", in all definition or reference to state topic, I replaced "daikin" by flow.get("StateSetPrefix")
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 »

ksacca wrote: Monday 12 December 2022 12:51
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?
Working great, Thanks!
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 »

mgugu wrote: Friday 06 January 2023 15:25 Hi @ksacca thank you for this code with efficient AD automation..
I have also been obliged to switch to cloud version for my new Daikin units since local API is not working anymore unfortunately.
Some minor remarks:
1-Login with password is not working for me (captcha required), so I used the MITL proxy trick described at https://github.com/Apollon77/daikin-con ... n/PROXY.md to retrieve a token instead (not really easy).
2-Looks like the context variable "StateSetPrefix" is not taken into account, so that only works for default value "daikin". In the modules "Set Devices", "Read Devices" and "Read kWh", in all definition or reference to state topic, I replaced "daikin" by flow.get("StateSetPrefix")
Hi mgugu. While checking for the issue visvier reported, I also noticed that the prefix is not taken into account everywhere. I will modify this as soon as I have some time and I'll try to publish it on https://github.com/ksacca/daikincloud-domoticz and I'll let you know something on the forum.
I'm working on supporting floor units, which don't have the horizontal swing, but do have a special vertical swing heating mode (blowing hot air from the bottom of the unit).

I'm not really familiar with the login system as I simply reused an existing node. I hope it will keep working as is in the future.
But if you ever find a better solution, feel free to let me know and I'll look into it. I actually just created the flow for myself as I have 3 new units that only support cloud (and wanted to automate heating in one room where there's no regular central heating). Since these units are also used in the room of my children, they need to turn off when they open their window.
S10NL wrote: Friday 06 January 2023 17:30 Working great, Thanks!
Great to hear, I already included this on github.
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 »

mgugu wrote: Friday 06 January 2023 15:25 2-Looks like the context variable "StateSetPrefix" is not taken into account, so that only works for default value "daikin". In the modules "Set Devices", "Read Devices" and "Read kWh", in all definition or reference to state topic, I replaced "daikin" by flow.get("StateSetPrefix")
Thanks again for reporting. I pushed a fix to https://github.com/ksacca/daikincloud-domoticz. Since you changed it manually, you should also check "Set Devices", "Create Devices", "Read Devices" and "Read Kwh" as I noticed they contained the same issue.
mgugu
Posts: 218
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 »

ksacca wrote: Saturday 07 January 2023 13:53 Thanks again for reporting. I pushed a fix to https://github.com/ksacca/daikincloud-domoticz. Since you changed it manually, you should also check "Set Devices", "Create Devices", "Read Devices" and "Read Kwh" as I noticed they contained the same issue.
Hi @ksacca,
Of course I modified also "Create Devices" to make it working.
I also added a new feature (may il exists already but did not found) to speedup new domoticz instance synchronization.
It consists of a button (event + function) which resets "unitCount" in order to restart discovery, and setTimeout variable Allowing duplicates during 60s.
Concerning the kWh reading, I have the impression that the values are elaborated locally since for each installation the counters are reset.
Am I wrong ? I did not enter in the details of the code (I imagine the huge work to elaborate that from the very un-formatted Daikin data !)
A long time ago I wrote a similar module based on nodeJs and for power reading I used the (2-years)data stored in the units.
I provided only few values: today, yesterday, month, yearCool, yearHot without distinction of units.
For my usage it was completely sufficient.
Thank you again for this great code.
mgugu
Posts: 218
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 »

Hi @ksacca,
Coming back to the consumption question, the provided values do not correspond in my case to what is reported by Daikin app.
So I looked closer at your code and Daikin data and I have new questions/remarks ;)
- You use only cooling.d and heating.d (daily data). Why not using also .w (week) and .m (month) ?
- in the expression "x.reduce(function(a, b){return a + b*10;}, 0)" 2 questions :
-- Why b is multiplied by 10 ?
-- You performa an array.reduce on the complete daily array but that corresponds in fact to current day + previous day (extended version). In fact the array contains 24 values, 1 value for 2 hours, so the 12 first values concern the previous day and the last ones, the current day. The same logic applies for .w and .m arrays
After looking the values given by Daikin app, it seems that these assumptions are correct but I am writing a test module to be sure.
Regards
mgugu
Posts: 218
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 »

Hi @ksacca,
Here is my test module for Daikin consumption which provides detailed and synthetic values:

Installation:
2023-01-09 09_44_08-Node-RED _ 192.168.1.116.png
2023-01-09 09_44_08-Node-RED _ 192.168.1.116.png (29.67 KiB) Viewed 4396 times
Code:

Code: Select all

// Test module for Daikin consumption
const details = true;
const msg1 = {}; msg1.payload = {};
let yesterdayTotalKWH, todayTotalKWH, lastWeekTotalKWH, currentWeekTotalKWH, lastYearCoolTotalKWH, lastYearHeatTotalKWH, currentYearCoolTotalKWH,
    lastMonthTotalKWH, currentMonthTotalKWH, currentYearHeatTotalKWH;
yesterdayTotalKWH = todayTotalKWH = lastWeekTotalKWH = currentWeekTotalKWH = lastYearCoolTotalKWH =
    lastYearHeatTotalKWH = currentYearCoolTotalKWH = currentYearHeatTotalKWH = lastMonthTotalKWH = currentMonthTotalKWH = 0;
for (let i = 0; i < msg.payload.length; i++) {
    const unitname = flow.get("NameUnit" + i);
    msg1.payload[unitname] = {};
    let CoolKWHarraym = msg.payload[i].managementPoints.climateControl.consumptionData["/electrical"].cooling.m;
    let HeatKWHarraym = msg.payload[i].managementPoints.climateControl.consumptionData["/electrical"].heating.m;
    let CoolKWHarrayw = msg.payload[i].managementPoints.climateControl.consumptionData["/electrical"].cooling.w;
    let HeatKWHarrayw = msg.payload[i].managementPoints.climateControl.consumptionData["/electrical"].heating.w;
    let CoolKWHarrayd = msg.payload[i].managementPoints.climateControl.consumptionData["/electrical"].cooling.d;
    let HeatKWHarrayd = msg.payload[i].managementPoints.climateControl.consumptionData["/electrical"].heating.d;
    
    let lastYearCoolKWH = CoolKWHarraym.slice(0, 12).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["lastYearCoolKWH"] = lastYearCoolKWH.toFixed(2);
    lastYearCoolTotalKWH += lastYearCoolKWH;
    let lastYearHeatKWH = HeatKWHarraym.slice(0, 12).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["lastYearHeatKWH"] = lastYearHeatKWH.toFixed(2);
    lastYearHeatTotalKWH+= lastYearHeatKWH;    
    
    let currentYearCoolKWH = CoolKWHarraym.slice(12, 24).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["currentYearCoolKWH"] = currentYearCoolKWH.toFixed(2);
    currentYearCoolTotalKWH += currentYearCoolKWH;
    let currentYearHeatKWH = HeatKWHarraym.slice(12, 24).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["currentYearHeatKWH"] = currentYearHeatKWH.toFixed(2);
    currentYearHeatTotalKWH += currentYearHeatKWH;    

    const d = new Date();
    const month = d.getMonth();
    let lastMonthMonthHeatKWH = HeatKWHarraym[month];
    if (details) msg1.payload[unitname]["lastMonthMonthHeatKWH"] = lastMonthMonthHeatKWH.toFixed(2);
    let lastMonthMonthCoolKWH = CoolKWHarraym[month];
    if (details) msg1.payload[unitname]["lastMonthMonthCoolKWH"] = lastMonthMonthCoolKWH.toFixed(2);
    lastMonthTotalKWH += lastMonthMonthHeatKWH + lastMonthMonthCoolKWH;
    
    let currentMonthMonthHeatKWH = HeatKWHarraym[month + 12];
    if (details) msg1.payload[unitname]["currentMonthMonthHeatKWH"] = currentMonthMonthHeatKWH.toFixed(2);
    let currentMonthMonthCoolKWH = CoolKWHarraym[month + 12];
    if (details) msg1.payload[unitname]["currentMonthMonthCoolKWH"] = currentMonthMonthCoolKWH.toFixed(2);
    currentMonthTotalKWH += currentMonthMonthHeatKWH + currentMonthMonthCoolKWH;
    
    let lastWeekCoolKWH = CoolKWHarrayw.slice(0, 7).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["lastWeekCoolKWH"] = lastWeekCoolKWH.toFixed(2);
    let lastWeekHeatKWH = HeatKWHarrayw.slice(0, 7).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["lastWeekHeatKWH"] = lastWeekHeatKWH.toFixed(2);
    lastWeekTotalKWH += lastWeekCoolKWH + lastWeekHeatKWH
    
    let currentWeekCoolKWH = CoolKWHarrayw.slice(7, 14).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["currentWeekCoolKWH"] = currentWeekCoolKWH.toFixed(2);
    let currentWeekHeatKWH = HeatKWHarrayw.slice(7, 14).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["currentWeekHeatKWH"] = currentWeekHeatKWH.toFixed(2);
    currentWeekTotalKWH += currentWeekCoolKWH + currentWeekHeatKWH
    
    let yesterdayCoolKWH = CoolKWHarrayd.slice(0, 12).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["yesterdayCoolKWH"] = yesterdayCoolKWH.toFixed(2);
    let yesterdayHeatKWH = HeatKWHarrayd.slice(0, 12).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["yesterdayHeatKWH"] = yesterdayHeatKWH.toFixed(2);
    yesterdayTotalKWH += yesterdayCoolKWH + yesterdayHeatKWH
    
    let todayColdKWH = CoolKWHarrayd.slice(12, 24).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["todayColdKWH"] = todayColdKWH.toFixed(2);
    let todayHeatKWH = HeatKWHarrayd.slice(12, 24).reduce(function (a, b) { return a + b; }, 0);
    if (details) msg1.payload[unitname]["todayHeatKWH"] = todayHeatKWH.toFixed(2);
    todayTotalKWH += todayColdKWH + todayHeatKWH
}  
msg1.payload.total = {
    "yesterdayTotalKWH": yesterdayTotalKWH.toFixed(2), "todayTotalKWH": todayTotalKWH.toFixed(2), "lastWeekTotalKWH": lastWeekTotalKWH.toFixed(2),
    "currentWeekTotalKWH": currentWeekTotalKWH.toFixed(2), "lastYearCoolTotalKWH": lastYearCoolTotalKWH.toFixed(2), "lastYearHeatTotalKWH": lastYearHeatTotalKWH.toFixed(2),
    "currentYearCoolTotalKWH": currentYearCoolTotalKWH.toFixed(2), "currentYearHeatTotalKWH": currentYearHeatTotalKWH.toFixed(2),
    "lastMonthTotalKWH": lastMonthTotalKWH.toFixed(2),"currentMonthTotalKWH": currentMonthTotalKWH.toFixed(2)
    }
return msg1;
The results fit perfectly with what is reported in Onecta app
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 »

Sorry for my late reply but I was troubleshooting another domoticz issue with blinds for another topic on this forum :).

I must admit that I had (and still have) very little knowledge on the domoticz counters.
The counter that is created needs to get the total value. It is not an incremental counter where you only send the difference.

Since Daikin reports the daily/weekly/monthly/yearly usage I needed to see what I could use.
The yearly usage would be perfect, but it only stores the last 2 years of data. Since I need the total, this value would change on each January 1st.
So what I did was take the total daily usage on the first run (which is 2 days of data actually) and use this as our baseline (zero value).
If the counter increases, then we have new usage to report. If it decreases, this means we started another day and we need to reset the counter.

Since the counter is not incremental and needs a total value, the daily and total usages are stored in a file (write file under read kwh).
By doing this, the values are only updated (and written to the filesystem) when there's a change. We then send the current total + new usage to domoticz.

Anyway, thanks for your proposition. I'll have a look at it asap and see if we can use this instead. The code for the other changes (dynamic creation of mode, fanmode and fanspeed based on the available values instead of being static) is working in a test node, but now I just need to add it where necessary. Once this is done, I'll look into improving the energy readings.
mgugu
Posts: 218
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 »

obreherrero wrote: Sunday 15 January 2023 18:09 Hello, first of all congratulations for the work done.

I have a question, the Daikin Cloud node gives me an authentication error. Should I enter the email and password of the Onecta app?

I have all the steps and they work for me, except for that node, I enter my Onecta Daikin username and password but it doesn't work for me.

Thanks in advance.
What is the status message displayed by Daikin node ?
mgugu
Posts: 218
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 »

The status message is here:
dcloud.png
dcloud.png (6.3 KiB) Viewed 4156 times
In my case I got "captcha required" so I used the workaround described at the developper site.
But If you get TypeError, the error is somewhere else in the javascript code.
mgugu
Posts: 218
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 »

obreherrero wrote: Wednesday 18 January 2023 10:15 There you put the user and pass of onecta or another?

What is the developer's website?

Thanks again.
You have to put ONECTA credentials and you should also enable "save token" checkbox.
Do you get the node status "captcha required" ?
If yes, follow instructions at https://github.com/Apollon77/daikin-controller-cloud
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest