# Alexa, control Heating

**URL:** <https://community.openhab.org/t/alexa-control-heating/32066>\
**Category:** openHAB Cloud\
**Tags:** myopenhab, openhab2, alexa\
**Created:** [July 22, 2017, 9:42am UTC](https://community.openhab.org/t/alexa-control-heating/32066 "2017-07-22T09:42:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fanavity](https://community.openhab.org/letter_avatar_proxy/v4/letter/f/c37758/32.png) [@fanavity](https://community.openhab.org/u/fanavity)\
**Post date:** [July 22, 2017, 9:42am UTC](https://community.openhab.org/t/alexa-control-heating/32066/1 "2017-07-22T09:42:59Z")

</div>

Hello,

i have some problems to control my heating with Alexa. I have installed the openHabSkill on Alexa and connect it wirh myOpenHab account.

After that, i search for items and found only my defined group in Alexa ( where are the other Items?)

So far so good, actually o have a wall thermometer which is connected to two heating thermometer. The wall thermomether is connected to homegear and i’m able to control it over openHab2.

This are my Items:

```
/ ***************************************Gruppen******************************************************* /
// --> Raum
Group gWohnzimmer 

// --> Funktion
Group gHeizung "Heizung" ["Thermostat"]

/ ***************************************Items********************************************************* /
Number wz_hz_thermostat "Setze" ( gHeizung) ["TargetTemperature"] {homematic="homematic:HG-HM-TC-IT-WM-W-EU:1ecedb21: **** :2#SET_TEMPERATURE"}
Number wz_hz_temperatur "aktuelle Temperatur" ( gHeizung) ["CurrentTemperature"] {homematic="homematic:HG-HM-TC-IT-WM-W-EU:1ecedb21: **** :2#ACTUAL_TEMPERATURE"}
Number wz_hz_luftfeuchtigkeit "aktuelle Luftfeuchtigkeit" ( gHeizung) ["CurrentHumidity"] {homematic="homematic:HG-HM-TC-IT-WM-W-EU:1ecedb21: **** :2#ACTUAL_HUMIDITY"}

```

In Alexa, i only find the Group “Heizung”

If i say the following sentence.

“Alexa, setzte Heizung auf 22 Grad” ( Alexa, set Heizung to 22 degrees )  
Answer:  
“Die Heizung ist im Automatikmodus, die Solltemperatur beträgt 22 Grad”  
( The heating is in automaticmodus, the the set temperature is 22 degrees"

After that, i see the following in the openhab event.log

```
2017-07-22 11:25:36.609 [ItemCommandEvent] - Item 'wz_hz_thermostat' received command 22
2017-07-22 11:25:36.624 [ItemStateChangedEvent] - wz_hz_thermostat changed from NULL to 22

```

However, the heating thermostat does not matter. Also in the Homegear.log is nothing to see.  
Maybe someone has a tip what I do wrong .. And the following commands recognizes Alexa unfortunately not at all:

“Alexa, Heizung aktuelle Luftfeuchtigkeit” - Antwort: “Heizung unterstützt das nicht” (Heizung does not support this)  
“Alexa, Heizung aktuelle Temperatur” - Antwort: “Wetterbericht für meinen Ort…”

---

<div class="post-metadata">

**Author:** ![Celaeno1](https://community.openhab.org/user_avatar/community.openhab.org/celaeno1/32/55724_2.png) [@Celaeno1](https://community.openhab.org/u/Celaeno1)\
**Post date:** [July 24, 2017, 7:43am UTC](https://community.openhab.org/t/alexa-control-heating/32066/2 "2017-07-24T07:43:36Z")

</div>

> [@fanavity](#):
>
> [“CurrentHumidity”]

AFAIK [“CurrentHumidity”] is NOT supported at the moment. And you only see the group “Heizung” as a device in Alexa APP, that’s normal!

And you you need the maintag [“Thermostat”] **AND ALL 3** childtags [“CurrentTemperature”], [“TargetTemperature”] and [“homekit:HeatingCoolingMode”]

see here: [Official Alexa Smart Home Skill for openHAB 2](https://community.openhab.org/t/official-alexa-smart-home-skill-for-openhab-2/23533)

You have to tell Alexa the followings commands:

Alexa, set Thermostat to 22 degrees  
Alexa, decrease Thermostat by 2 degrees  
Alexa, increase Thermostat by 1 degrees  
Alexa, decrease Thermostat  
Alexa, what is Thermostat set to?  
Alexa, what is Thermostat temperature?

in german:  
Alexa stelle Heizung auf 22 Grad.  
Alexa reduziere Heizung um 2 Grad  
Alexa erhöhe Heizung um 1 Grad  
Alexa reduziere Heizung  
Alexa wie ist Heizung eingestellt? **(I’m not sure about this!!)**  
Alexa wie ist Heizung Temperatur?

---

<div class="post-metadata">

**Author:** ![metin](https://community.openhab.org/user_avatar/community.openhab.org/metin/32/17912_2.png) [@metin](https://community.openhab.org/u/metin)\
**Post date:** [March 7, 2018, 1:50pm UTC](https://community.openhab.org/t/alexa-control-heating/32066/3 "2018-03-07T13:50:07Z")

</div>

Could you please also give an example how to use homekit:HeatingCoolingMode with Alexa? I would expect that I can set the heating mode to automatic/manual/off, but I have searched everywhere, and I seem not be able to find a documentation of this.

---

<div class="post-metadata">

**Author:** ![Celaeno1](https://community.openhab.org/user_avatar/community.openhab.org/celaeno1/32/55724_2.png) [@Celaeno1](https://community.openhab.org/u/Celaeno1)\
**Post date:** [March 7, 2018, 6:10pm UTC](https://community.openhab.org/t/alexa-control-heating/32066/4 "2018-03-07T18:10:34Z")

</div>

@metin

> [@metin](#):
>
> Could you please also give an example how to use homekit:HeatingCoolingMode with Alexa? I would expect that I can set the heating mode to automatic/manual/off, but I have searched everywhere, and I seem not be able to find a documentation of this.

That’s a little bit tricky!

You need **dummy-items** and **rules**!!

If you also have **Max!-binding** , then you can do as follows: (it’s partially in german, sorry!)

In my example it have 3 modes: **AUTO, MANUAL, BOOST**

If I want to turn it **OFF** , I say “Alexa, set Kitchen Thermostat to **4.5** degrees”

**.items**

```
Group GF_KitchenThermostat "Küche Thermostat" (gGF) ["Thermostat"]
String GF_Kitchen_maxMode "Mode:" <snow> (gMAX, GF_Kitchen, GF_KitchenThermostat) ["homekit:HeatingCoolingMode"] {channel="max:thermostat:LKF0025489:MEQ1442698:mode"}
Number GF_Kitchen_maxActual "IST Temperatur [%.1f °C]" <temperature>	(gMAX, GF_Kitchen, Temperature1, GF_KitchenThermostat) ["CurrentTemperature"]	{channel="max:thermostat:LKF0025489:MEQ1442698:actual_temp"}
Number GF_Kitchen_maxSetTemp "SOLL Temperatur [%.1f °C]" <temperature> (gMAX, GF_Kitchen, GF_KitchenThermostat) ["TargetTemperature"] {channel="max:thermostat:LKF0025489:MEQ1442698:set_temp"}
Switch GF_Kitchen_manual "Küche manuell" ["Switchable"]
Switch GF_Kitchen_boost "Küche Turbo" ["Switchable"]

```

**.rules**

```
rule "Max Küche manual"
	when
		Item GF_Kitchen_manual received command
	then
	    switch (receivedCommand) 
		{ 
			case ON:	{
			sendCommand(GF_Kitchen_maxMode, "MANUAL")					
			}
			case OFF:	{
			sendCommand(GF_Kitchen_maxMode, "AUTOMATIC")
			}
		}
end

rule "Max Küche Boost"
	when
		Item GF_Kitchen_boost received command
	then
	    switch (receivedCommand) 
		{ 
			case ON:	{
			sendCommand(GF_Kitchen_maxMode, "BOOST")					
			}
			case OFF:	{
			sendCommand(GF_Kitchen_maxMode, "AUTOMATIC")
			}
		}
end

```

In **Alexa-APP** → Smart Home → Groups–\> you need a group named e.g. “Heizung Küche” and put inside this group your “device” = “Küche Thermostat”.

Utterances: Do you need it in german or english?

---

<div class="post-metadata">

**Author:** ![metin](https://community.openhab.org/user_avatar/community.openhab.org/metin/32/17912_2.png) [@metin](https://community.openhab.org/u/metin)\
**Post date:** [March 7, 2018, 8:01pm UTC](https://community.openhab.org/t/alexa-control-heating/32066/5 "2018-03-07T20:01:26Z")

</div>

Thanks, this is very helpful. I will try this asap. However, does this mean that the [“homekit:HeatingCoolingMode”] is not actually used at all?

I am using MAX! devices, but they are paired with a CUL stick over Homegear, so I use the Homematic binding in openHAB, but it should not make a difference.

Re utterances: German is fine. .-)

---

<div class="post-metadata">

**Author:** ![Celaeno1](https://community.openhab.org/user_avatar/community.openhab.org/celaeno1/32/55724_2.png) [@Celaeno1](https://community.openhab.org/u/Celaeno1)\
**Post date:** [March 7, 2018, 9:26pm UTC](https://community.openhab.org/t/alexa-control-heating/32066/6 "2018-03-07T21:26:01Z")

</div>

@metin

> [@metin](#):
>
> [“homekit:HeatingCoolingMode”] is not actually used at all?

If you have **EXACTLY** the same modes like **homekit** (“OFF, HEAT, COOL, AUTO, heat-cool” or “0,1,2,3”), which is not the case while using **Max!** (=MANUAL, AUTOMATIC, BOOST, VACATION, ((OFF= 4.5° C))) or **Homematic** (I don’t know the mode strings or numbers), then it should be possible without using rules. So in your case you have to use rules!!

Utterances in german:

Alexa stelle “Heizung Küche” auf 22 Grad.  
Alexa reduziere “Heizung Küche” um 2 Grad  
Alexa erhöhe “Heizung Küche” um 1 Grad  
Alexa reduziere “Heizung Küche”  
Alexa wie ist “Heizung Küche” eingestellt? (I’m not sure about this!!)  
Alexa wie ist die Temperatur von “Heizung Küche”?

Alexa schalte “Küche manuell” ein/aus.  
Alexa schalte “Küche Turbo” ein/aus.

I used “Turbo” because “german Alexa” don’t unterstand the word “Boost”. !!!

---

<div class="post-metadata">

**Author:** ![Daniel\_Wilhelm](https://community.openhab.org/user_avatar/community.openhab.org/daniel_wilhelm/32/36414_2.png) [@Daniel\_Wilhelm](https://community.openhab.org/u/Daniel_Wilhelm)\
**Post date:** [April 21, 2018, 6:41am UTC](https://community.openhab.org/t/alexa-control-heating/32066/7 "2018-04-21T06:41:53Z")

</div>

Hi Patrik

A few weeks before i had the same problems with my Max!Thermostats. I have to implement more than 15 of these.  
Now with help from another guy of the community it all works perfect…

here some examples of my codes… i will explain it here it only for my bedroom…

items.file

```csv
Group:Number:AVG gTemperature	"akt. Temperatur ansehen"	<temperature> (Home)
Group:String:EQUAL gHeatingMode "Modus" (Home)

Number F2_Bedroom_HeatingG "Heizung Gross" <heating> (gHeating) {channel="max:thermostat:KEQ0538054:OEQ1133869:set_temp"}
Number F2_Bedroom_TemperatureG "Temperatur Schlafzimmer Gross" <temperature> (F2_Bedroom, gTemperature) {channel="max:thermostat:KEQ0538054:OEQ1133869:actual_temp"}
String F2_Bedroom_ModeG "Modus Schlafzimmer gross [MAP(maxcubeMode.map):%s]" <heating> (gHeatingMode) {channel="max:thermostat:KEQ0538054:OEQ1133869:mode"}
Number F2_Bedroom_HeatingK "Heizung Klein" <heating> (gHeating) {channel="max:thermostat:KEQ0538054:OEQ1137726:set_temp"}
Number F2_Bedroom_TemperatureK "Temperatur Schlafzimmer Klein" <temperature> (F2_Bedroom, gTemperature) {channel="max:thermostat:KEQ0538054:OEQ1137726:actual_temp"}
String F2_Bedroom_ModeK "Modus Schlafzimmer klein [MAP(maxcubeMode.map):%s]" <heating> (gHeatingMode) {channel="max:thermostat:KEQ0538054:OEQ1137726:mode"}

```

For the control with alexa I added some more lines in the items.file

```csv
Group gSchlafGThermostat "Heizung Schlafzimmer Gross" ["Thermostat"]
Number SchlafGThermostatCurrentTemp "Heizung Schlafzimmer Gross Aktuelle Temperatur" (gSchlafGThermostat) ["CurrentTemperature"] {channel="max:thermostat:KEQ0538054:OEQ1133869:actual_temp"}
Number SchlafGThermostatTargetTemperature "Heizung Schlafzimmer Gross Soll Temperatur" (gSchlafGThermostat)	["TargetTemperature"] {channel="max:thermostat:KEQ0538054:OEQ1133869:set_temp"}

Group gSchlafKThermostat "Heizung Schlafzimmer Klein" ["Thermostat"]
Number SchlafKThermostatCurrentTemp "Heizung Schlafzimmer Klein Aktuelle Temperatur" (gSchlafKThermostat) ["CurrentTemperature"] {channel="max:thermostat:KEQ0538054:OEQ1137726:actual_temp"}
Number SchlafKThermostatTargetTemperature "Heizung Schlafzimmer Klein Soll Temperatur" (gSchlafKThermostat)	["TargetTemperature"] {channel="max:thermostat:KEQ0538054:OEQ1137726:set_temp"}

```

Then i build the following lines in sitemap for example of one room

```php
		        Default item=F2_Bedroom_TemperatureG		
                Setpoint item=F2_Bedroom_HeatingG label="Schlafzimmer gross" step=0.5 minValue=4.5 maxValue=30.0
  	    		Selection item=F2_Bedroom_ModeG mappings=[AUTOMATIC="Auto", MANUAL="Manuell", BOOST="Boost"]
                Default item=F2_Bedroom_TemperatureG	    		
                Setpoint item=F2_Bedroom_HeatingK label="Schlafzimmer klein" step=0.5 minValue=4.5 maxValue=30.0
 	    		Selection item=F2_Bedroom_ModeK mappings=[AUTOMATIC="Auto", MANUAL="Manuell", BOOST="Boost"]

```

The mapping file…

```auto
AUTOMATIC=AUTO
MANUAL=Manuell
BOOST=BOOST

```

And for last I use a rule to trigger the change of the heating mode…

```php
rule HeatingChangeMode //Heizung einstellen
when
    Item FF_Dining_Mode changed or
    Item FF_LivingRoom_ModeW changed or
    Item FF_LivingRoom_ModeK changed or
    Item FF_Kitchen_Mode changed or
    Item FF_Bathroom_Mode changed or
    Item F2_Bedroom_ModeG changed or
    Item F2_Bedroom_ModeK changed or
    Item F2_JoelRoom_Mode changed or
    Item F2_FabiRoom_ModeS changed or
    Item F2_FabiRoom_ModeW changed or
    Item F2_Bathroom_Mode changed
then
    switch (triggeringItem.name) {
        case 0 : sendCommand(triggeringItem.name, "AUTOMATIC")
        case 1 : sendCommand(triggeringItem.name, "MANUAL")
        case 2 : sendCommand(triggeringItem.name, "BOOST")
    }
end

```

I think the rule could be write a lttle bit easier, simple to look which of this heating item was changed… but at the moment it will also works in this way.

Pherhaps the example will help you…

And sorry for my english 😉

---

<div class="post-metadata">

**Author:** ![Tobi77](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@Tobi77](https://community.openhab.org/u/Tobi77)\
**Post date:** [February 23, 2019, 12:50pm UTC](https://community.openhab.org/t/alexa-control-heating/32066/8 "2019-02-23T12:50:35Z")

</div>

Dear all,

here is my issue:

“Alexa, turn the heating to 22 degrees” - \> “Thermostat heating is set to 22 degrees”  
“Alexa, switch the heating off” → “Thermostat heating does not support this”  
(from German)

Can anyone help? Please check [Thermostat works well in Google Home, but not with Alexa](https://community.openhab.org/t/thermostat-works-well-in-google-home-but-not-with-alexa/70351)
