Daikin Onecta (Cloud) Binding [4.0.0.0;5.0.0.0)

Hi T,

I am currently working on this part. I want the data saved in one item. The problem is that the consumption data comes in with a delay and does not match the system time. For example, a final reading of a day’s consumption comes in with a delay of 30 to 45 minutes. if I update the item then it is saved with an incorrect date/time. Now I’m trying to update items in the past so that it gets a correct timestamp. For this, as far as I know, you have to use the API. I have to look at data changes. for example: if the daikins consumption goes to 0, i have to use yesterday’s daikins consumption to adjust the item in the past. This will be a challenge.
In the current version of my binding this does not work properly yet.

Gr Alex

Hi Alex,

I’ve updated the jar and now also the “Fan Swing”-part works perfect for me now.

Thank you so much for this great binding. First time in the last 3 years that I can now include my Daikin AC into my smart home completely :slight_smile:

Mike

Well after some playinng around preliminary tests show that the solution might be easier than it seems: looks like the daily usage data for current day is actually updated on the fly with every change of hourly data, and not only after end of day,. Might be worth looking into it :slight_smile:
And this works the same for the monthly usage data.

Maybe we could simply calculate the usage from monthly data?

not working… i have this error:

 2023-09-02 16:51:58.056 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'Home.sitemap' has errors, therefore ignoring it: [308,59]: no viable alternative at input '“'re

To you use visual Studiocode for eding sitemap file?
There ist an Error in your syntax, maybe.

Dear Alexander,
thank you for this great binding. I am using a MultiSplit system with one outer unit and four internal units of type “Stylish”. (FTXA20-FTXA35).
I have a question concerning the Econo-Mode. I can set this via remote, but the switch channel seems not to work with my system. It neither reads the status correctly (assuming that I switched the Econo-Mode on successfully with the remote), neither seems to send the command correctly. At least, sending an “ON” command to this channel results to the state being on for roughly a minute, afterwards the state is going back to “OFF” by itself.
Could we try to look together whether this can be fixed?

Hi Phillipp,

It also can be just a bug in the binding. I will test this. Can you send me 2 raw data dumps. One when it’s on and one when it’s off. In the binding is a property to dump raw data in logging. With this I can look into it. Send it in a private message.

Gr Alexander

I did a test on my split unit and the econo mode works there. May be the unit you have sends the data differently. so if you send me the raw data I can take a look at it.

Gr Alexander

Hi Alexander,

I got 2 raw data dumps, but unfortunately, they are exactly identical. Therefore, it seems that it is not possible from the unit side to get info and/or change settings.

I will try again another time with more time in between.

Can you send me one dump than I can take a look at it. maybe I can discover differences in data structure as I use it in the binding

Hi Alexander,

thanks for the Binding, I’m very interested and gave it a try today (Tag v6 SNAPSHOT). I’m getting the following error with an Altherma 3 heatpump.

