What do you mean by “does not show up”? Where and how are you looking for it?
Liebe Grüße,
Robert
What do you mean by “does not show up”? Where and how are you looking for it?
Liebe Grüße,
Robert
My expectation was that I place the JAR file inside the /usr/share/openhab2/addons folder and then it will just magically appear in the WEBUI. Thats what the mi home JAR did.
edit:
Maybe to clarify what i mean with showup. I just expected it to be visible under installed BINDINGS.
Nope, it doesn’t show up. I don’t know if 1.x addons do show up there at all.
Just provide a daikin.cfg in the services folder of your config, define your items and use the items in your sitemap. Editor only, no support of things, discovery or anything like that.
In the app (here iPad, German) it looks this way:
Thanks a lot for the details. I will give it another go. No luck yet. I think i will have to start with a fresh instance
as I also tried to load older version of the binding.
Hmmm…as I said, no problem here. Are you sure, the binding is being loaded? Do you find some hints regarding Daikin in the logfile at all?
Here’s my full configuration again:
daikin.cfg (needs to be placed in the services folder):
daikin:SZ.refresh=60000
daikin:SZ.host=WIRELESS@http://192.168.1.xx
daikin:SZ.username=xxxxxxxx
daikin:SZ.password=xxxxxxxx
The “SZ” is the abbreviation of the room, where the AC is mounted. Username and Password must be fit to the user and passwort, you use in the Daikin Controller App. The “out of home”-Service has to be activated!
Also, you need to use a FIXED ip address (give it to the device on your router, based on the MAC address you’ll find in the Daikin Controller app)
You need to add the Daikin bining in the file addons.cfg (same directory as daikin.cfg):
# A comma-separated list of bindings to install (e.g. "sonos,knx,zwave")
binding = <your other bindings>,daikin
items:
// Daikin AC Schlafzimmer
Number DaikinSZTempIn "Innentemperatur [%.1f °C]" <temperature_inside> {daikin="SZ:tempin"}
Number DaikinSZTempOut "Außentemperatur [%.1f °C]" <temperature_outside> {daikin="SZ:tempout"}
String NoDaikSZinTempOut "Außentemperatur nicht verfügbar" <temperature_outside>
Switch DaikinSZPower "Power" {daikin="SZ:power"}
Number DaikinSZMode "Modus" <ac_mode> {daikin="SZ:mode"}
Number DaikinSZTemp "Zieltemperatur [%.0f °C]" <temperature> {daikin="SZ:temp"}
Number DaikinSZFan "Lüfter" <fan> {daikin="SZ:fan"}
sitemap:
Text item=Dummy label="Klimaanlage" icon="climate" {
Frame label="Einstellungen"{
Switch item=DaikinSZPower
Setpoint item=DaikinSZTemp minValue=16 maxValue=30 step=1
Switch item=DaikinSZMode mappings=[2="Cool", 1="Dry", 0="Auto"] //not used: 3="Heat", 4="Fan"
Switch item=DaikinSZFan mappings=[ 6="Schlaf", 0="Auto", 1="Lo", 3="Mid", 5="Hi"] // not used: 2, 4
}
Frame label="Temperaturwerte" {
Text item=DaikinSZTempOut visibility=[DaikinSZTempOut!=0]
Text item=NoDaikinSZTempOut visibility=[DaikinSZTempOut==0] labelcolor=[DaikinSZTempOut==0="grey"]
Text item=DaikinSZTempIn
Switch item=ChartScale label="Zeitraum" mappings=[1="T", 2="W", 3="M", 4="J"] icon="chart"
Chart item=DaikinSZTempIn period=D refresh=1000 service="rrd4j" visibility=[ChartScale==1, ChartScale=="NULL"]
Chart item=DaikinSZTempIn period=W refresh=5000 service="rrd4j" visibility=[ChartScale==2]
Chart item=DaikinSZTempIn period=M refresh=10000 service="rrd4j" visibility=[ChartScale==3]
Chart item=DaikinSZTempIn period=Y refresh=100000 service="rrd4j" visibility=[ChartScale==4]
}
} // Klimaanlage Schlafzimmer Ende
Good luck!
Cheers,
Boby
P.S.: Since my model doesn’t show the outside temperature when the AC is off, you’ll find the “visibilty” clause at the “DaikinSZTempOut” and the “NoDaikinSZTempOut” item. Either the one OR the other is being showed, but not both at the same time.
Thanks a lot for taking the time to share your config files and explanation!
The “out of home” setting requirement was new to me. I will give it another go
Thanks!
Your 1.10.0 worked like a charm.
The newest 1.12.0 from the build server did not …
I spoke a little too soon.
I’m able to read the current values, but cannot control anything.
Out-Of-Home on WAN works OK. Using same credentials in binding config.
I can see the state changing when listing items in karaf, but on next poll the old value comes back.
Have tried to enable DEBUG log, but the binding don’t seems to do any logging.
Any ideas?
Adapter is BRP069A42
I had the same issue as OMR where the binding would display the values just fine but I could not post any updates. I am using three Daikin adaptors with firmware 1.2.48.
For different reasons I upgraded to the Openhab Snapshot 2.3 and here the binding (build .12 and .10 )completely fails with the below error. Not sure how to move forward with this. Beware not to upgrade if you want to continue using it for the moment
2018-02-09 15:24:26.754 [ERROR] [org.openhab.binding.daikin ] - FrameworkEvent ERROR - org.openhab.binding.daikin
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.daikin [208]
Unresolved requirement: Import-Package: org.openhab.core.binding
at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
I now have a working solution for on/off and setTemp, inDoor & outDoor reading using the http binding.
ToDo: mode & fan control.
Will post back when done.
Great news and can not wait for a working solution.
I have the same get info as you therefore I tried based upon the teaser to implement it through the http binding. Unfortunatelly it does not seem to parse the values correctly. For example with the below sitemap the two temperature items are just showing the whole string " ret=OK,htemp=21.0,hhum=-,otemp=-,err=0,cm…" in the two fields.
//Warning I am no programmer so dummy questions might occur
sitemap daikin label="Daikin Home Control"
{
Frame label="Bureau" icon="climate"
{
Frame label="Instellingen"
{
Switch item=ACpowerState mappings=[1="On", 0="Off"]
Setpoint item=ACsetTemp minValue=16 maxValue=30 step=1
Switch item=ACmode mappings=[2="Cool", 1="Dry", 0="Auto", 3="Heat", 4="Fan"]
Switch item=ACfanRate mappings=[ 6="Sleep", 0="Auto", 1="Lo", 3="Mid", 5="Hi"] // not used: 2, 4
}
Frame label="Temperature"
{
Text item=ACinDoorTemp
Text item=ACoutDoorTemp
}
}
}
You must install the REGEX add - on.
Will be back over the weekend… Travelling
Reading parameters is one thing - but how can you send commands to the AC with an incoming HTTP (get) request? Or to be precise: How can you switch the AC on/off with the “<” direction in the http.cfg?
Haven’t done my ToDo yet, but will post what you need to turn on/off and setTemp which is all I need at this time of the year (note that when posting command, there MUST be the minimal set I have used below)
AC.items:
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>
Number DaikinACMode "Mode" <ac_mode> {daikin="AC:mode"}
Number DaikinACFan "Fan" <fan> {daikin="AC:fan"}
Switch vACpowerState // 1=ON, 0=OFF
Number vACsetTemp "Target temperature [%.0f °C]" <temperature> //
Number vACMode "Mode" <ac>
// http items
String ACpowerState {http="<[ACcache:6000:REGEX(.*?pow=.*?([0-9]*).*)]"}
String ACsetTemp {http="<[ACcache:1000:REGEX(.*?stemp=.*?([0-9\\.0-9]*).*)]"}
String ACmode {http="<[ACcache:1000:REGEX(.*?mode=.*?([0-9]*).*)]"}
String ACfanRate {http="<[ACcache:1000:REGEX(.*?f_rate=.*?([AB34567]*).*)]"}
String ACfanDir {http="<[ACcache:1000:REGEX(.*?f_dir=.*?([0-9\\.0-9]*).*)]"}
String ACinDoorTemp "Inside temperature [%s °C]" <temperature> {http="<[ACsensorCache:1000:REGEX(.*?htemp=.*?([0-9\\.0-9]*).*)]"}
String ACoutDoorTemp "Outside temperature [%s °C]" <temperature> {http="<[ACsensorCache:1000:REGEX(.*?otemp=.*?([0-9\\.0-9]*).*)]"}
ac.rules:
var String acHost = "http://192.168.1.8:80/"
var String acCommandString = ""
// virtual AC items changed
rule 'vACpowerState'
when
Item vACpowerState changed
then
logInfo("vACpowerState", "vACpowerState=" + vACpowerState.state);
//echo -e "POST &aircon/set_control_info?pow=1&mode=4&stemp=23.0&shum=0&f_rate=A&f_dir=0"
var String newState
if (vACpowerState.state == ON) newState="1" else newState="0"
acCommandString = "aircon/set_control_info?pow=" + newState + "&mode=" + ACmode.state + "&stemp=" + ACsetTemp.state + "&shum=0&f_rate=" + ACfanRate.state + "&f_dir=" + ACfanDir.state
logInfo("vACpowerState", "acCommandString=" + acCommandString)
logInfo("vACpowerState", "sendHttpPostRequest() returns: " + sendHttpPostRequest(acHost + acCommandString, 5000))
end
rule 'vACsetTemp'
when
Item vACsetTemp changed
then
logInfo("ACsetTemp", "vACsetTemp=" + vACsetTemp.state)
acCommandString = "aircon/set_control_info?pow=" + ACpowerState.state + "&mode=" + ACmode.state + "&stemp=" + vACsetTemp.state + ".0&shum=0&f_rate=" + ACfanRate.state + "&f_dir=" + ACfanDir.state
logInfo("ACsetTemp", "acCommandString=" + acCommandString)
logInfo("ACsetTemp", "sendHttpPostRequest() returns: " + sendHttpPostRequest(acHost + acCommandString, 5000))
end
rule 'vDaikinACMode'
when
Item vDaikinACMode changed
then
logInfo("vDaikinACMode", "vDaikinACMode=" + vDaikinACMode.state)
acCommandString = "aircon/set_control_info?pow=" + ACpowerState.state + "&mode=" + ACmode.state + "&stemp=" + vACsetTemp.state + ".0&shum=0&f_rate=" + ACfanRate.state + "&f_dir=" + ACfanDir.state
logInfo("ACsetTemp", "acCommandString=" + acCommandString)
logInfo("ACsetTemp", "sendHttpPostRequest() returns: " + sendHttpPostRequest(acHost + acCommandString, 5000))
end
// AC settings changed from APP or IR remote (remember: IR remote does not reflect changes made by APP or OH)
rule 'ACpowerUpdate'
when
Item ACpowerState changed
then
if (ACpowerState.state.toString == "1") sendCommand(vACpowerState, ON) else sendCommand(vACpowerState, OFF)
logInfo("ACpowerUpdate", "vACpowerState=" + vACpowerState.state)
end
rule 'ACsetTempUpdate'
when
Item ACsetTemp changed
then
logInfo("ACsetTempUpdateAC", "ACsetTemp=" + ACsetTemp.state)
postUpdate(vACsetTemp, Double::parseDouble(ACsetTemp.state.toString))
end
.sitemap:
Text item=ac label="AC" icon="climate" {
Frame label="Settings"{
Switch item=vACpowerState label="On/Off"
Setpoint item=vACsetTemp minValue=18 maxValue=30 step=1
Switch item=vACMode mappings=[4="Heat", 3="Cool", 6="Fan", 0="Auto" ] //not used: 2="Dry"
Switch item=DaikinACFan mappings=[ 3="1", 4="2", 5="3", 6="4", 7="5", 1="Auto" ]
}
Frame label="Temperature values" {
Text item=ACoutDoorTemp visibility=[ACoutDoorTemp != "0.0"]
Text item=NoDaikACinTempOut visibility=[ACoutDoorTemp == "0.0"] labelcolor=[ACoutDoorTemp== "0.0" ="grey"]
Text item=ACinDoorTemp
}
}
In my other rules, I set the temp by: postUpdate(vACsetTemp, 20)
Feel fri to chime in for the missing mode & fan control
Thank you, I will! I was afraid it has to be done using a bunch if rules.
I do even own two Daikin ACs - and have to think about how to solve it without having everything doubled.
But it‘s a shame that there exists a binding, no one takes care of.
It should be taken out of the repository if it’s not being maintained and now not even working anymore. If I would speak Java, I had solved it long ago…
LG,
Robert
New writeup: OH2: Daikin BRP069B control. Http & rule based. (since OH1 binding is currently broken)
I’ve made a new Daikin addon for OpenHAB 2. 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.
First off for the binding as it works like a charm.
The item defintion mentioned in Eclipse has some errors as it has text everywhere where it should be strings and numbers.
//Daikin Bureau
Switch BPower "Power" { channel="opendaikin:ac_unit:192_168_0_238:power" }
Number BSetTemp "Set Temp" <temperature> { channel="opendaikin:ac_unit:192_168_0_238:settemp" }
Number BInTemp "B Indoor Temp[%s °C]" <temperature> [ "CurrentTemperature" ] { channel="opendaikin:ac_unit:192_168_0_238:indoortemp" }
Number BOutTemp "Outdoor Temp[%s °C]" <temperature> { channel="opendaikin:ac_unit:192_168_0_238:outdoortemp" }
Number BHumidity "Humidity" { channel="opendaikin:ac_unit:192_168_0_238:humidity" }
String BMode "Mode" <heating> { channel="opendaikin:ac_unit:192_168_0_238:mode" }
String BFanS "Fan Speed" <qualityofservice> { channel="opendaikin:ac_unit:192_168_0_238:fanspeed" }
String BFanD "Fan Direction" { channel="opendaikin:ac_unit:192_168_0_238:fandir" }
Is anyone having issues with Openhab not refreshing when an option is selected.
For example when I turn on the unit with the Power switch the sitemap should refresh and shown the target temperature, fan speed etc but instead I need to manually refresh the page.
I tried this with different browsers (ios, chrome, safari etc) and they all have the issue which makes me believe it is an openhab issue. Searching revealed no recent reports of this so i wanted to check if you guys also have the issue. I am using a 2.3 snapshot.