Daikin and rule issue

Tags: #<Tag:0x00007f745276b1a0>

Hi folks,

I have a rule that is working partially:

rule "Attic Comfort"
when
    Item Netatmo_HobbyRoom_Temperature received update or
    Item Daikin_Attic_AC_Mode changed to OFF or
    System started
then
    if (!(Netatmo_LivingRoom_Temperature.state instanceof DecimalType) || (Daikin_Attic_AC_Mode == ON)) {
        return;
    }
    if ((now.getDayOfWeek == 6) || (Auto_Energy_Timeslot.state == 3)) {
        if (Netatmo_HobbyRoom_Temperature.state < 19.0) {
            Daikin_Attic_ACMode.sendCommand("HEAT")
            Daikin_Attic_ACSetPoint.sendCommand(22)
            Daikin_Attic_ACPower.sendCommand(ON)
        }
        else if (Netatmo_HobbyRoom_Temperature.state > 28.0) {
            Daikin_Attic_ACMode.sendCommand("COLD")
            Daikin_Attic_ACSetPoint.sendCommand(25)
            Daikin_Attic_ACPower.sendCommand(ON)
        }
        else if (Daikin_Attic_ACPower == ON) {
            if (Daikin_Attic_ACMode.state.toString.contains("HEAT") && Netatmo_HobbyRoom_Temperature.state >= 20.0){
            Daikin_Attic_ACPower.sendCommand(OFF)
            }
            else if (Daikin_Attic_ACMode.state.toString.contains("COLD") && Netatmo_HobbyRoom_Temperature.state <= 26.0){
            Daikin_Attic_ACPower.sendCommand(OFF)
            }
        }
    }
    else {
        return;
    }
end

The idea is:

  • when it’s Saturday, or when the energy timeslot is OK (during the night/sunday), my air conditioner needs to start working
  • if the temperature is lower than 19 celsius, the mode is “heat”
  • if the temperature is more than 28 celsius, the mode is “cold”
  • if the temperature is more or equal 20 celsius, in heating mode I need to stop it
  • if the temperature is lower or equal 25 celsius, in cooling mode I need to stop it

The air conditioner starts working properly, but I’m not able to stop it. Any suggestion?

FYI
Daikin_Attic_AC_Mode is a virtual switch (to set the mode auto or manual)
Daikin_Attic_ACMode is a channel to change the air conditioner mode from cold to heat to dehumidifier to fan

thanks
Andrea

Have you added logging to check the values in the rule?

1 Like

Last try

rule "Attic Comfort"
when
    Item Netatmo_HobbyRoom_Temperature received update or
    Item Daikin_Attic_AC_Mode changed to OFF or
    System started
then
    if (!(Netatmo_LivingRoom_Temperature.state instanceof DecimalType) || (Daikin_Attic_AC_Mode == ON)) {
        return;
    }
    if ((now.getDayOfWeek == 6) || (Auto_Energy_Timeslot.state == 3)) {
        if (Netatmo_HobbyRoom_Temperature.state < 19.0) {
            Daikin_Attic_ACMode.sendCommand("HEAT")
            Daikin_Attic_ACSetPoint.sendCommand(22)
            Daikin_Attic_ACPower.sendCommand(ON)
        }
        if (Netatmo_HobbyRoom_Temperature.state > 20.0 && Netatmo_HobbyRoom_Temperature.state < 26.0) {
            Daikin_Attic_ACPower.sendCommand(OFF)
        }
        if (Netatmo_HobbyRoom_Temperature.state >= 28.0) {
            Daikin_Attic_ACMode.sendCommand("COLD")
            Daikin_Attic_ACSetPoint.sendCommand(25)
            Daikin_Attic_ACPower.sendCommand(ON)
        }
    }
end

I will add some logs to check the values (thanks @vzorglub)

First step to debugging this sort of things.
Monitor the values in your if statements so that you know what’s actually happening instead of what you think is happening

1 Like

I can’t debug the behaviour during the Summer (for high temperatures), but for now I will check the Winter way :slight_smile:

thanks again
Andrea

Yes you can, use the rest api to simulate the conditions

How?

1 Like

Another way to do this is through the console

smarthome:update Netatmo_HobbyRoom_Temperature 29
1 Like