Daikin binding not loaded

Does anybody know if the daikin binding should work under OH2?
When dropping in addons I get following error in the logfile:

2016-11-27 14:55:36.387 [ERROR] [org.openhab.binding.daikin          ] - [org.openhab.binding.daikin(191)] bind method [addBindingProvider] not found; Component will fail
2016-11-27 14:55:36.396 [ERROR] [org.openhab.binding.daikin          ] - [org.openhab.binding.daikin(191)] bind method [addBindingProvider] not found
2016-11-27 14:55:36.413 [ERROR] [org.openhab.binding.daikin          ] - [org.openhab.binding.daikin(191)] unbind method [removeBindingProvider] not found; Component will fail
2016-11-27 14:55:36.415 [ERROR] [org.openhab.binding.daikin          ] - [org.openhab.binding.daikin(191)] unbind method [removeBindingProvider] not found
2016-11-27 14:55:36.422 [ERROR] [org.openhab.binding.daikin          ] - [org.openhab.binding.daikin(191)] bind method [addBindingProvider] not found
2016-11-27 14:55:36.424 [ERROR] [org.openhab.binding.daikin          ] - [org.openhab.binding.daikin(191)] unbind method [removeBindingProvider] not found
2016-11-27 14:55:36.448 [ERROR] [org.openhab.binding.daikin          ] - [org.openhab.binding.daikin(191)] bind method [addBindingProvider] not found
2016-11-27 14:55:36.454 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=341, bundle=201/file:/usr/share/openhab2/addons/org.openhab.binding.daikin-1.8.3.jar]: Unexpected problem updating configuration org.openhab.daikin
java.lang.RuntimeException: Unsupported connectionType: <WIRELESS|WIRED>
	at org.openhab.binding.daikin.internal.DaikinBinding.updated(DaikinBinding.java:273)[201:org.openhab.binding.daikin:1.8.3]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]

Any idea what the reason for failing is?

Post your config please

which particular config files are of interest?

Actually I am not sure about OH2. I use the Daikin binding but only on OH1. And I am using an older version of the binding. Sorry I can’t really help much here.

The line numbers in the stack trace do not agree with the current source code for the binding on the master branch. This suggests you might be using an older version of the binding JAR. Did you put this one in your addons folder? And you should put the binding configuration in the file conf/services/daikin.cfg as described in the wiki for the binding, but remove the beginning daikin: from each key.

Copied the 1.9 version, still getting errors in log

2016-11-28 12:55:13.278 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=350, bundle=204/file:/usr/share/openhab2/addons/org.openhab.binding.daikin-1.9.0-SNAPSHOT.jar]: Unexpected problem updating configuration org.openhab.daikin
java.lang.RuntimeException: Unsupported connectionType: <WIRELESS|WIRED>
	at org.openhab.binding.daikin.internal.DaikinBinding.updated(DaikinBinding.java:290)[204:org.openhab.binding.daikin:1.9.0.201611280210]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1753)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]

this is the daikin.cfg

############################# Daikin Binding #############################

# the refresh interval (in ms)
daikin:refresh=60000

# where <name> is used in your item bindings
# where WIRELESS or WIRED is the type of your Daikin Remote Control Device (BRP069A42 is a WIRELESS Device)
wohnzimmer.host=WIRELESS@192.168.3.40
#daikin:<name>.username=<not used>
#daikin:<name>.password=<not used>
  1. Remove daikin: from daikin:refresh.
  2. The config in the OSGi container has been “contaminated” by a key that was previously in your .cfg text file, and it will have to be removed. Type help config at the openhab> prompt to see the commands to inspect and alter configurations.

still getting error in log.

karaf console output:

Pid:            org.openhab.daikin
BundleLocation: file:/usr/share/openhab2/addons/org.openhab.binding.daikin-1.9.0-SNAPSHOT.jar
Properties:
   bedroom.host = WIRELESS@192.168.3.39
   guest.host = WIRELESS@192.168.3.38
   living.host = WIRELESS@192.168.3.40
   refresh = 60000
   service.pid = org.openhab.daikin
   work.host = WIRELESS@192.168.3.37

log:

