Daikin Binding in OH2?

I’m trying out a few bindings for OH2 compatibility and have n error with the Daikin one I think.

`Binding configuration of type ‘daikin’ of item ‘Heating_DaikinMode’ could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: Item ‘itemName’ is of type ‘StringItem’, only ‘NumberItem’ are allowed for command ‘MODE’ - please check your *.items configuration
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.validateItemType(BindingConfigReaderDelegate.java:39)[192:org.openhab.core.compat1x:2.0.0.b3]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:377)[118:org.eclipse.smarthome.model.item:0.8.0.b5]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:350)[118:org.eclipse.smarthome.model.item:0.8.0.b5]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:168)[118:org.eclipse.smarthome.model.item:0.8.0.b5]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:404)[118:org.eclipse.smarthome.model.item:0.8.0.b5]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:201)[117:org.eclipse.smarthome.model.core:0.8.0.b5]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:97)[117:org.eclipse.smarthome.model.core:0.8.0.b5]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:240)[117:org.eclipse.smarthome.model.core:0.8.0.b5]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.notifyUpdateToModelRepo(FolderObserver.java:169)[117:org.eclipse.smarthome.model.core:0.8.0.b5]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.updated(FolderObserver.java:150)[117:org.eclipse.smarthome.model.core:0.8.0.b5]
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]

`

Does anyone have this working? I never actually tried it in OH1.8 :sweat: but would be keen to know if the above error is binding related, or my setup…

The wiki

// mode of operation - one of Auto/Dry/Cool/Heat/Fan/Night
String  DaikinMode   "Mode [%s]"       { daikin="<name>:mode" }

appears to disagree with the code:

    public Class<? extends Item> getSupportedItemType() {
        switch (this) {
            case POWER:
                return SwitchItem.class;
            case TEMP:
            case TEMPIN:
            case HUMIDITYIN:
            case TEMPOUT:
            case MODE:
            case FAN:
            case SWING:
            case TIMER:
                return NumberItem.class;
            default:
                return StringItem.class;
        }
    }

What does your items file specify as an item type?

I intend to overhaul this binding once I have the hardware to integrate my heat pump with openHAB.

Thanks @watou, I think my issue is related to this post.

Items file:

String Heating_DaikinMode “Daikin Mode [%S]” { daikin=“living:mode” }

I just copied the wiki code format and used a mappings string in the sitemap file:

Selection item=Heating_DaikinMode mappings=[Auto=“Auto”, Cool=“Cool”, Dry=“Dry”, Heat=“Heat”, OnlyFan=“Fan”]

I might give the older 1.7 jar a go and see if that plays nicely in OH2, but I use a Daikin Skyfi unit, which I thought (wrongly?) was only supported with the jDaikin integration?

An update of sorts: I had some time to try this again and still have errors.

[ERROR] [org.apache.felix.configadmin] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=327, bundle=217/file:/usr/share/openhab2/addons/org.openhab.binding.daikin-1.9.0-SNAPSHOT.jar]: Unexpected problem updating configuration org.openhab.daikin
    at net.jonathangiles.daikin.wireless.WirelessDaikin.readDaikinState(WirelessDaikin.java:52)[217:org.openhab.binding.daikin:1.9.0.201603020808]
    at net.jonathangiles.daikin.DaikinBase.<init>(DaikinBase.java:42)[217:org.openhab.binding.daikin:1.9.0.201603020808]
    at net.jonathangiles.daikin.wireless.WirelessDaikin.<init>(WirelessDaikin.java:18)[217:org.openhab.binding.daikin:1.9.0.201603020808]
    at net.jonathangiles.daikin.DaikinFactory.createWirelessDaikin(DaikinFactory.java:30)[217:org.openhab.binding.daikin:1.9.0.201603020808]
    at org.openhab.binding.daikin.internal.DaikinBinding.updated(DaikinBinding.java:284)[217:org.openhab.binding.daikin:1.9.0.201603020808]

