Using Push/Hold Button command in Rule Machine Error

Has anyone seen the following error when trying to push/hold a button through Rule Machine? I have the latest build (2.3.0.113).

dev:25612021-11-28 09:52:03.041 pm
[error]http://000.000.000.000/device/edit/2561)org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_InovelliUSA_Inovelli_Switch_Red_Series_LZW30_SN_1154.push() is applicable for argument types: (java.lang.Long) values: [1] Possible solutions: use([Ljava.lang.Object;), run(), ping(), poll(), run(), dump() (method push)

This is because the Inovelli driver apparently does not implement the required push() and hold() commands that became required for PushableButton and HoldableButton devices in Hubitat firmware 2.2.6. I'll tag @ericm here since I think he wrote their custom driver. (This would be simple to add: just a push(btnNum) method that generates a "button btnNum pushed" event, and similar for hold(), which could replace or supplement the pushUp/Down... methods).

A workaround in the meantime with minimal modification for their driver would be to un-comment the set of lines towards the top of their driver code that they marked with "// Uncomment these lines if you would like to test your scenes with digital button presses." To do that, just remove the /* and */ characters you see at the beginning and end of these commands. Then, you'll have to use commands like pushUpX1() in Rule Machine as a custom command instead of, say push(1) or the standard "Push button 1..." action you're using, but the idea is otherwise similar.

Alternatively, I assume you're doing this to try to trigger some automations that are also triggered by this button event from a physical tap, so another way would be to just invoke those automations from this Rule somehow. But that will depend on how they're set up.

(And of course yet another workaround is to use the built-in Hubitat driver, which does implement these commands--or another custom driver that does--but with Hubitat's, you'll lose some features like access to more than double taps.)

4 Likes

FYI, I've added the "push" and "hold" methods in our drivers.

3 Likes