UDAInternals

User Defined Actions is a app to define some action sequences and name them. They can be called by their name from other apps and from smartphone or other external services.
The definition of all UDAs will be put on a running system in /usr/events with it's ID. That ID is the key for calling a UDA.
Each UDA have name, ID, action-sequence and a single "enabled" condition. In the backend the "lastSaved" parameter saves a unix time stamp when a UDA is modified.

Call a User Defined Action

Eventname: highlevelevent
Parameter id: the ID as String or Integer
Executes a User Defined Action

Accessing the backend

For modifying entries, the backend is registered to the Event system-addon-user-defined-actions-config. With the parameter "action" you can specify which configuration should be done. After a configuration is processed by the backend, a system-addon-user-defined-actions-saved event is raised from the backend.

Modify a Entry

Eventname: system-addon-user-defined-actions-config
Parameter action: save
Parameter value: Json-Representation of a Object with all needed Values for a entry Details for a UDA-Entry
Saves a Entry and register it's trigger on the System. If a "id" is provided, a existing entry is modified, if not (or null-value) a new entry will be generated

Enable a Entry

Eventname: system-addon-user-defined-actions-config
Parameter action: enable
Parameter id: either a single ID as String or Integer or JSON-Representation of a array with IDs
Enable one or more Entries by setting the "enabled" Condition to true

Disable a Entry

Eventname: system-addon-user-defined-actions-config
Parameter action: disable
Parameter id: either a single ID as String or Integer or JSON-Representation of a array with IDs
Disable one or more Entries by setting the "enabled" Condition to true

Delete a Entry

Eventname: system-addon-user-defined-actions-config
Parameter action: delete
Parameter id: either a single ID as String or Integer or JSON-Representation of a array with IDs
Delete one or more Entries of the UDA