Use rule to press this button?

I have this device which creates all my security panel devices for HE. If I reboot HE. this device needs to be re-initialized so it's children are back within HE's system. So how could I make a rule to press this button within this device should HE reboot?

I'm assuming this is "user code" if so I believe you can call "initialize" in your code on system startup. If you post a link to the code I'm sure someone can point you in the right direction.

This can be done in RM3.0 with custom actions. RM3.0 custom actions expose all the commands of a device and you can set a trigger of system startup to run this custom action. I created a quick example on a device that uses telnet and has an initialize command as example.

Create a new triggered rule for location and choose systemStart:

Then choose choose run custom action or custom command and select a capability of your Elk alarm, pick your Elk alarm, then choose the initialize command:

That’s it! Upon reboot of your hub the systemStart event is logged and this rule will fire. I have had a similar rule running for months that turns off and on my water valve because it loses connection with the hub after restarts.

Thats a very creative solution you got there! I'm not quite sure I follow all of it though. The reason is that this "device" I need to initialize is a driver (I think). Here is part of this device and it's children.

The "Elk M1" is the device I open where you see the page of the first example I showed. It does not show up as a switch or anything. Only it's children which are my security zones and outputs show in RM whee I can write the rules based on my security panel's devices hardwired to it.

In other word, I don't have access to define "Elk M1" to actually do anything. I can only click it to open it's page and click Initialize to have it wake up it's children after an HE reboot.

Does that make sense or am I just missing something?

This solution will definitely work as my example above was using a device as well. Click drivers code and pull up the Elk M1 driver and look at the metadata section and look at its capabilities that are declared. Here is an example of my alarm panel integration:

Once you know which capabilities it has, then in your custom action you will select one of those capabilities and the device should show up as a selection. From there you will then be able to select the initialize command.

AhSo! I will try it first thing tomorrow.

1 Like

So here is what has happened as I went through your example.
This is the Elk M1 driver code; image
I went to RM>Trigger and created the Trigger events like your example. BUT, Select Actions does not have this initialize() on ..... action listed.
How did you get this option?
I never got to the 2nd part with the custom command.
What would I be missing here?

Hold the fort! I think I got it now.

So now this new RM will just trigger automatically whenever HE reboots? I ran it manually and the logs did show that the Elk M1 ...

2019-06-05 10:32:18.632 am Elk M1 Module: Connection Driver: Telnet connection to Elk M1 established

If this looks good to you, then I thank you very much!