Create simple parameter like "Make new <log entry>" action

Hello

I am just beginning with plugin implementations and I am fighting with something simple…

I am orienting myself on the BatAction example but rather than entering the bat file to be executed, I would like to enter a string similar to the “Make new ” action.

So I don’t want to open a treeview list with possible parameter values but rather enter one String.

So, I think, I just need to change the settings for the “ActionDefinition” for the parameter and adapt the ActionKind to a String entry field. However, I went through the documentation and the samples but I cannot find the obvious. Could you help?

Thanks

--Thomas

I believe that you want to change BatActionItemManager and within it the method

public override List GetItems()

-try to experiment.

Thanks Bo

Let me clarify, what I want to do

I want to create a Plugin where I can define an action as part of a rule. The action has 2 parameters - “IPAddress” and “Port”. I want to have a little text popup asking for either one of these 2 parameters (similar to the popup of the “Make a Log entry” action).

I tried all kinds of “ItemNode” definitions, however, the result is always displayed as a tree view (Tried Category.Layout, subclass Itemnode, etc.)

If you could give me a hint on where to look, this would be a great help

Thanks

--Thomas

Unfortunately you cannot presently use free text in rule actions. So what the “Make new ” action does cannot right now be implemented using MIP SDK.

A workaround you could do a two step; first create MIP items that does have the IP and port information in it, then use the MIP item while configuring the rule for your rule action.

Ok - I ended up doing the following

  • I put the server / connection information into a file, which is being parsed at startup
  • I let the user select in the treeview to which server he wants to connect

This is not really elegant but for now it works

We now have an integration between Milestone and the VASERControl system which is an integration platform for home automation protocols (KNX, DMX, DALI, Upnp, Sonos, etc.)

So, if motion is detected by Milestone, Lights may come, Dogs barking over the sound system, etc.

Thanks

--Thomas

Hi!

Any news on this? Are there any plans to introduce such a “rule parameter” feature?

Unfortunately there is no news. This is not part of the current enhancement development work.

The way our plugin works right now is just the other around as we originally planned.

In VASERControl (our integration tool VASERControl for building automation protocols) a number of functions are defined which we want to share with the Milestone system. This is exported in a XML file which is then imported into the Milestone system.

The prepared functions now appear as possible list candidates during the Milestone action mapping process.

Now things like motion detection, error conditions, etc. may trigger actions/modules on the VASERControl side.

Using this approach, we can e.g.

  • Play a “dogs barking” MP3 upon motion detection in a garden (as an Add-On for an alarm system)
  • Send Apple Messages upon error conditions on the camera system.
  • Trigger recording of the video upon triggers of an alarm system
  • etc.

--Thomas