openHAB Google Assistant Integration v2.0

Tags: #<Tag:0x00007f5ca108a2f0> #<Tag:0x00007f5ca108a1d8>

@jeshab described it perfectly…

The combination of the ThermostatMode and the ThermostatOperatingMode creates a matrix of options.

You can assign 4 different values to the ThermostatMode - SAFE,NIGHT,DAY & COMFORT

and change the ThermostatOperatingMode between HEATING & COOLING

Creating in effect 8 different modes of operation.

Jeshab described it as 2 thermostat modes, each with 4 presets.

Which in Alexa terms was perfect.


I have all the Velbus side of things working perfectly and with Jeshab’s assistance, Alexa seems to be happy too.

What I can’t do yet is get Google Assistant’s incoming commands to be mapped to something that the Velbus (binding) is happy with, (IE, Values that are valid for the thermostats)

So to go through your comments…

Unlike the Alexa metadata that can be mapped and Alexa informed as to the Presets and Modes that are available, we must accept whatever Google understands and map it to whatever our brand of thermostats accept.

(I could be very wrong here)

Either of the following is right

  • Google only knows it’s own options for modes and those have to be mapped to our thermostats

  • I haven’t worked out how to inform Google of the Modes that are available

That is the Google mode (heat) being sent to the Velbus thermostat.
The following line in the log is the Thermostat rejecting that command and resetting to SAFE

(Everything is READ/WRITE)

This is where the confusion is

The ThermostatOperatingMode can be either HEATING or COOLING

Whereas the ThermostatMode can be any of the 4 options, SAFE,NIGHT,DAY or COMFORT

		String MiddleBedroomGP2_ThermostatMode 				"Middle Bedroom Thermostat mode"	  	 		( MiddleBedroomGP2_Thermostat	)																{ channel="velbus:vmbgp2:VelbusNetworkBridge:17:thermostat#MODE", 							ga="thermostatMode" [ modes="off=SAFE,eco=NIGHT,on=DAY,heat=COMFORT" , lang="en" , ordered=true ] ,					 alexa="ModeController.mode" [friendlyNames="@Setting.Preset", supportedModes="SAFE=Safe,NIGHT=Night,DAY=Day,COMFORT=Comfort"]} // Accepts SAFE,NIGHT,DAY,COMFORT
		String MiddleBedroomGP2_ThermostatOperatingMode 	"Middle Bedroom Thermostat operating mode"		( MiddleBedroomGP2_Thermostat )																	{ channel="velbus:vmbgp2:VelbusNetworkBridge:17:thermostat#OPERATINGMODE"	,														alexa="ThermostatController.thermostatMode" [COOL="COOLING",HEAT="HEATING"]	} // Accepts HEATING & COOLING

The behaviour that you’ll see in the Velbus panel is that when in HEATING mode, the HEATER channel is “PRESSED” when the target temperature is ABOVE the current temperature

Whereas in COOLING mode the COOLER channel is PRESSED when the Target temperature is BELOW the Current temperature.

(It’s possible to create a kind of AUTO mode by assigning actions to the Thermostat Alarm channels and the OperatingMode, where if the Current temperature is +10° above the target, the unit changes to COOLING and another where if the Current Temperature is -10°c below the target temperature the unit changes to HEATING mode)

This is, to my understanding, how it is.
And yes, you´ll then need to map Velbus Modes to Google modes, (just like you did). But I think you mapped them wrong.
This is just a wild guess, but based on your previous log, where I see openhab trying to send “heat” to your ThermostatMode, maybe you need to swap the commands? Like this:

[ modes="SAFE=off,NIGHT=eco,DAY=on,COMFORT=heat" , lang="en" , ordered=true ]

I´m a bit “handicaped” here, cause my Velbus setup is running on the Odroid, and my GA connection is running on my Rpi. And on my Rpi, I havn´t got true Thermostats with modes. So I cant test it directly, only through sitemaps, which is only half the test worthy :frowning:
(And I need a 20meter USB cable to get the Velbus setup to my Rpi :smiley: ).

Second, I have some issues understanding how come the Modes has been splitted into two items? (I think thats the Velbus binding doing this). I know Velbus panels can handle it. But I dont see how Google would be able to. And I fail to understand how Alexa can.

Indeed, I’ve tried all kinds of variations on that theme.

(I’ve just tried this {again} and it doesn’t make any difference :sob: )

I’m not sure if it is openHAB2 that does that mapping (so I would expect it to be operational as soon as the Item file is updated and accepted.)

Or if that information has to be synchronised with Google during a refresh.

You could…

Add the Velbus binding to your RPi and use the Network Bridge to connect it to your Odroid.

(But why you haven’t simply restored your RPi configuration onto the Odroid I don’t know… it would be easy enough to add VelServ to your RPi is you wanted to isolate the Velbus kit)
Or you could poll the Odroid for Velbus Item values…