My google-fu makes me think it’s an incompatibility issue with the 1.9 SNAPSHOT binding i’m using.

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 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!

Ciao Alfonso, did you add internet remote connection to your HVAC Daikin plant? I ask since I need this feature (please, see this link Daikin SKYFi BRP15A61)
Grazie e a presto, s.

Hello everyone!

I’m a newbie to the OpenHAB world, but I am quite fond of it so far.

I just succeed to install & configure a Daikin Wireless controller ( BRP069A43 ) with OH2, and since there is not a single but complete tutorial for this, I’ll summarize up the required steps.

  1. Enable OpenHab 1 Compatibility Layer in OH2
    Doc: docs.openhab.org/developers/development/compatibilitylayer.html

I have added via the openHab console with

feature:install openhab-runtime-compat1x

besides that, I have edited the /conf/services/addons.cfg file. Maybe this is not required, since Daikin bindig won’t show up anyway (?!)

legacy = true

binding = <other bindings>, daikin
  1. Add Daikin Binding.
    I have found the latest build from the official openhab1-addon build job:

openhab.ci.cloudbees.com/job/openHAB1-Addons/lastBuild

Here you should look for the ‘openHAB Daikin Binding’, and inside that, you should download the jar file.

This should be a direct permalink for the JAR file:

openhab.ci.cloudbees.com/job/openHAB1-Addons/lastBuild/org.openhab.binding$org.openhab.binding.daikin/artifact/org.openhab.binding/org.openhab.binding.daikin/1.11.0-SNAPSHOT/org.openhab.binding.daikin-1.11.0-SNAPSHOT.jar

Now, as you have acquired the JAR file, you should copy it to you /addons folder.

  1. Configure
    This is well documented in the official wiki:
    http://docs.openhab.org/addons/bindings/daikin1/readme.html

In my case, the daikin.cfg under /conf/services contains

refresh=60000

AC.host=WIRELESS@<your daikin wireless controll ip e.g. http://192.168.0.101>
AC.username=<username>
AC.password=<pass>

The ‘AC’ is just the name for the Thing.
One more tip: you can check your wireless controller’s IP from the official Daikin App: under Home, select your unit, and (gear icon) under ‘Adapter settings’ you can find the IP address.

Items config:

Number  DaikinACTempIn       "Inside temperature [%.1f °C]"       <temperature_inside>  {daikin="AC:tempin"}
Number  DaikinACTempOut      "Outer temperature [%.1f °C]"       <temperature_outside> {daikin="AC:tempout"}
String  NoDaikACinTempOut    "Outer temperature is not available" <temperature_outside> 
Switch  DaikinACPower        "Power"                                                 {daikin="AC:power"}
Number  DaikinACMode         "Mode"                           <ac_mode>             {daikin="AC:mode"}
Number  DaikinACTemp         "Target temperature [%.0f °C]"        <temperature>         {daikin="AC:temp"}
Number  DaikinACFan          "Fan"                          <fan>                 {daikin="AC:fan"}

Sitemap config:

sitemap nappali label="Living room" {
	Text item=Dummy label="AC" icon="climate" {
		  Frame label="Settings"{
				Switch item=DaikinACPower
				Setpoint item=DaikinACTemp minValue=16 maxValue=30 step=1 
				Switch item=DaikinACMode mappings=[2="Cool", 1="Dry", 0="Auto"] //not used: 3="Heat", 4="Fan"  
				Switch item=DaikinACFan mappings=[ 6="Schlaf", 0="Auto", 1="Lo", 3="Mid", 5="Hi"] // not used: 2, 4
		  }
		  Frame label="Temperature values" {
				Text item=DaikinACTempOut   visibility=[DaikinACTempOut!=0] 
				Text item=NoDaikACinTempOut visibility=[DaikinACTempOut==0] labelcolor=[DaikinACTempOut==0="grey"]
				Text item=DaikinACTempIn 
				Switch item=ChartScale label="Time interval" mappings=[1="T", 2="W", 3="M", 4="J"] icon="chart"
				Chart item=DaikinACTempIn period=D refresh=1000   service="rrd4j" visibility=[ChartScale==1, ChartScale=="NULL"]
				Chart item=DaikinACTempIn period=W refresh=5000   service="rrd4j" visibility=[ChartScale==2]
				Chart item=DaikinACTempIn period=M refresh=10000  service="rrd4j" visibility=[ChartScale==3]
				Chart item=DaikinACTempIn period=Y refresh=100000 service="rrd4j" visibility=[ChartScale==4]
		  }
				
	 }
 }

