Alexa, control Heating

Tags: #<Tag:0x00007fadf7134c80> #<Tag:0x00007fadf7134b40> #<Tag:0x00007fadf7134a00>

(Patrik) #1


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 )
“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…”

(Alex) #2

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

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?

(Metin) #3

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.

(Alex) #4


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”


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" ]


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

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

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?

(Metin) #5

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. .-)

(Alex) #6


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”. !!!