Programmable Bathroom Timer using scene switch and rule machine

Howdy folks,
I’ve been trying to figure out how to use an inovelli red switch and rule machine to setup a bathroom fan with adjustable timer and I’m looking for suggestions. The usage model.. tap up 10m timer, tap upx2 (new scene button) 20m timer, ect. In rule machine I can setup a trigger to scene button, but I can’t use scene button in my conditions so I can set seconds variable (button option is not in drop down). Any suggestions? Or alternative ways? I would prefer to not have a bunch of different rules, but if I must…

Thank you for your time. I’ve been enjoying my Hubitat c8

I not sure from your description why a pushed condition would be needed for a button press, as it is really just a momentary event you should be acting on as a trigger.

The pushed, or doubleTapped, etc. attributes will show the last button number pressed, but I'm not clear from your post why you need to check what was pressed as a condition, outside of just needing to trigger off the event sent when the button is pressed.

I do exactly as you described with my bathroom fan. A single On press starts a ten minute timer, and a doubleTapped On starts a twenty minute timer.

Pushed 1 -> start timer to turn off in 10 minutes
DoubleTapped 1 -> start a timer to turn off in 20 minutes

1 Like

@chrisbvt (and @hslonsky )- sounds like the issue is how to detect the different presses on the button.... Not sure how to solve that....

For programming automations from a switch/dimmer, I always recommend the (native/stock) Button Controller app... It's basically Rule Machine packaged up in a nice UI for managing button-based devices.

Be aware that Inovelli uses their own custom button-mapping map (for lack of a better term) that must be adhered to when you use Button Controller (or Rule Machine, or whatever other rule engine).

I'm not at home right now, so I don't have that link handy, but it's in the Inovelli support pages if you look for it.

Thank you for all the initial responses. Attached is my rule machine code. Hopefully this helps visualize what I'm trying to do.
When I mentioned the conditionals.. I did not see "Button" or "Button Device" as an option for the drop down for the expression. I did find "Custom Attribute". The down side is that this variable STAYS what the last value for PUSH and HOLD as you can see in the screenshot. This makes it so that I have to be clever on my ordering or add a random button push at the end to something like push&hold button 5 which I won't use.
If you have your own code to share please to. Tonight I'll try the random button push/hold..

*hmm won't let me paste screen shot..

Thanks again for working with me.

OK so I'm on a Mac and and I'm trying to paste a screen shot.. When I hit reply is says something like I can't send something embeded. Any tips?

Join the Owners group here in the community -- that'll enable the ability to post screenshots, send PMs, etc. The block for that on new accounts is just a spam/bot mitigation.

https://community.hubitat.com/g/owners

1 Like

It's also a cool group to be part of...

1 Like

This information is for Inovelli Blue dimmer/switch units:

Gen 3 Switches (2021-Present)
Please use the below button mapping table for the following switches:
	• Blue Series 2-1 Switch (VZM31-SN)
	Action	Button #	Event
	Tap Up on Light Paddle 1x	1	Pushed
	Tap Up on Light Paddle 2x	2	Pushed
	Tap Up on Light Paddle 3x	3	Pushed
	Tap Up on Light Paddle 4x	4	Pushed
	Tap Up on Light Paddle 5x	5	Pushed
	Hold Up on Light Paddle	6	Pushed
	Release Up on Light Paddle	7	Pushed
	Tap Down on Light Paddle 1x	1	Held
	Tap Down on Light Paddle 2x	2	Held
	Tap Down on Light Paddle 3x	3	Held
	Tap Down on Light Paddle 4x	4	Held
	Tap Down on Light Paddle 5x	5	Held
	Hold Down on Light Paddle	6	Held
	Release Down on Light Paddle	7	Held
	Tap Config / Favorites Button 1x	8	Pushed
	Tap Config / Favorites Button 2x	9	Pushed
	Tap Config / Favorites Button 3x	10	Pushed
	Tap Config / Favorites Button 4x	11	Pushed
	Tap Config / Favorites Button 5x	12	Pushed
	Hold Config / Favorites Button	13	Pushed
	Release Config / Favorites Button	14	Pushed

From <https://help.inovelli.com/en/articles/8231382-button-mapping-tables-for-multi-tap-scene-control-devices> 

For one of my Inovelli blue based rules (too long to take a screen shot of the whole thing), here are the triggers:
image

Importantly, button actions are reported as "taps" with one or more up or down triangle symbols as part of a string, and you can capture the last "button" trigger value in a rule variable like this ("vState" is a user-defined string variable):

You can then test the captured string like so:

I hope this works for Inovelli Red switches as well!

OK thanks for all the detail folks! Joined the group.. Here's the images:

Here's the choices starting with a B

This program is working well with the 2 random pushes as the end to clear the last button pushes. Next part to tackle is to add a color indictor or a blink to indicate elapsed time or timing remaining...

@John_Land Thank you for sharing your code. The insight in using "Tap ▼" as a string will be used in the future :slight_smile: