OpenDaikin Binding from MarketPlace Questions

AFAIK - there is no humidity support on the Australian Airbase controllers

@Paul_Smedley
where does OH get the Thing name from? is it possible to remove IP address from name and replace with a coded label?

@mtrax not sure I understand the question. But when using PaperUI to add a new ‘Thing’ (like the Daikin controller) I was asked for a name for the thing - the default included a reference to the IP, but this could be changed.

yes I’m assuming if for what ever reason my IP address changes I would need to remap all my items it would be good to “lock” down the name so IP address isn’t part of thing eg opendaikin:ac_unit:192_168_0_6:outdoortemp

so thing would be
daikin:ac_unit:house [ host=“192.168.0.6”]
and item would be:
opendaikin:ac_unit:house:outdoortemp

eg

You can edit the IP address of the airbase without having to change the name of the ‘thing’ - at least you can from paperui - I assume from habmin too…

edit… I’m wrong about being able to change the default ID of the thing - it does seem the IP is hardcoded in there… It’s probably possible to change this, but I’m at the limits of my knowledge in extending the current binding…

hi mtraxl, Sorry to say I know nothing about coding and only get things done by looking at others. For me, Daikin= works. @Paul_Smedley has made more progress and knows more than most on this.

Hi Paul, could you please have a look at my text file up a couple of posts and let me know if the Switch, String, Number items are right. Some posts I have read have the string as a number.
Cheers
Edit. Could you please share your items file contents

Sorry - I don’t use an items file for the opendaikin binding - I created all of my items using PaperUI

When looking at the source code, the following channels are defined, but not all are supported on all devices. My A/C unit doesn’t provide humidity information for example.

power       Switch
settemp     Number:Temperature
indoortemp  Number:Temperature
outdoortemp Number:Temperature
humidity    Number
mode        String, values[AUTO|DEHUMIDIFIER|COLD|HEAT|FAN]
fanspeed    String, values[AUTO|SILENCE|LEVEL_1|...|LEVEL_5]
fandir      String, values[STOPPED|VERTICAL|HORIZONTAL|VERTICAL_AND_HORIZONTAL]

BTW, when enabling debug logging for the binding, you can see the response from the Daikin unit in the log file. From that you can identify which values are ‘0’ for your device.

I have recently installed a Daikin Airbase BRP15B61 and thanks to all those that contributed managed to get the Daikin unit interfaced with OH without issues.
I have unable to find any code for the use of zones with this system. After a bit of reading on the commands used by this interface I have added the following items, rule and sitemap to my system to allow the management of my zones within other rules

Zone items

    Group:Number:SUM gACZones
    String AC_Zone_Status "Zone response status [%S]" 
    Switch AC_Zone_1 "Lounge room [%S]"    <flow>   (gACZones)
    Switch AC_Zone_2 "Bedroom 2&3 [%S]"    <flow>   (gACZones)
    Switch AC_Zone_3 "Bedroom Master [%S]" <flow>   (gACZones)
    Switch AC_Zone_4 "Study [%S]"          <flow>   (gACZones)
    Switch AC_Zone_5 "N/A"                 <flow>   (gACZones)
    Switch AC_Zone_6 "N/A"                 <flow>   (gACZones)
    Switch AC_Zone_7 "N/A"                 <flow>   (gACZones)
    Switch AC_Zone_8 "N/A"                 <flow>   (gACZones)

and a rule that triggers anytime a zone is changed

var String ACIPAddress = "192.168.0.005"

rule "Zone Commands" 
    when 
        Item gACZones changed 
    then 
        var String zonerequest =  "http://" + ACIPAddress + "/skyfi/aircon/get_zone_setting?lpw=" 
        var String zoneresponce= sendHttpGetRequest(zonerequest) //Gets existing zone setting from AC as a starting point
        var String zonecheck = zoneresponce.toString.split(",").get(0)
        var String zoneadd =""  
        if (zonecheck != "ret=OK"){
            logError("Daikin AC","Zone string = " + zoneresponce) 
            AC_Zone_Status.sendCommand("Error setting Zones")
            return;
            }   
        var String zoneset = zoneresponce.toString.split(",").get(1)
        zoneset =  "http://" + ACIPAddress + "/skyfi/aircon/set_zone_setting?lpw=&"  + zoneset.toString.split("zone_onoff=").get(0)  +"&zone_onoff="
        gACZones.members.forEach[ i | {
            zoneadd  = "0%3b"
            if(i.state == ON){
                zoneadd = "1%3b"
                }                
            }
            zoneset= zoneset + zoneadd  
        ]
        zoneset=zoneset.substring(0, zoneset.length() - 3)
        zonecheck=sendHttpGetRequest(zoneset)
        AC_Zone_Status.sendCommand(zonecheck)
        logInfo("Daikin AC","Zone set " +  zonecheck + "  Zones status = " + (zoneset.toString.split("zone_onoff=").get(1)).replace("%3b",":"))

end

