im new to openhab and managed since a couple of weeks to get use of some features but now i got somehow stuck in something. My problem are the thermostats duscovered trough the router (Fritzbox).
Thermostats used are ComedDect. They were discovered with no problem but now i get issues with getting them over google home usable.
I’ve read that the MODE must be set manually eventually but right now im not getting it how!
If i set from Google Home the MODE to “Heizen” (Heat) i can change the setpoint, voice commands also working, but every time i get into the Thermostat i got “Anderer Modus” (other MODE). Actually i have a other Link using the thermostats over Google but i want to delete them as soon as i got this work with openhab.
I don’t have a Fritzbox, but I think you’ve called the wrong channel. The AVM Fritz documentation says:
mode | String | States the mode of the device (MANUAL/AUTOMATIC/VACATION)
So, Google is sending a “heat” string state, but your item is looking for MANUAL, AUTOMATIC, or VACATION. I think you need to send commands to the radiator_mode channel.
radiator_mode | String | Mode of heating thermostat (ON/OFF/COMFORT/ECO/BOOST/WINDOW_OPEN)
I suspect that you’ll need to transform the states so that they match, which you can do by using an unbound item (not attached to a channel) as an intermediary between Google and Fritzbox. So, you would have:
And then you’d need two rules: one that takes in the BueroModeGoogle state and sends a command to BeuroMode, and one that goes in the opposite direction when radiator_mode is updated.
One thing to note is that in the Google world, the on state is equivalent to “Other”. From what I’ve seen, Google can send four states: heat, cool, on, off. I think you’ll want:
heat = ON
off = OFF
But again, the intermediary item and rules are only necessary if radiator_mode won’t directly accept the states sent by Google.
Thanks for the reply, I think i had a long day and overseen that I got the wrong mode channel from the Thermostat. I’ll try it out and get back. Thanks for the hint @rpwong
I’m still on discovering the power of openhab and doing my best to understand it. But they will be more moments of stuck and therefore I’m glad to have a community with wise people around.
Edit:changing the to right channel solves a part of it. now im dont get it with the rule and the mode mappings
Here are the options from the other thermostat linked app
Would be nice to share it so I can compare and see if I missed something (specially rules). I have now rule set up over paperui. I’m still extending my knowing about rules…my weak point for now.
Here is my setup (already based on my latest PR for the assistant - will not work with the current official integration!):
Group Thermostat_Bad "Heizung Bad Thermostat" { ga="Thermostat" [ modes="off=OFF:WINDOW_OPEN,heat=COMFORT:BOOST:ON,eco=ECO,auto=AUTOMATIC" ] }
The setpoint and ambient temperature is normally assigned to the appropriate ga="…" value. E.g. HeizungBad_CurrentTemperature, HeizungBad_SetpointTemperature.
The mode is assigned to the RadiatorMode item as already stated, e.g. HeizungBad_RadiatorMode
All those three using PaperUI and the API.
With my PR no additional rules are required.
With the current official integration the way to go would be having a intermediate item for the mode:
String HeizungBad_Mode_GA "Heizung Bad Mode GA" (Thermostat_Bad) { ga="thermostatMode" }
and a set of rules and maps to transform the value in both directions:
rule "Update Heizung Bad Mode -> GA"
when
Item HeizungBad_RadiatorMode changed
then
HeizungBad_Mode_GA.postUpdate(transform("MAP", "modes_ga.map", HeizungBad_RadiatorMode.state.toString))
end
rule "Update Heizung Bad Mode <- GA"
when
Item HeizungBad_Mode_Ga changed
then
HeizungBad_RadiatorMode.sendCommand(transform("MAP", "modes.map", HeizungBad_Mode_Ga.state.toString))
end
@Br3Ak3R Yes, the rules can be in the same file. If you wanted, all of your OH rules could be in a single file (but that’s not recommended).
@michikrug Would you like help with the GA documentation? I’m just figuring out how to submit PRs, and I think it would be great to include some examples for connecting thermostats as you’ve done above.
I don’t think so. I tried it out yesterday and was able to define which modes show up in Google Assistant, but not transform their values. So, you can have this:
Oops. Thanks for that. It worked. And the mapping is working too.
Group HallAC2 "HallAC2" {ga="thermostat" [ modes="off=WINDOW_OPEN,heat=COMFORT:BOOST,eco=ECO,on=ON,auto=AUTO" ]}
2020-07-05 01:48:57.953 [ome.event.ItemCommandEvent] - Item 'HallACMode2' received command COMFORT
2020-07-05 01:48:58.123 [vent.ItemStateChangedEvent] - HallACMode2 changed from COOL to COMFORT
2020-07-05 01:49:11.727 [ome.event.ItemCommandEvent] - Item 'HallACMode2' received command WINDOW_OPEN
2020-07-05 01:49:11.902 [vent.ItemStateChangedEvent] - HallACMode2 changed from COMFORT to WINDOW_OPEN
But the Auto and On modes don’t show up in the GA GUI. Voice command to set to AUTO mode works and it sets it to ‘other’.
2020-07-05 01:50:47.174 [ome.event.ItemCommandEvent] - Item 'HallACMode2' received command AUTO
2020-07-05 01:50:47.345 [vent.ItemStateChangedEvent] - HallACMode2 changed from WINDOW_OPEN to AUTO
I seem to think that the Home app won’t display modes that aren’t pre-defined by Google, probably because the text labels are hard-coded in at some point. However, if you define custom modes and leave out pre-defined ones, you can remove them from the UI. I only show heat, cool, and off in mine.
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
20
In case anyone is interested, this is what I have loaded and it seems to be working.
In so much as when the Google Assistant Thermostat is set to Heat mode, it displays the target temperature and allows me to change it.
In all modes, it displays the current temperature.