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!
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?
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?
@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)…
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?
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.
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
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
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.