I have a driver that benefits from re-intialization so I am trying to do so via a rule.
My difficulty is finding the initialize action within the rule engine.
I tried to build a rule using a custom action. The rule engine them required that I pick a capability, not a device, as I had hoped. Unfortunately, the capability that I need i.e. Sensor is not available in the drop-down.
You'll need to select a capability that your driver implements (and that RM offers). Since you have the code, it looks like that's going to be "Sensor" or "Initialize." RM has "Sensor" for sure. (EDIT: no, this was me mis-remembering.) You could certainly add "Actuator" or something to the driver yourself if you wanted, but I might just try to fix whatever the issue is with the driver in the driver in the first place if possible.
...and Ryan, if it becomes a matter of adjusting the driver I can certainly do that. My concern was that I am missing something in the correct usage of the Rule Machine.
Thank you and that did it. So, one question remains, should RM be augmented to include the Sensor capability? That too would have worked and it would have been "out of the box" so to speak.
Ha, you're right, I mis-remembered "Sensor" as being there. "Actuator" is the other sort of catch-all and definitely is.
My thinking is that they did not include it because there are basically two catch-all capabilities in case the driver doesn't have anything else that can be used: Actuator for devices that accept commands, and Sensor for devices that just send reports. Since the point of a custom command is to, well, send a command, this usually doesn't make sense for "Sensor" devices. That being said, since you have access to the code, neither of these capabilities really do anything on their own (and don't require any commands or attributes like most capabilities), so at least you have any easy fix.
Though I'd still probably try to figure out what's up with the actual driver issue.