3 different methods to use scenes with Google Home & openHAB

scene
googlehome
googleassistant
Tags: #<Tag:0x00007f0153540730> #<Tag:0x00007f015354f960> #<Tag:0x00007f015354e6f0>

(B K) #21

Quick update to method 3.5 above, to take advantage of the new “Member of” rule clause available since openHAB 2.3 - it makes the Set rule even more generic and allows easier addition of new scenes/routines!


(Chris/si) #22

@bartus
Great guide! I implemented method 3.5 and it works fine.
Did you already looked further into rule development for generic rules for storing or item mapping? :grinning:

In my Google Home app new ‘Switchable’ things only appear after I disconnect my OpenHAB from Google Home and reconnect again. Is this a normal behavior or is it possible to refresh these items without the need of a reconnect?


(B K) #23

@Chris_si - thanks! Glad it’s working for you )

I haven’t had time to look at the generic rules lately, but when I tried it last, it appeared to be a more complex effort than I was ready to tackle at the time…I’ve stuck with method 3.5 and adding new scenes is pretty easy still (just add the new group/scene items and a rule to handle them).

For adding new items to your Google Home, just say “Hey Google, Sync my devices!” and it will search your linked apps for any new items (this works for me just fine)…


(Trent Whiston) #24

I got a bit lost when going from method 2 to method 3 and 3.5, where do you set the values of the items, eg brightness, color etc?


(B K) #25

Methods 3 & 3.5 use “storage” items for each item you want to set with a scene. Those storage items hold the “preset” value, and that value gets copied into the actual item when the scene rule fires (e.g. “Lighting Scene Evening” example in post 1 above). The storage items are prefixed with an appropriate “Scene_xxx_” prefix to differentiate them from the actual channel-linked items and from other scene storage items.

If you want to change the presets, you can change the actual items to make up the scene you want, and when you fire the “Lighting Scene Evening Config Store” rule, those current states of the actual items will be copied into the storage items.

Obviously, those storage items need to be persisted, if you don’t want to lose your scene settings between every system restart.


(Thomas Moeyersons) #26

Nice post!

I would like to add two suggestions: first one, concerning method 1, is the possibility to add a custom action to a routine. So instead of accessing the openhab items via ‘adjust lights, plugs, and more…’, you can use ‘Add action’ to add an action just like you would tell the Google assistant. This way it’s possible to set brightness or color via the routine interface.

Second suggestion, albeit slightly off topic, is to use the integrated assistant routines in the standard Android clock app. Since the app’s last update it’s possible to start a routine after you stop your alarm. Either using method 1 or method 2 it’s possible to automatically activate a scene after waking up :slight_smile:


(B K) #27

Thanks for the suggestions! For method 1, the video is a bit outdated at this point, as Google has done some major updates to the Routines menu (and in fact, the entire Google Assistant/Home app layout has changed) - great to know there’s another option to use dynamic configuration settings!

I’ve been using method 3.5 exclusively for the past year, with great results - I don’t have my scenes scheduled on timers or anything, though the use of something like Timeline Picker sounds like a great use case for my scene method above (i.e. schedule different scenes to turn on at different time throughout the day). I’ll play with something like this in the near future. That said, your Android clock routine calls are another great option :slight_smile:


(Udo) #28

:+1:Thank’s for the great tutorial.
I always wanted to cleanup all the rules doing different light configurations.
So I’ve implemented it today according your method 3.5.


(B K) #29

That’s great! Make sure to add your settings items to a persistence service (I was lazy at first, and ended up losing all my settings the first time I restarted OH) :slight_smile:

Then, check out the Home Automation Switch Plate for a neat way to control scenes from a wall switch panel…