How to integrate an Air Conditioner with Alexa?

Hi,

does someone has a sample on how you guys implemented/added an air conditioner to alexa?

My aircon has the following items:

Switch	ac_Klimaanlage_power_state			"Power state [%s]"				<switch>				
Number	ac_Klimaanlage_target_temperature	"Target temperature [%d°C]"		<temperature_cold>				
Number	ac_Klimaanlage_operational_mode		"Mode []"						<pump>	//5 different modes in total 0=Auto 1=Cool ....												
Number	ac_Klimaanlage_fan_speed			"Fan speed []"					<fan> //5 different fan speeds in total 0=Silebt 1=Low ....								
Number	ac_Klimaanlage_swing_mode			"Swing mode []"					<flow>	//4 different swing modes in total 0=Off 1=Vertical ....							
Switch	ac_Klimaanlage_eco_mode				"Eco mode [%s]"					<switch>						
Switch	ac_Klimaanlage_turbo_mode			"Turbo mode [%s]"				<switch>	

Could someone assist me on how I can incorporate all those modes to work with amazon alexa?

best,
salexes

Create your sitemap based on aircon items, set a label and add alexa switch tags, i add them in both sitemaps and items file.
Switch item=ac_Klimaanlage_power_state label=“Air Conditioner” icon=“fan” [ “Switchable” ]
after that , go to alexa app -> discover devices, it should find the aircon “device” based on your items with switchable tags , add that device and you have voice control for your aircon.
This should do the work, it may require small adaptations or have a look at Exec WoL binding - forum post and try replicating the settings out there, it took me a while but i made it work eventually.

Thank you for your reply. I do know how to add the most simplistic version of this to alexa.

But I want to be able to control the AC completly via alexa.

What I mean is being able to set the tempature and all of the modes via the same one exposed device to alexa.
I do not want to create lots and lots of single “devices” which I all need to address with a different name in alexa.

So every command can be something along the line like this:
Alexa, turn on the AC
Alexa, set AC tempetaure to 20°c
Alexa, turn on AC turbo mode

I still believe working with alexa tags will help you achieving this. if you assign the proper item alexa tag for each item entry / sitemap and rename them via labels you can command to turn on off. set temp and control all features.

I was in the same scenario as you but after following other posts just to get myself an idea about how and where to use those tags, did some practice, that eventually helped me.

I got your point of not wanting to have multiple devices out there, maybe Rules can come in handy for you if you want only one device via alexa to control all these elements

best regards.

Maybe the thermostat group endpoint is what you are looking for.

1 Like

You will probably need to combine the different actions using proxy items. Can you elaborate how you would normally control the different modes of your AC using the items you listed? Try to stay in line with what the ThermostatController.thermostatMode interface supported modes.

This is mine:

//Air Con
Group					MasterBedroomAC						"Master Bedroom Air Conditioning"																				{alexa="Endpoint.Thermostat"}
Switch					MasterBedroomAC_ONOFF				"Power"																(MasterBedroomAC)							{channel="intesisbox:intesisbox:masterbedroom:onoff", alexa="PowerController.powerState"}
String					MasterBedroomAC_Mode				"Mode [%s]"															(MasterBedroomAC)							{channel="intesisbox:intesisbox:masterbedroom:mode",alexa="ThermostatController.thermostatMode" [COOL="COOL",HEAT="HEAT",AUTO="AUTO"]}
Number:Temperature		MasterBedroomAC_Temperature			"Setpoint [%.1f 簞C]"												(MasterBedroomAC)							{channel="intesisbox:intesisbox:masterbedroom:setptemp",alexa="ThermostatController.targetSetpoint"}
String					MasterBedroomAC_Fanspeed			"Fan"																(MasterBedroomAC)							{channel="intesisbox:intesisbox:masterbedroom:fansp", alexa="RangeController.rangeValue" [supportedRange="1:4:1",friendlyNames="fan speed, speed",presets="1=Quiet,2=Low,3=Medium,4=High",actionMappings="Quiet=1,Low=2,Medium=3,High=4"]}
Number:Temperature		MasterBedroomAC_RoomTemp			"Temperature [%.1f 簞C]"												(MasterBedroomAC)							{channel="intesisbox:intesisbox:masterbedroom:ambtemp" ,alexa="TemperatureSensor.temperature"}
String					MasterBedroomAC_VaneLR				"Horizontal Louvre"																								{channel="intesisbox:intesisbox:masterbedroom:vanelr"}
String					MasterBedroomAC_VaneUD				"Vertical Louvre"	
1 Like

I am using this, since there is no binding for my AC: https://github.com/bricky/midea-openhab/tree/lan
In the link above mentioned you can see which data is received to which items

So I do not have any channels, the items get updated via python (I think).

Would something like this work?

//Air Con
Group					Klimaanlage					    "Master Bedroom Air Conditioning"																				{alexa="Endpoint.Thermostat"}
Switch					Klimaanlage_ONOFF				"Power"																(Klimaanlage)							{alexa="PowerController.powerState"}
String					Klimaanlage_Mode				"Mode [%s]"															(Klimaanlage)							{alexa="ThermostatController.thermostatMode" [2.0="Kühlen",3.0="Trocken",4.0="Heizen",5.0="Ventilator",1.0="Automatisch",6.0="Turbo",7.0="Eco"]}
Number:Temperature		Klimaanlage_Temperature			"Setpoint [%.1f 簞C]"												(Klimaanlage)							{alexa="ThermostatController.targetSetpoint"}
String					Klimaanlage_Fanspeed			"Fan"																(Klimaanlage)							{alexa="RangeController.rangeValue" [supportedRange="1:6:1",friendlyNames="Ventilator Geschwindigkeit, Geschwindigkeit",presets="0=Silent,1=Quiet,2=Low,3=Medium,4=High,5=Auto",actionMappings="Silent=0,Quiet=1,Low=2,Medium=3,High=4,Auto=5"]}
Number:Temperature		Klimaanlage_RoomTemp			"Temperature [%.1f 簞C]"											(Klimaanlage)						    {alexa="TemperatureSensor.temperature"}

What I also did not know how could ad the different swing modes to this whole setup.

Since there is no channels etc. I would need to create rules to correctly update everything for alexa, correct ?

For the thermostat mode, you can only use the supported Alexa modes as per the documentation. This means that some of the non-standard mode may not be controllable via Alexa, unless you switch to a ModeController interface. Keep in mind that doing so will limit some of the thermostat integration in the Alexa app.