Dashboard button - Custom driver

Hello,

I have finished developing a custom driver for one of my door lock, now I am a bit stuck trying to unlock it from the dashboard.

Is there something that I need to add in the driver code to make the command "unlocktimeout" work from a button?

Dashboard doesn't have a way to run custom commands, which is what yours is (something not required as part of a "standard" device capability). What I would do is create a virtual device (a switch with auto off or a button would be good choices), then expose that device on the Dashboard instead. Then create a Rule that will call your custom command (Rule Machine can do that) when your switch is turned on or button pushed.

I'm not sure how familiar you are with the platform (guessing pretty familiar if you're developing a driver), so if none of that makes sense, let me know and I can explain more.

Thanks for the details, that is very helpful.

I have some development / groovy experience so it should be ok, actually the completed parte Is finding good developer oriented documentation on the platform.

I have been reading old ST stuff but it not always the same...

@bertabcd1234, Actually I will need some help :slightly_smiling_face:

I have got the virtual button working with the RM but I can only execute the supported function (lock and unlock).

How in can I execute custom commands that I have defined in my driver from the RM rules?

Regards and thanks for the tips,
Seb

Sounds like you've got the rest of the rule figured out, so the action category that you want instead of "Control HSM, Locks, Garage Doors, or Valves" (assuming that's what you're using) is "Set Mode or Variables, Run Custom Action." Then you can choose "Run Custom Action," and in the list, you should see your custom command. Something like this:

image

If you need me to back up, let me know! Otherwise I'm assuming you already have a rule with a Button or Button Device trigger type and have already found out how to make the rule actions run on, say, button 1 pushed (or whatever you're using).