Device Profile/Route Management Scripts

These scripts are tasked to select appropriate profiles and routes for each device.

Hooks

select-profile event

High priority event to select a profile for a given device. The event hooks must also apply the profile.

The event “subject” is the device (WpDevice) object.

This event has no special properties.

Exchanged event data

Name

Description

selected-profile

The selected profile to be set:
  • Type: string, containing a JSON object

  • The JSON object should contain the properties of the Profile param

select-routes event

High priority event to select routes for a given profile. The event hooks must also apply the routes.

The event “subject” is the device (WpDevice) object.

Event Properties

Property name

Description

profile.changed

true if a new profile has been selected / false if only the available routes changed

profile.name

the active profile’s name

profile.active-device-ids

json array of integers containing the active device IDs for which to select routes

Exchanged event data

Name

Description

selected-routes

The selected routes to be set:
  • Type: map<string, string>

  • The keys are device IDs (as represented in EnumRoute)

  • The values are JSON objects like this: { index: <a route index>, props: { <object with route props> } }