I have an espresso machine (Lucca A53 Mini / La Spaziale Mini Vivaldi II) that uses an electronic relay button (rather than a toggle switch) to power the machine on and off. To power on, you must hold the button for 3 seconds, and to power off, simply press and release.
In order to automate turning on the machine so that it’s fully warmed up for my morning coffee when I wake up, I wired-in a mimolite z-wave relay. I soldered the relay wires into the correct pins on the back of the control board and used a pre-installed/unused accessory wire inside the machine to power the mimolite, which enabled me to leave the mimolite inside the case, completely hidden. With the help of a z-wave tweaker, I was able to successfully adjust the momentary relay timing to the requisite 3 seconds so that I can power on the machine remotely, either through automation or through the smartthings app - huzzah!
Unfortunately, I cannot use the same functionality to remotely turn OFF the machine. Once powered on, holding the power button for another 3 seconds sends it into programming mode rather than turning it off. I have the automation set so that it doesn’t run if I am not home (based on cell phone presence), so theoretically I will always be able to turn the machine off manually once I make my coffee, but I would like to be able to have that safeguard in case it’s ever accidentally activated when no one is home (or if I forget to turn it off). I could install a z-wave wall switch to simply kill the power to the whole machine, but I’d rather not have to do that.
Is it possible to create a custom device handler that will change the momentary duration parameter before sending a switch command? This way I would be able to have separate durations for power-on and power-off commands. I am new to Smartthings so I am not familiar with creating custom device handlers - I just found enough information to find a pre-published z-wave tweaker that allowed me to change the parameters separately.