2023-09-12 21:15:34.773 [INFO ] [ecta.internal.api.OnectaSignInClient] - [{"_id":"_xxx_masked_xxx_","id":"_xxx_masked_xxx_","deviceModel":"Altherma","type":"heating-wlan","isCloudConnectionUp":{"settable":false,"value":true},"managementPoints":[{"embeddedId":"gateway","managementPointType":"gateway","managementPointCategory":"secondary","firmwareVersion":{"settable":false,"value":"3.2.5","maxLength":8},"ipAddress":{"settable":false,"value":"10.2.0.6","maxLength":15},"iconId":{"settable":true,"requiresReboot":false,"value":3},"isFirmwareUpdateSupported":{"settable":false,"requiresReboot":false,"value":true},"macAddress":{"settable":false,"value":"xx:xx:xx:xx:xx:xx","maxLength":17},"modelInfo":{"settable":false,"value":"BRP069A78","maxLength":9},"name":{"settable":true,"requiresReboot":false,"value":"Gateway","maxLength":63},"ssid":{"settable":false,"requiresReboot":false,"value":"daikin-ap","maxLength":9},"serialNumber":{"settable":false,"value":"0110523","maxLength":16},"wifiConnectionSSID":{"settable":false,"requiresReboot":false,"value":"luftnetz-iot","maxLength":32},"wifiConnectionStrength":{"settable":false,"requiresReboot":false,"value":-40,"maxValue":0,"minValue":-90,"stepValue":1}},{"embeddedId":"climateControlMainZone","managementPointType":"climateControl","managementPointCategory":"primary","managementPointSubType":"mainZone","consumptionData":{"settable":false,"requiresReboot":false,"ref":"#consumptionData","value":{"electrical":{"heating":{"d":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null],"w":[1,0,0,0,0,1,0,0,0,null,null,null,null,null],"m":[null,null,null,null,null,null,0,0,80,188,314,319,306,275,201,159,79,8,5,18,2,null,null,null]}}}},"controlMode":{"settable":false,"requiresReboot":false,"value":"leavingWaterTemperature","values":["leavingWaterTemperature","externalRoomTemperature","roomTemperature"]},"errorCode":{"settable":false,"requiresReboot":false,"value":"","maxLength":16},"holidayMode":{"settable":true,"requiresReboot":false,"ref":"#holidayMode","value":{"enabled":false,"startDate":"2022-12-24","endDate":"2022-12-26"}},"iconId":{"settable":true,"requiresReboot":false,"value":8},"isHolidayModeActive":{"settable":false,"requiresReboot":false,"value":false},"isInEmergencyState":{"settable":false,"requiresReboot":false,"value":false},"isInErrorState":{"settable":false,"requiresReboot":false,"value":false},"isInInstallerState":{"settable":false,"requiresReboot":false,"value":false},"isInWarningState":{"settable":false,"requiresReboot":false,"value":false},"name":{"settable":true,"requiresReboot":false,"value":"","maxLength":63},"onOffMode":{"settable":true,"requiresReboot":false,"value":"on","values":["off","on"]},"operationMode":{"settable":false,"requiresReboot":false,"value":"heating","values":["heating"]},"sensoryData":{"settable":false,"ref":"#sensoryData","value":{"roomTemperature":{"settable":false,"requiresReboot":false,"value":23.3,"maxValue":127,"minValue":-127,"stepValue":0.1},"outdoorTemperature":{"settable":false,"requiresReboot":false,"value":26,"maxValue":127,"minValue":-127,"stepValue":1},"leavingWaterTemperature":{"settable":false,"requiresReboot":false,"value":24,"maxValue":127,"minValue":-127,"stepValue":1}}},"setpointMode":{"settable":false,"requiresReboot":true,"value":"weatherDependent","values":["fixed","weatherDependent"]},"temperatureControl":{"settable":true,"ref":"#temperatureControl","value":{"operationModes":{"auto":{"setpoints":{"leavingWaterOffset":{"settable":true,"requiresReboot":false,"value":0,"maxValue":10,"minValue":-10,"stepValue":1}}},"heating":{"setpoints":{"leavingWaterOffset":{"settable":true,"requiresReboot":false,"value":0,"maxValue":10,"minValue":-10,"stepValue":1}}},"cooling":{"setpoints":{}}}}}},{"embeddedId":"domesticHotWaterTank","managementPointType":"domesticHotWaterTank","managementPointCategory":"primary","consumptionData":{"settable":false,"requiresReboot":false,"ref":"#consumptionData","value":{"electrical":{"heating":{"d":[0,0,0,0,0,0,3,4,2,0,0,0,0,0,0,0,0,0,3,0,0,4,null,null],"w":[5,6,2,0,4,3,5,9,7,null,null,null,null,null],"m":[null,null,null,null,null,null,57,59,181,163,144,140,146,118,144,148,128,172,198,192,57,null,null,null]}}}},"errorCode":{"settable":false,"requiresReboot":false,"value":"","maxLength":16},"heatupMode":{"settable":false,"requiresReboot":true,"value":"reheatSchedule","values":["reheatOnly","reheatSchedule","scheduleOnly"]},"iconId":{"settable":true,"requiresReboot":false,"value":9},"isHolidayModeActive":{"settable":false,"requiresReboot":false,"value":false},"isInEmergencyState":{"settable":false,"requiresReboot":false,"value":false},"isInErrorState":{"settable":false,"requiresReboot":false,"value":false},"isInInstallerState":{"settable":false,"requiresReboot":false,"value":false},"isInWarningState":{"settable":false,"requiresReboot":false,"value":false},"isPowerfulModeActive":{"settable":false,"requiresReboot":false,"value":false},"name":{"settable":true,"requiresReboot":false,"value":"","maxLength":63},"onOffMode":{"settable":true,"requiresReboot":false,"value":"on","values":["off","on"]},"operationMode":{"settable":false,"value":"heating","values":["heating"]},"powerfulMode":{"settable":true,"requiresReboot":false,"value":"off","values":["off","on"]},"schedule":{"settable":true,"ref":"#schedule","value":{"currentMode":{"settable":false,"value":"heating","values":["heating"]},"modes":{"heating":{"enabled":{"settable":false,"requiresReboot":false,"value":true},"currentSchedule":{"settable":true,"requiresReboot":false,"value":"scheduleHeatingMode1","values":["scheduleHeatingMode1"]},"meta":{"minIntervalBetweenActions":"00:10:00","maxSchedules":1,"maxActionsPerActionPeriod":4,"consecutiveActionsAllowed":true,"actionTypes":{"domesticHotWaterTemperature":{"settable":false,"values":["eco","comfort","turn_off"]}}},"schedules":{"scheduleHeatingMode1":{"settable":true,"name":{"settable":true,"requiresReboot":false,"value":"User defined"},"meta":{"isReadOnly":false,"actionPeriods":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"actions":{}}}}}}},"sensoryData":{"settable":false,"ref":"#sensoryData","value":{"tankTemperature":{"settable":false,"requiresReboot":false,"value":41,"maxValue":127,"minValue":-127,"stepValue":1}}},"setpointMode":{"settable":false,"requiresReboot":false,"value":"fixed","values":["fixed","weatherDependent"]},"temperatureControl":{"settable":true,"ref":"#temperatureControl","value":{"operationModes":{"heating":{"setpoints":{"domesticHotWaterTemperature":{"settable":false,"requiresReboot":false,"value":45,"maxValue":60,"minValue":30,"stepValue":1}}}}}}},{"embeddedId":"indoorUnitHydro","managementPointType":"indoorUnitHydro","managementPointCategory":"secondary","eepromVersion":{"settable":false,"requiresReboot":false,"value":"3608726-14D","maxLength":16},"iconId":{"settable":true,"requiresReboot":false,"value":4},"modelInfo":{"settable":false,"requiresReboot":false,"value":"EHBH04EF6V","maxLength":16},"name":{"settable":true,"requiresReboot":false,"value":"Indoor Hydro Unit","maxLength":63},"softwareVersion":{"settable":false,"requiresReboot":false,"value":"0222","maxLength":16}},{"embeddedId":"outdoorUnit","managementPointType":"outdoorUnit","managementPointCategory":"secondary","iconId":{"settable":true,"requiresReboot":false,"value":5},"name":{"settable":true,"requiresReboot":false,"value":"Outdoor Unit","maxLength":63},"softwareVersion":{"settable":false,"requiresReboot":false,"value":"FFFF","maxLength":16}},{"embeddedId":"userInterface","managementPointType":"userInterface","managementPointCategory":"secondary","dateTime":{"settable":false,"requiresReboot":false,"value":"2023-09-12T13:06:36"},"firmwareVersion":{"settable":false,"requiresReboot":false,"deprecated":"DEPRECATED","value":"7.1.0","maxLength":16},"iconId":{"settable":true,"requiresReboot":false,"value":6},"miconId":{"settable":false,"requiresReboot":false,"value":"20010E07","maxLength":16},"modelInfo":{"settable":false,"requiresReboot":false,"value":"EHBH04EF6V","maxLength":16},"name":{"settable":true,"requiresReboot":false,"value":"User Interface","maxLength":63},"softwareVersion":{"settable":false,"requiresReboot":false,"value":"7.1.0","maxLength":16}}],"embeddedId":"49d78c63-f038-4b9c-89dd-2e84d4c59d80","timestamp":"2023-09-12T19:08:38.543Z"}]
2023-09-12 21:15:34.792 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.lang.NullPointerException: Cannot load from object array because the return value of "org.openhab.binding.onecta.internal.service.DataTransportService.getConsumptionCoolingMonth()" is null
        at org.openhab.binding.onecta.internal.handler.OnectaDeviceHandler.getEnergyCoolingCurrentYear(OnectaDeviceHandler.java:548) ~[?:?]
        at org.openhab.binding.onecta.internal.handler.OnectaDeviceHandler.refreshDevice(OnectaDeviceHandler.java:325) ~[?:?]
        at org.openhab.binding.onecta.internal.handler.OnectaBridgeHandler.pollDevices(OnectaBridgeHandler.java:209) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

