As I am having issues to get my Daikin airco to work with the homekit thermostat functionality i wanted to implement a workaround where I could have an item to activate the fan or the airco at a fixed temp. For this I created items sFan and sAirco which I can call from homekit. I than created a rule that defines the parameters for these when the item is activated. This works fine and I see in the openHab app that the rule is setting the parameters however the binding is overwriting the parameters with the current ones after 2-3 seconds. So if the airco is off and is set Fan and I turn it on with Cool at 25C, the values are displayed in the openHab app for 2-3 sec and than it reverts to Fan. In the Daikin app nothing changes at all so the values are never pushed to the Daiking airco. When I use the app or paperUI everything works fine when I select values in the UI, the binding pushes it to the airco. However when I use rules, the binding is not pushing anything.
I am a bit lost on how to debug this. Am i using the wrong method to update the values?
I am using the Daikin binding from @caffineehacker from this topic [Solved] OH2 - Daikin Binding Unknown wireless control state: dmnd_run = 0
//Daikin Slaapkamer
Switch SPower "Power" { channel="opendaikin:ac_unit:192_168_0_168:power" }
Number SSetTemp "Set Temp[%s °C]" <temperature> { channel="opendaikin:ac_unit:192_168_0_168:settemp" }
Number SInTemp "sIndoor Temp[%s °C]" <temperature> [ "CurrentTemperature" ] { channel="opendaikin:ac_unit:192_168_0_168:indoortemp" }
Number SOutTemp "Outdoor Temp" <temperature> { channel="opendaikin:ac_unit:192_168_0_168:outdoortemp" }
Number SHumidity "Humidity" { channel="opendaikin:ac_unit:192_168_0_168:humidity" }
String SMode "Mode" <heating> { channel="opendaikin:ac_unit:192_168_0_168:mode" }
String SFanS "Fan Speed" <qualityofservice> { channel="opendaikin:ac_unit:192_168_0_168:fanspeed" }
String SFanD "Fan Direction" { channel="opendaikin:ac_unit:192_168_0_168:fandir" }
Switch DaikinVisibility2
Switch sFan "Slaapkamer Ventilator" [ "Switchable" ]
Switch sAirco "Slaapkamer Airco" [ "Switchable" ]
Sitemap:
Frame label="Slaapkamer" icon="climate"
{
Switch item= SPower label="On/Off"
Setpoint item= SSetTemp minValue=20 maxValue=25 step=1 visibility=[DaikinVisibility2==ON]
Selection item= SMode mappings=["AUTO"="Auto", "DEHUMIDIFIER"="Dehumidifier", "COLD"="Cold", "HEAT"="Heat", "FAN"="Fan"] visibility=[SPower==ON]
Selection item= SFanS label="Fan" mappings=["AUTO"="Auto", "SILENCE"="Silence", "LEVEL_1"="Level 1", "LEVEL_2"="Level 2", "LEVEL_3"="Level 3", "LEVEL_4"="Level 4", "LEVEL_5"="Level 5"] visibility=[SPower==ON]
Text item= SInTemp
Text item= SOutTemp
}
Rule:
rule "Set Slaapkamer Ventilator ON"
when
Item sFan changed from OFF to ON
then
{
sAirco.sendCommand(OFF)
SPower.sendCommand(ON)
Thread::sleep(100)
SMode.postUpdate('FAN')
}
end
rule "Set Slaapkamer Airco 25C"
when
Item sAirco changed from OFF to ON
then
{
sFan.sendCommand(OFF)
SPower.sendCommand(ON)
Thread::sleep(100)
SMode.postUpdate('COLD')
Thread::sleep(100)
SSetTemp.postUpdate('24')
Thread::sleep(100)
SFanS.postUpdate('AUTO')
}
end