2016-11-28 14:42:16.446 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=350, bundle=204/file:/usr/share/openhab2/addons/org.openhab.binding.daikin-1.9.0-SNAPSHOT.jar]: Unexpected problem updating configuration org.openhab.daikin
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(ArrayList.java:653)[:1.8.0_65]
	at java.util.ArrayList.get(ArrayList.java:429)[:1.8.0_65]
	at net.jonathangiles.daikin.wireless.WirelessDaikin.readDaikinState(WirelessDaikin.java:52)[204:org.openhab.binding.daikin:1.9.0.201611280210]
	at net.jonathangiles.daikin.DaikinBase.<init>(DaikinBase.java:42)[204:org.openhab.binding.daikin:1.9.0.201611280210]
	at net.jonathangiles.daikin.wireless.WirelessDaikin.<init>(WirelessDaikin.java:18)[204:org.openhab.binding.daikin:1.9.0.201611280210]
	at net.jonathangiles.daikin.DaikinFactory.createWirelessDaikin(DaikinFactory.java:30)[204:org.openhab.binding.daikin:1.9.0.201611280210]
	at org.openhab.binding.daikin.internal.DaikinBinding.updated(DaikinBinding.java:284)[204:org.openhab.binding.daikin:1.9.0.201611280210]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1753)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]

I get a similar error here, I have the older Daikin with the KKRP01A wired network module.
from the karaf console:

Pid: org.openhab.daikin
BundleLocation: file:/usr/share/openhab2/addons/org.openhab.binding.daikin-1.8.3.jar
Properties:
livingroom.host = 192.168.1.100
service.pid = org.openhab.daikin

from openhab.log

2016-11-28 07:56:40.946 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=320, bundle=205/file:/usr/share/openhab2/addons/org.openhab.binding.daikin-1.8.3.jar]: Unexpected problem updating configuration org.openhab.daikin java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1967)[:1.8.0_111] at org.openhab.binding.daikin.internal.DaikinBinding.updated(DaikinBinding.java:263)[205:org.openhab.binding.daikin:1.8.3] at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8] at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8] at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)[7:org.apache.felix.configadmin:1.8.8] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)[7:org.apache.felix.configadmin:1.8.8] at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8] at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8] at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
Item definitions taken from the wiki page for the Daikin binding, works in OH1:

ssvenn@ion:/etc/openhab2/items> cat daikin.items
Number  DaikinTempIn    "Temp Inside [%.1f °C]"        (Heating,Temperatures)          { daikin="livingroom:tempin" }
Number  DaikinHumidityIn        "Humidity Inside [%.1f %%]"     (Heating)               { daikin="livingroom:humidityin" }
Number  DaikinTempOut   "Temp Outside [%.1f °C]"       (Heating,Temperatures)          { daikin="livingroom:tempout" }
Switch  DaikinPower     "Power" (Heating)               { daikin="livingroom:power" }
String  DaikinMode      "Mode [%s]"     (Heating)               { daikin="livingroom:mode" }
Number  DaikinTemp      "Temp [%.0f °C]"       (Heating)               { daikin="livingroom:temp" }
String  DaikinFan       "Fan [%s]"      (Heating)               { daikin="livingroom:fan" }
String  DaikinSwing     "Swing [%s]"    (Heating)               { daikin="livingroom:swing" }
String  DaikinTimer     "Timer [%s]"    (Heating)               { daikin="livingroom:timer" }

I was planning to leave this binding running in OH1 and connect it to OH2 with mqtt, but would love if we can get it running directly under OH2 :slight_smile:

Do not try to use the 1.8.3 Daikin binding under openHAB 2. The version that’s more likely to work is here. Make sure the 1.8.3 JAR and bundle are removed from the system completely before trying to use the new JAR.

1 Like

Still getting :

2017-01-14 09:04:43.357 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=337, bundle=212/file:/usr/share/openhab2/addons/org.openhab.binding.daikin-1.9.0-SNAPSHOT.jar]: Unexpected problem updating configuration org.openhab.daikin
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(ArrayList.java:653)[:1.8.0_111]
	at java.util.ArrayList.get(ArrayList.java:429)[:1.8.0_111]
	at net.jonathangiles.daikin.wireless.WirelessDaikin.readDaikinState(WirelessDaikin.java:52)[212:org.openhab.binding.daikin:1.9.0.201701130210]
	at net.jonathangiles.daikin.DaikinBase.<init>(DaikinBase.java:42)[212:org.openhab.binding.daikin:1.9.0.201701130210]
	at net.jonathangiles.daikin.wireless.WirelessDaikin.<init>(WirelessDaikin.java:18)[212:org.openhab.binding.daikin:1.9.0.201701130210]
	at net.jonathangiles.daikin.DaikinFactory.createWirelessDaikin(DaikinFactory.java:30)[212:org.openhab.binding.daikin:1.9.0.201701130210]
	at org.openhab.binding.daikin.internal.DaikinBinding.updated(DaikinBinding.java:284)[212:org.openhab.binding.daikin:1.9.0.201701130210]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[3:org.apache.felix.configadmin:1.8.12]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[3:org.apache.felix.configadmin:1.8.12]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[3:org.apache.felix.configadmin:1.8.12]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1461)[3:org.apache.felix.configadmin:1.8.12]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1417)[3:org.apache.felix.configadmin:1.8.12]
	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)[3:org.apache.felix.configadmin:1.8.12]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)[3:org.apache.felix.configadmin:1.8.12]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]

