Control air conditioner

Hi

I dont know anything about node red dash …

But i can help on the “normal” way …

The steps will be:

1. Install and configure MQTT binding if you dont have it allready…

2. Make a item file for your conditioner settings so you have a item for every setting.

Like:

/*****CONDITIONER ITEMS*****/

/*****Groups*****/
Group cond

/*****Items*****/
Number cond_power "Power" <light> (cond)
Number cond_mode "Mode" <light> (cond)
Number cond_fan "Fan" <light> (cond)
Number cond_temp "Tem" <light> (cond)
Number cond_vert "Vert" <light> (cond)
Number cond_horiz "Horiz" <light> (cond)
Switch cond_send "Send Update" <light> (cond)

3. Make a sitemap to display the items or integrate the items in a given sitemap .

Like:

(set the min and max values from the setpoint items to your needs)

sitemap cond label="Cond"
{ Frame label="Conditioner"
Setpoint item=cond_power label="Power: [%.1f]" minValue=0 maxValue=1 step=1
Setpoint item=cond_mode label="Mode: [%.1f]" minValue=1 maxValue=3 step=1
Setpoint item=cond_fan label="Fan: [%.1f]" minValue=1 maxValue=3 step=1
Setpoint item=cond_temp label="Temp: [%.1f]" minValue=1 maxValue=3 step=1
Setpoint item=cond_vert label="Vert: [%.1f]" minValue=1 maxValue=3 step=1
Setpoint item=cond_horiz label="Horiz: [%.1f]" minValue=1 maxValue=3 step=1
Switch item=cond_send mappings=[ON="Update"]
}

4. Make an Rule to build the mqtt string and send it when update is pressed

rule "cond_sendmqtt"
when
    Item cond_send received update ON
then
// Build the String
var contmqtt = "power="+cond_power.state+"&mode="+cond_mode.state+"&fan="+cond_fan.state+"&temp="+cond_temp.state+"&vert="+cond_vert.state+"&horiz="+cond_horiz.state

//Send MQTT
publish("yourbroker", "yourtopic", contmqtt)

//Set Update switch to off
postUpdate(cond_send, OFF)
end

You also can make a switch with mappings for the power switch instead of the numbers …