Hope this help someone :wink:

3 Likes

Hello

Excellent tutorial, special for a newbie like me.

I have 4 AC units in the how how should i differentiate them?

THANK you

Just for your information - there will be soon an OH2 binding for Daikin AC’s:
https://github.com/openhab/openhab2-addons/pull/3044

Thanks Boby - the new addon can now be acquired even though it is not officially in OpenHAB. You can get it from the eclipse marketplace by installing the Eclipse SmartHome Marketplace addon from “misc” addons and then searching for opendaikin. Alternatively you can get the jar from the CI of the pull request.

1 Like

Hello there,

i have been updating a couple of days ago the opendaikin binding as i realized after updating OH this binding did not work for me anymore. So far so good everything went smooth.
It also seems that all is operating normally - except sometimes where it seems i am getting something like a timeout or error.

After checking the log i found this:

    2019-04-15 21:39:25.707 [ERROR] [ome.core.thing.link.ThingLinkManager] - Exception occurred while informing handler: org.eclipse.smarthome.core.types.RefreshType cannot be cast to org.eclipse.smarthome.core.library.types.StringType
java.lang.ClassCastException: org.eclipse.smarthome.core.types.RefreshType cannot be cast to org.eclipse.smarthome.core.library.types.StringType
        at org.openhab.binding.opendaikin.internal.handler.OpenDaikinAcUnitHandler.handleCommandInternal(OpenDaikinAcUnitHandler.java:87) ~[?:?]
        at org.openhab.binding.opendaikin.internal.handler.OpenDaikinAcUnitHandler.handleCommand(OpenDaikinAcUnitHandler.java:69) ~[?:?]
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:233) ~[?:?]
        at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:300) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?

This is my things file:

Thing opendaikin:ac_unit:192_168_1_250 "Daikin AC Wohnzimmer" @ "Wohnzimmer" [host="192.168.1.250", refresh=60000]

This is my items file:

Switch  DaikinAZPower        "Power"                                                 {channel="opendaikin:ac_unit:192_168_1_159:power"}
Number  DaikinAZTemp         "Zieltemperatur [%.0f °C]"        <temperature>         {channel="opendaikin:ac_unit:192_168_1_159:settemp"}
Number  DaikinAZTempIn       "Innentemperatur [%.1f °C]"       <temperature> (gInnentemperatur)        {channel="opendaikin:ac_unit:192_168_1_159:indoortemp"}
Number  DaikinAZTempOut      "Aussentemperatur [%.1f °C]"       <temperature>        {channel="opendaikin:ac_unit:192_168_1_159:outdoortemp"}
//Number  DaikinAZHumidity     "Luftfeuchte [%.1f %%]"              <humidity>       {channel="opendaikin:ac_unit:192_168_1_159:humidity"}
//String  NoDaikinAZTempOut    "Aussentemperatur nicht verfuegbar" <temperature_outside>
String  DaikinAZMode         "" <flow>                                      {channel="opendaikin:ac_unit:192_168_1_159:mode"}
String  DaikinAZFan            <fan>                                {channel="opendaikin:ac_unit:192_168_1_159:fanspeed"}

Can anyone help in solving that? Thanks,