and in my sitemap I have the following, including items attached to the OpenDaikin binding and two additional control items, AC_Operating_Mode that I use for manual or fully automatic operation and AC_Operating_Theme, where I am planning to be able to vary temperatures and times of the system (under slow development) but is used for visibility on the sitemap

		  Frame {
		  	Switch item=AC_Operating_Mode   label="AC Mode" 	mappings=[0="OFF", 1="Manual",2="Auto"]
			Switch item=AC_Power 			label="AC On/Off" 	visibility=[AC_Operating_Mode  == 1]
			Setpoint item=Temp_AC_SetTemperature label="AC Set Temp" minValue=16 maxValue=32 step=1 visibility=[AC_Operating_Mode  == 1]
			Switch item=AC_Mode 			label="AC Mode"		mappings=["HEAT"="Heat", "COOL"="Cool", "FAN"="Fan", "AUTO"="Auto" ,"DRY"="Dry"]    visibility=[AC_Operating_Mode  == 1]               
			Switch item=AC_Fan 				label="AC Fan"		mappings=[ "LEVEL_1"="1", "LEVEL_3"="3", "AUTO"="Auto" ]   visibility=[AC_Operating_Mode  == 1] 
	  		Selection item=AC_Operating_Theme label="AC Theme"  mappings=[0="Normal", 1="Enhanced",2="Power Saver"] visibility=[AC_Operating_Mode  == 2]
			
			Switch item=AC_Zone_1 label="BR 2" visibility=[AC_Operating_Mode  == 1]
			Switch item=AC_Zone_2 label="Dining" visibility=[AC_Operating_Mode  == 1]
			Text item= AC_Zone_Status label= "Zone Status" visibility=[AC_Power == ON]
			  }

Whilst this works well on my system at present, I remain unclear on whether the cycling through the group items of the zone will always be in the correct specific order, and what this order is. (is it the order they appear in the items file?). Please let me know if there is an other way you have implemented zone control for the Daikin system.

I’m still having problems with settemp, ie I can’t seem to get it to work . DEBUG doesn’t seem to show anything , what version of the JAR file are people using V2.4?

I did run the 2.4.0 version until recently (bundle created Feb 13) and now I’m running the 2.5.0-SNAPSHOT version. The settemp channel did and still does work for me.

The code of the binding hasn’t changed at least since the addons where moved to the new repository earlier this year (somewhere Feb/March, I think).

Did you try the API via a http GET using Postman or similar tool? The Daikin API is documented here and that’s where just about all 3rd party programs and libraries are based upon. Should be something like:

GET http://<ipaddress>/aircon/set_control_info?pow=1&mode=1&stemp=18&f_rate=A&f_dir=3&shum=0

and stemp is the settemp value.

EDIT: The binding id changed from opendaikin in 2.4 to daikin in 2.5.

however , we should try to update the code to support the Daikin BRP15B61 which has a slightly different URL which has skyfi as prefix
eg

http://<ipaddress>/skyfi/aircon/set_control_info?lpw=&mode=2&dt2=30&f_airside=0&f_rate=2&shum=--&pow=1&stemp=25&f_dir=1&f_auto=0

I tried the 2.5 version and it failed to parse the output

Hi Paul,

That’s not the only difference - mode settings values are different as well.

Completely agree that in an ideal world, we’d commonise the code to support all Daikin adapters. An alternative would be to fork the code and rename it to airbase.

Thinking out loud… I wonder if this could be as simple as a variable that’s saved during the detection process…

ie the binding checks http:///aircon/… and if it finds an adapter it saves “aircon”; if it doesn’t find an adapter, it then checks http:///skyfi/… and saves “skyfi”

It would likely then be relatively simple to adapt the mode settings, etc for “aircon” or “skyfi”

Zone settings are a whole other issue - as AFAIK no Euro Daikins support Zones…

I have some code I’ve been messing around with - but your solution appears much more elegant, other than I don’t see how this results in Openhab keeping in sync with manual changes from the Daikin app or the wall thermostat?

My current work-in-progress polls the wall controller every minute to keep things in sync.

It was working OK until I tried to get clever and support wall controllers without a common zone, where 1 zone always needs to be on :slight_smile:

And/Or thing option eg model='abcv

I think model is difficult - as the Euro daikin seems to support many, many adapters - so using adapter model number (I think) would be a PITA

Edit 1: Anyway, step 1 of cloning the latest openhab2-addons code and attempting to compile the daikin binding is underway - then I’ll try hacking to support both the existing controllers and the aussie airbase

Edit 2: pydaikin uses a similar method to what I outlined above - see https://bitbucket.org/fredrik_e/pydaikin/commits/f9bf46f0db731219833c1f1828a4a46b560f4261 - except they have an Airbase parameter that is True or False. If False - do it the Euro way, if True use the Airbase code.

So going back to the issue of the item linking, what should I do to get it working?

Thanks Paul,
My limited testing was done using a sitemap and through OH rules. I had not contemplated sync from manual changes or from the Airbase App. I have tried to use the same methodology using a time cron trigger as well. I can get this in a separate rule but having problems in combining this into a single rule. Much of the code is the same but I am unable to determine whether the event trigger is from the Group item or the cron. I will keep looking.