The ability to maintain this binding is seriously complicated by its dependence on an external library that is maintained at Bitbucket. There are at least two forks of the JDaikin library. If I recall correctly, I asked that it be folded into the binding codebase directly for ease of maintenance but the author was not keen. At one time I thought that I would soon own hardware that worked with it (a Daikin heat pump), but then later learned that the devices it integrates with are only for air conditioners that are in no way compatible with my Daikin heat pump. Lacking compatible hardware to test my changes against, I am unable to evolve or maintain the binding.

I would put a request out to other users of compatible hardware to renew the effort to re-integrate the binding into a single code base so that there is a hope of it being maintained going forward. I wish I had more encouraging information to share, but if you “rattle the right cages,” you could possibly spur progress. In any case, if the binding code is refreshed, I recommend it be renamed to DaikinAC or something even more specific so as to avoid the confusion surrounding what it in fact is intended to integrate with. Or split it into two bindings – one named KKRP01A, and the other named BRP069A42, to do away with the partial abstraction. Or see if a combination of the HTTP binding, HTTP actions and rules could do the same work.

None of the above comments are in any way intended to minimise the generous contributions made by all involved!

@ben_jones12, any thoughts?

Integration through http binding is not that complicated, but just multiplying work and hassle with regex.

1 Like

Yes I agree. The additional complication of the JDaikin library is not worth the effort in IMO. I wrote the initial binding for my KKRP01A controller and since the move to JDaikin I have not been able to use the latest version (can’t recall the exact reason now but I have an old pre-JDaikin version of the binding running in my OHv1.8.3 setup).

Unfortunately with the arrival of a little baby last year I simply don’t have time to spend migrating this binding back to a single code base (firstly) and over to OH2 (which I need to migrate to first myself anyway).

It would be nice to have a single Daikin binding which handled all controllers, so as not to pollute the binding list unnecessarily, but I would be happy with either approach.

They are pretty simple bindings at the end of the day, basically just a wrapper around some HTTP calls as you elluded to.

Hi all
I’ve tried OpenHab2 with the Daikin library version 1.9.0 and it work very well!
The only difference into the configuration file from watou is the presence of “http://” near “wireless@”. So the Daikin.cfg is:

refresh=60000
soggiorno.host=WIRELESS@http://x.y.z.w

Thank you for this great software!

@aspar74 can post your cfg here. I do not understand the statement.
Can you also upload the binding which works for you here too.
On which platform you are running OH2?

I tried to debug the binding.

I stuck with the fact that there is no source for the “DaikinFactory.java”

at this breakpoint :

 IDaikin newHost = DaikinFactory.createWirelessDaikin(hostId, host, 0);```

I have these values:

<img src="//community-openhab-org.s3-eu-central-1.amazonaws.com/original/2X/7/786d5a94a477ce0a0ce2ccbc6ebb86f922811a4d.jpg" width="690" height="129">

can some help me out of this hole?

There is another Daikin WiFi controller in the wild called “SkyFI” - it may only be available in the Australian ( and NZ ) markets.

Fortunately its reasonably easily accessible via http, and the urls to query and control has been worked out here:
https://forums.whirlpool.net.au/forum-replies.cfm?t=2440219

So if the Daikin binding is to be reworked, can this “SkyFi” module be included please???

Did not not understand @watou 's statement above. But obviously this binding is not maintainable.
The exception is thrown inside code which is not debug-able. I will try to compile the external library and debug.

1 Like

Hi,

I adapted the jDaikin from Bitbucket and adapted also the Daikin binding accordingly. Now it works on my side.
I am new to this business here. How is the procedure?

The jDaikin is someone’s property is it ok just to compile and include it in the binding.
Is my a change worth to be commited somewhere?

thanks for the answers.