openHAB Google Assistant Integration v2.0

Funny you should mention that…

I’m trying to get the Velbus thermostat working with Google metadata

Current Temperature is okay

But Target Temperature only works when I don’t try to get the Mode mapped.

I can change the mode with the Google assistant, but the commands always get sent to the Item as the Google options, rather than the mapping I’m trying to do

This is what I am trying

// New Google Assistant Metadata tagging (I'm still experimenting with)

		Group MiddleBedroomGP2_Thermostat	"Middle Bedroom"																																				{ ga="Thermostat" [roomHint="Middle Bedroom"], 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" [ 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"]}
		String MiddleBedroomGP2_ThermostatOperatingMode 	"Middle Bedroom Thermostat operating mode"		( MiddleBedroomGP2_Thermostat )																	{ channel="velbus:vmbgp2:VelbusNetworkBridge:17:thermostat#OPERATINGMODE"	,														alexa="ThermostatController.thermostatMode" [COOL="COOLING",HEAT="HEATING"]	}

And this is what I’m seeing in the Events.log when I try to set a mode in Google

2020-03-26 14:41:23.265 [nt.ItemStatePredictedEvent] - MiddleBedroomGP2_ThermostatMode predicted to become heat // This should have been mapped to COMFORT
2020-03-26 14:41:23.273 [vent.ItemStateChangedEvent] - MiddleBedroomGP2_ThermostatMode changed from SAFE to heat
2020-03-26 14:41:24.344 [vent.ItemStateChangedEvent] - MiddleBedroomGP2_ThermostatMode changed from heat to SAFE // This is the Velbus binding rejecting the "heat" command and defaulting to SAFE
2020-03-26 14:42:03.334 [ome.event.ItemCommandEvent] - Item 'MiddleBedroomGP2_ThermostatMode' received command heat // This should have been mapped to COMFORT
2020-03-26 14:42:03.360 [nt.ItemStatePredictedEvent] - MiddleBedroomGP2_ThermostatMode predicted to become heat
2020-03-26 14:42:03.373 [vent.ItemStateChangedEvent] - MiddleBedroomGP2_ThermostatMode changed from SAFE to heat
2020-03-26 14:42:05.402 [vent.ItemStateChangedEvent] - MiddleBedroomGP2_ThermostatMode changed from heat to SAFE// This is the Velbus binding rejecting the "heat" command and defaulting to SAFE
2020-03-26 14:42:39.097 [ome.event.ItemCommandEvent] - Item 'MiddleBedroomGP2_ThermostatMode' received command off
2020-03-26 14:42:39.114 [nt.ItemStatePredictedEvent] - MiddleBedroomGP2_ThermostatMode predicted to become off // This should have been mapped to SAFE
2020-03-26 14:42:39.121 [vent.ItemStateChangedEvent] - MiddleBedroomGP2_ThermostatMode changed from SAFE to off
2020-03-26 14:42:40.420 [vent.ItemStateChangedEvent] - MiddleBedroomGP2_ThermostatMode changed from off to SAFE // This is the Velbus binding rejecting the "off" command and defaulting to SAFE

@michikrug @MARZIMA
Can either of your gentlemen provide any clarification on if this is even possible or what the correct syntax should be?

I’ve tried to follow these instruction to the letter

Should the mode mapping be places in the Themostat group Item as suggested?
Or with the Thermostat Mode String item?
(I’ve tried both, with the mapping in various forms)

We / I am so close to having a complete solution that it’s getting really frustrating…

What’s really curious is that openHAB2 is obviously sharing the current mode with Google, because shortly after sending the mode command to openHAB2, Google rolls back to “Other” mode