Now I still need to set the Modes. This is what I don’t get. Where can I do this?
The sample of the Binding Documentation includes something like that:
And the possible modes are ON/OFF/COMFORT/ECO/BOOST.
They define the Modes in the Sitemap: Selection item=LR_Mode mappings=["ON"="ON", "OFF"="OFF", "COMFORT"="COMFORT", "ECO"="ECO", "BOOST"="BOOST"] icon="heating "
What would be an easy way to add those modes to the items since Google Assistant needs those?
I added a dummy item for the Google Assistant Mode and created a rule to apply my favorite temperatures to the set_temp channel. IIRC the Google Assistant send one of the following commands “on”, “off”, “heat”, “cool” or “heatCool”.
rule "Apply Google Assistant Mode"
when
Item LR_GoogleAssistantMode changed
then
switch receivedCommand {
case "on" : LR_SetTemp.sendCommand("21°C")
case "off" : LR_SetTemp.sendCommand("12 °C")
...
default : ...
}
end
Please be aware of typos I wrote this down in a second.
Did you define anything in the homekit config since on the documentation of Google assistant it said you need to configure some stuff in the homekit config (do I need to install the homekit binding then?).
Or is this not needed anymore?
My Google Home Mini did not arrive yet, I just wanted to prepare everything.
No, I did not. Installing the openHAB Cloud Connector and adding tags to your items should be sufficient. The tags for HomeKit an Google Assistant are nearly similar. That is all.
Just as a side note: In the latest snapshot or milestone version it is possible to distinguish between "Switchable"s and "Outlet"s as well as "Scene"s.
I have used this example to connect my google home mini for adjusting the target temperatures in my rooms.
Everythings working fine, the value can be adjusted via voice or in the google home app.
The only problem I have at the moment is that the google home replies that he could not connect to the openhab service, in german “Der Anbieter opeHAB ist anscheinend zurzeit nicht erreichbar”
In the openhab log I see the value which is changed…whats wrong here?
I am new to openhab since a few weeks and I dont understand why I must use groups for the thermostat, even I use only the set_temp function.
Two MQTT sensors works without any group settings.
I have started this setup, but stopped in the middle of this setup because some points were not clear what to do.
Like I said before the setting via voice does work, but I get a feedback from google home that the openhab service ist not reachable.
I want to control the thermostats via the Heating Cooling Mode, e.g when I say “Hey google turn on the heating”.
I also have a question to Christophs Code example from the beginning of this thread:
The case arguments of the “switch receiveCommand” should be the voice commands from the google home?
@OhNoItSJoe Thanks for confirming my unwritten guess a out a missing but required item.
Let me explain how it works. The Google Assistant (GA) needs to know an entity for the heating device. This entity has to support three properties: reading the current temperature, adjusting the target temperature and applying a heating mode. The concept of OH2 items is restricted to support one of feature per item. Thus we need a group to group three items - one for each feature - together, identified by the tags “CurrentTemperature”, “TargetTemperature” and “homekit:HeatingCoolingMode”. The group is exposed to GA by adding the “Thermostat” tag. In the moment you are talking to your GA it queries for the item inside the group ti find the matching one which can process your command. Does that make sense for you?
No, the arguments for the switch are one of the five "on”, “off”, “heat”, “cool” or “heatCool” strings.
I have still the problem that google home reports “openhab is not reachable”, even though “hey google sync my devices” works and also setting temperature by voice is working.
Even the synced items in openhab cloud connector are working.
I have also reconnected the openhab service to the google home app for several times and made a port forwarding on port 443 to my raspberry, the problems is still there.
2018-12-26 19:02:38.890 [vent.ItemStateChangedEvent] - wohnzimmersoll changed from 21.0 ℃ to 23.0 ℃
2018-12-26 19:02:38.893 [vent.ItemStateChangedEvent] - WZ_Mode changed from COMFORT to ON
2018-12-26 19:02:38.898 [vent.ItemStateChangedEvent] - WohnzimmerHeizung_ModusDesHeizkRperreglers changed from COMFORT to ON
2018-12-26 19:02:53.416 [vent.ItemStateChangedEvent] - WohnzimmerHeizung_Solltemperatur changed from 21.0 ℃ to 23.0 ℃
The tag [ "homekit:HeatingCoolingMode" ] is missing. You have to add it to the WZ_Mode item. I still recommend to use a different dummy item for it (see post 2) because the radiator_mode channel will not “understand” the command sent by GA.
No, I do not. I use all features provided by GA. Before setting a target temperature the GA sometimes tries to send a command to the item tagged by [ "homekit:HeatingCoolingMode" ]. And if that one is missing you get the “OH2 not reachable” message.
Still the same error, also when I add the radiator mode line with the ain number.
At the moment I dont have the rule from your example at post #2…
I only try to set the temperature via set_temp, which is working correctly.
The only problem is the feedback from google…