What I’m interested in most is the “Powerful Mode”. I already saw it in the JSON dump:

"powerfulMode": {
  "settable": true,
  "requiresReboot": false,
  "value": "off",
  "values": [
    "off",
    "on"
  ]
}

Unfortunately, when I’m implementing an Item Switch for Powerful Mode, nothing happens. There’s also no error or any other log entry when switching.

Let me know if i can help you fixing that.

Kind regards,
dandjo

Hi Dandjo,
The binding breaks because it tries to process the cooling data and this does not exist with your heat pump. I will fix this.
As for the Powerfullmode data is located in the Json that is not yet used and supported. At the moment I am working on making the binding as good as possible for the air conditioners(“climateControl” part of JSON). Powerfulmode is a property of the hot water tank(“domesticHotWaterTank” part of JSON). I’m still trying to figure out what the best solution is for this.

Gr. Alexander

Hi @Alexander_Drent,

thanks for fixing.

Yes, the “Powerful Mode” is a heatpump feature. Would really appreciate if you could just implement this functionality. It’s kinda dealbreaker for the integration of my heatpump in my automation.

My suggestion to solve the mixture of supported properties: what about offering different device types?

One for AC units like onecta:ac-device and one for heatpump units like oncecta:heatpump-device. I think this would be sufficient in the first step to distinguish “property groups” and avoid possible if-else-massacre with supportet and not supported properties.

