Items: Switch AC_Power { mqtt=">[control:ha/mod/5557/P:command:ON:1],>[control:ha/mod/5557/P:command:OFF:0],<[control:ha/mod/5557/P:state:MAP(simpleBinary.map)],<[control:ha/mod/5557/P:state:MAP(simpleBinary.map)]" } Number AC_Mode { mqtt=">[control:ha/mod/5557/M:command:*:default],<[control:ha/mod/5557/M:state:default]" } Number AC_Temp { mqtt=">[control:ha/mod/5557/T:command:*:default],<[control:ha/mod/5557/T:state:default]" } Number AC_Fan { mqtt=">[control:ha/mod/5557/F:command:*:default],<[control:ha/mod/5557/F:state:default]" } String AC_Zone { mqtt=">[control:ha/mod/5557/Z:command:*:default],<[control:ha/mod/5557/Z:state:default]" } Switch AC_Zone0 Switch AC_Zone1 Switch AC_Zone2 Switch AC_Zone3 :Sitemap Group item="HVAC" label="HVAC" icon="climate-on" { Switch item=AC_Power label="Power" Selection item=AC_Mode label="Mode" mappings=[0="Cool", 1="DH", 2="Fan", 3="Auto", 4="Heat"] Selection item=AC_Fan label="Fan" mappings=[0="Low", 1="Med", 3="High"] Setpoint item=AC_Temp label="Temp [%d]" minValue=18 maxValue=30 step=1 Group item="Zones" label="Zones" { Switch item=AC_Zone0 label="Zone 1" Switch item=AC_Zone1 label="Zone 2" Switch item=AC_Zone2 label="Zone 3" Switch item=AC_Zone3 label="Zone 4" } } Rules: import org.openhab.core.library.types.* import org.openhab.core.persistence.* import org.openhab.model.script.actions.* rule "Aircon Zone Control input" when Item AC_Zone received update then logInfo("Aircon","AC_Zone got update") val String zoneState = AC_Zone.state.toString val String zoneState0 = zoneState.substring(0,1) val String zoneState1 = zoneState.substring(1,2) val String zoneState2 = zoneState.substring(2,3) val String zoneState3 = zoneState.substring(3,4) if(zoneState != "0000"){ if(zoneState0 == "1") { postUpdate(AC_Zone0, "ON") }else{ postUpdate(AC_Zone0, "OFF") } if(zoneState1 == "1") { postUpdate(AC_Zone1, "ON") }else{ postUpdate(AC_Zone1, "OFF") } if(zoneState2 == "1") { postUpdate(AC_Zone2, "ON") }else{ postUpdate(AC_Zone2, "OFF") } if(zoneState3 == "1") { postUpdate(AC_Zone3, "ON") }else{ postUpdate(AC_Zone3, "OFF") } } end rule "Aircon Zone Control output" when Item AC_Zone0 received command or Item AC_Zone1 received command or Item AC_Zone2 received command or Item AC_Zone3 received command then val String zoneSwitchState = "0000" if (AC_Zone0.state == ON){ logInfo("Aircon","AC_ZoneX read state") zoneSwitchState = '1' }else{ zoneSwitchState = '0' } if (AC_Zone1.state == ON){ zoneSwitchState = zoneSwitchState + '1' }else{ zoneSwitchState = zoneSwitchState + '0' } if (AC_Zone2.state == ON){ zoneSwitchState = zoneSwitchState + '1' }else{ zoneSwitchState = zoneSwitchState + '0' } if (AC_Zone3.state == ON){ zoneSwitchState = zoneSwitchState + '1' }else{ zoneSwitchState = zoneSwitchState + '0' } if (zoneSwitchState != "0000") { AC_Zone.sendCommand(zoneSwitchState) } end