Daikin Onecta (Cloud) Binding [4.0.0.0;5.0.0.0)

Hello, first start the bridge and the units should be found in de inbox where you can include them. Maybe switch to offline and online.
Are the units registered in Onecta app?
Gr Alexander

The bridge is online…but nothing in the inbox…Reboot of the openhab Container maybe help?

Is there any logging?

found this:

2023-07-19 16:19:32.550 [INFO ] [ecta.internal.api.OnectaSignInClient] - Start logon
2023-07-19 16:19:32.824 [INFO ] [ecta.internal.api.OnectaSignInClient] - Create client Secret
2023-07-19 16:19:33.197 [INFO ] [ecta.internal.api.OnectaSignInClient] - Get csrf-cookies
2023-07-19 16:19:33.197 [INFO ] [ecta.internal.api.OnectaSignInClient] - Call forward-url
2023-07-19 16:19:33.463 [INFO ] [ecta.internal.api.OnectaSignInClient] - Prepare request to get Api-Version
2023-07-19 16:19:33.813 [INFO ] [ecta.internal.api.OnectaSignInClient] - Prepare request to get single-sign-on cookie
2023-07-19 16:19:34.127 [INFO ] [ecta.internal.api.OnectaSignInClient] - User logon to Daikin
2023-07-19 16:19:34.596 [INFO ] [ecta.internal.api.OnectaSignInClient] - Extract login-token
2023-07-19 16:19:34.597 [INFO ] [ecta.internal.api.OnectaSignInClient] - Expand single-sign-on cookies with login-token
2023-07-19 16:19:35.215 [INFO ] [ecta.internal.api.OnectaSignInClient] - Get DaikinUnified
2023-07-19 16:19:35.474 [INFO ] [ecta.internal.api.OnectaSignInClient] - Get Tokens to perform datatransfer
2023-07-19 16:19:35.647 [INFO ] [ecta.internal.api.OnectaSignInClient] - Refresh token.
2023-07-19 16:19:36.294 [ERROR] [internal.handler.OnectaBridgeHandler] - Error in DiscoveryService
java.lang.NullPointerException: Cannot invoke "org.openhab.binding.onecta.internal.api.dto.units.ManagementPoint.getName()" because the return value of "org.openhab.binding.onecta.internal.api.dto.units.Unit.findManagementPointsById(String)" is null
	at org.openhab.binding.onecta.internal.service.DeviceDiscoveryService.startScan(DeviceDiscoveryService.java:54) ~[?:?]
	at org.openhab.binding.onecta.internal.service.DeviceDiscoveryService.discoverDevices(DeviceDiscoveryService.java:31) ~[?:?]
	at org.openhab.binding.onecta.internal.handler.OnectaBridgeHandler$1.run(OnectaBridgeHandler.java:73) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
	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 Oliver,

I uploaded a new Jar you can try, I tested it with you data. There is one small thing. the Binding is writen for aircos, the data for a heatpump has other items. The binding shows info but not all items are filled.

iám thinking to split things up somehow but don’t know what the best solution is yet.

Gr Alexander

Hi All,
I need a litle help by developing the binding. Some of the items are updatable. But is it possible to add a “Semantic Class” by default. Can this be done in the XML-files in the resource/thing folder in the binding java project ?

To get this by default

thanks

Alexander

Sure you can, here’s an example :

	<channel-type id="setpoint">
		<item-type>Number:Temperature</item-type>
		<label>Setpoint</label>
		<description>Thermostat temperature setpoint.</description>
		<category>Temperature</category>
		<tags>
			<tag>Setpoint</tag>
			<tag>Temperature</tag>
		</tags>
		<state pattern="%.1f %unit%" readOnly="false" min="7" max="30" step="0.5"/>
	</channel-type>

Hi Gaël,

Thanks, this was more simple than expected :slight_smile:. It works.

My next quest is to find the java commands to change the min and max value at runtime. The min and max values are different when the airco is cooling or heating.

gr. Alexander

I will not be able to help you on this, wether feasible or not - or else maybe using two channels, one heat setpoint and one cool setpoint

I will find a way,
at this moment I have 2 extra channels for the actual min and max values. This is working but trying to get it better :slight_smile:

Hello

I get the following exception during device refreshing with a Daikin Sky Air installation when the Operation Mode is FAN or DEHUMIDIFIER:

2023-08-01 10:59:03.191 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.ClassCastException: class org.openhab.core.types.UnDefType cannot be cast to class org.openhab.core.library.types.DecimalType (org.openhab.core.types.UnDefType and org.openhab.core.library.types.DecimalType are in unnamed module of load>
        at org.openhab.binding.onecta.internal.handler.OnectaDeviceHandler.refreshDevice(OnectaDeviceHandler.java:200) ~[?:?]
        at org.openhab.binding.onecta.internal.handler.OnectaBridgeHandler.pollDevices(OnectaBridgeHandler.java:209) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]

When this happens, the states are not updated anymore.

Regards
Benoît

Hello again

I have found that if I remove the (DecimalType) cast in line 200 of org.openhab.binding.onecta.internal.handler.OnectaDeviceHandler:

        if (channelsRefreshDelay.isDelayPassed(CHANNEL_AC_TEMP)) {
            updateState(CHANNEL_AC_TEMP, (DecimalType) getCurrentTemperatureSet());
        }

it works fine.
Regards
Benoît

Hi,
There had be some changes here.
I will take a look at it.

Gr. Alex

Hi Alex
thank you.
just for information: I have the problem with the last commit.
Regards
Benoît

Hi all,
I need some help.

I have the following idea, I want to make an item with electricity consumption of the current day. I want this so that consumption can be stored in 1 item (Persistence) instead of different items. The problem is that the consumption data comes in with a delay from the Daikin cloud. So the last consumption of, for example, Saturday comes in in the first hour of Sunday. As a result, this consumption ends up in the database with a timestamp on Sunday, while I would like to have this stored with a timestamp on Saturday night and Sunday starts again with 0 kWh. Is there a way to store data with a timestamp in the past.

I could not find a sollution yet.

Gr Alexander

Hi,
I wonder if you notice the same issue like I have. It seems that the temperatures are returned to me in Fahrenheit and also they’re with negative values.


I guess the API is returning them this way and probably it’s not due to the binding but just wanted to check if anyone else is experiencing this or have any clue how to change it?

Cheers,
K.

P.S. On the question for the persistency, I have no idea…

Hi Konstantin,
wow you have a very strong air conditioner :wink:
In the binding you can set ‘Drop Raw-data’. with this it dumps all available data in the log file.
If you send me this dump in a private message, I can test/debug with it.

Cheers Alexander

Hi,

Just updated from OH3.x to OH4.
As I understood I need to manually copy the JAR file to my installation.

Where can I find the the latest file?
Where do I need to copy it and how can I add the binding?

Greetings Thomas

Hi Thomas,

At the top of this topic you can find the link
afbeelding
and copy it to the addons folder.

afbeelding

greetings Alexander

Thx.

In openhabian it is this folder?

image