Greetings,
Daniel

why if i put this code i have this result:

Number:Dimensionless		DaikinACUnit1921681140_IndoorHumidity 		"Umidità Interna [%.1f %%]"		<humidity>

Hi Daniel, first I solve the runtime error, and watertank functions are already on my todo list.
Also my wife has somethings on my todo list :upside_down_face:
When I have the time for this. I’ll let you know.

Gr Alexander

Hi Marco, I don’t know why this is happening. If you Google it you will find more issues with this. Maybe you can create a script with a division by 100

There are some tricks concerning UoM you should know. I just had to learn them, too. If you change from a different data type to Number:Dimensionless the actual existing data will be shown in a confusing way. I had exactly the same result as you have for a humidity item I was playing with some days ago. But you simple have to wait for a new reading and the new data will be formatted correctly. And then also your graphs will be correct, …

Another trick has to do with the unit meta data. For a percentage you have to have a % as a unit meta data. But if you change the data type to Number:Dimensionless and get back from the edit page to the item page and want to add the unit meta data, you might not be able to do this as there is no unit meta data available in the list of known meta data. The list starts with State Description. You have to leave the item page first and then get back to it, to see the unit meta data in that list.

I just tried your binding that look great. However I face this error message :

java.lang.NullPointerException: Cannot load from object array because the return value of "org.openhab.binding.onecta.internal.service.DataTransportService.getConsumptionCoolingMonth()" is null
	at org.openhab.binding.onecta.internal.handler.OnectaDeviceHandler.getEnergyCoolingCurrentYear(OnectaDeviceHandler.java:548) ~[?:?]
	at org.openhab.binding.onecta.internal.handler.OnectaDeviceHandler.refreshDevice(OnectaDeviceHandler.java:325) ~[?:?]
	at org.openhab.binding.onecta.internal.handler.OnectaBridgeHandler.pollDevices(OnectaBridgeHandler.java:209) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

Hi Gael

I know this one :upside_down_face: Iám fixing it now. Your Daikin cannot cool i think ?
Daniel has the same issue.

Iám going to upload a new Jar give me 1h .

Gr Alexander

Correct ! It only heats.

At the top of this page or this link you can find a new Jar. Please let me know if it solved the issue.

(org.openhab.binding.onecta-4.1.0-SNAPSHOT.jar)