Openhab should do the mapping. Otherweise it makes no sense to me.
I always do syncronise whenever I have made any changes regarding GA.

Ahmm… Sorry I havn´t thought about this before :frowning:

It´s not that I wanted to isolated Velbus… Quite opposite infact… But I simply had this idea, I had to connect the Velbus USB module to the Rpi to get it to work :frowning:

1 Like

I’ll PM you so we can get you up and running.
It’ll be a very quick process

The modes config option needs to be set at the thermostat group and not on the mode child item!

lang="en" , ordered=true
Can be removed. Has no effect at all here.

No. It was correct.

Furthermore. I am still not sure if marziman has already published the version that included the modes features or if it just was merged into the master branch and stopped there…

That may explain it.

I did try putting the modes into the Group Item. Doesn’t seem to be deployed either?

Hmm, could you perhaps speed this up, since the doc´s has been updated?

I have no other or special contact to him than everybody else here.


I see… Lets see if this will do any changes then…

In the mean time… I noticed you answered Stuart (MDAR), that the mode mapping should be applied to the Thermostat group… Is this correct? According to the doc, it should be added to the ga="thermostatMode"

(Mandatory) Mode: Number (Zwave THERMOSTAT_MODE Format) or String (off, heat, cool, on, ...). { ga="thermostatMode" }

If you have deployed the new Mode mapping for thermostat, then it doesnt work.
If you havnt deployed it yet, could you please do so, or at least remove it from the doc.

If you read this very slowly, it is very clear

to custom ones for your specific setup, you can use the modes config option on the thermostat group

I missed it many times

Arrgh, You´re right :open_mouth:
I guess the mandatory setting in the example is meant for zwave thermostat (numbering).

Not only did I miss it… I totally misunderstood :frowning:

Since at least two of you found the docs confusing on this point, I’m sure any ideas you have to make them more clear would be greatly appreciated. I doubt you are the only ones.


I agree…
My suggstion is Thermostat examples (working examples ofcouse :slight_smile: ), is whats really missing.

So are we all in agreement that this would work, when the modes option is up and running?

	Group MiddleBedroomGP2_Thermostat	"Middle Bedroom"																																				{ ga="Thermostat" [roomHint="Middle Bedroom" , modes="off=SAFE,eco=NIGHT,on=DAY,heat=COMFORT" ]    , alexa="Endpoint.Thermostat" }
	Number MiddleBedroomGP2_CurrentTemperature 			"Middle Bedroom Current Temperature" 			( MiddleBedroomGP2_Thermostat ,WholeHouse_CurrentTemperature		)							{ channel="velbus:vmbgp2:VelbusNetworkBridge:17:input#CH9", 								ga="thermostatTemperatureAmbient" ,		 alexa="TemperatureSensor.temperature" }
	Number MiddleBedroomGP2_CurrentTargetTemperature 	"Middle Bedroom Current Target Temperature"		( MiddleBedroomGP2_Thermostat ,WholeHouse_CurrentTargetTemperature	)							{ channel="velbus:vmbgp2:VelbusNetworkBridge:17:thermostat#CURRENTTEMPERATURESETPOINT",		ga="thermostatTemperatureSetpoint",		 alexa="ThermostatController.targetSetpoint"}
	String MiddleBedroomGP2_ThermostatMode 				"Middle Bedroom Thermostat mode"	  	 		( MiddleBedroomGP2_Thermostat	)																{ channel="velbus:vmbgp2:VelbusNetworkBridge:17:thermostat#MODE", 							ga="thermostatMode"  ,					 alexa="ModeController.mode" [friendlyNames="@Setting.Preset", supportedModes="SAFE=Safe,NIGHT=Night,DAY=Day,COMFORT=Comfort"]}
	String MiddleBedroomGP2_ThermostatOperatingMode 	"Middle Bedroom Thermostat operating mode"		( MiddleBedroomGP2_Thermostat )																	{ channel="velbus:vmbgp2:VelbusNetworkBridge:17:thermostat#OPERATINGMODE"	,														alexa="ThermostatController.thermostatMode" [COOL="COOLING",HEAT="HEATING"]	}

I don’t think the roomHint is working either.

I’m quite happy to take a look at the docs and add a few full examples, once it’s all up and running (so I can test that what I’m suggesting actually works)

That looks like the way it is meant to be. I guess @michikrug can confirm.
When @MARZIMA can confirm the feature has been deployed, its time to change (optimize) the docs, or bug fixing :smiley:

I changed to new metadata version last year. Also I could configure my aircon as a thermostat and now I can control. But it would be good if I can change modes and configure other things as well. Plus can we use this connection with Google locally somehow? I do not need full description, but if it is possible and I can get some hints I would be very grateful. Than I can do it by myself.

1 Like