I have a custom driver containing a method "requestMeasRM()" (see below). I do not need to pass any parameters (from RM) as the sendHubCommand does not change.
When I created the Rule defining a custom action "requestMeasRM()" from the dropdown box, when the parameter input was offered I simply ignored it and completed the rule.
Now it seems the interaction between RM rule and the driver code don't seem to match resulting in an error. I guess I could have RM pass a dummy parameter but I would like to understand what I missed.
It looks like you are passing a single null parameter to your custom command, whereas it's defined as taking none. Fixing whichever of those is the problem should fix the problem here (if it's not supposed to take any parameters and you don't see RM claiming to send any, I'd try just removing and re-creating that line in the rule--and being sure not to add any parameters).
I'm learning by example so I'll guess some of the pieces I put together don't match. I actually included the command "requestMeasRM to force a "button" on the device page.
Looks like an issue with the rule, then. Verify that your custom command/action in Rule Machine isn't sending any parameters--looks like it's sending an empty/null one from the logs above, when it should be none at all.
I don't think you'd need to delete the rule--just that action should be enough, and make sure you don't add any parameters when you re-do the custom command in RM. But, of course, either way should work if this is really the problem.
Thanks,
I've modified that code a few times. Its now ready for the wipe clean and restart. Its really not a big deal as I have the logic written down so its just a matter of entry.
Probably not related, but I understand that using āIntegerā in a driver can cause some RM issues (typically seen when creating a rule though, not when running it...). The recommendation is to use āNumberā.
As far as I recall, the only place the attribute type matters is for custom attributes in conditions. There are many places that the actual value matters, for example a driver not sending a decimal value in an integer context. When using custom actions, parameter type is important, as is the number of parameters, for the same reason: the definition of the method being called in the driver.