device.moved
The gateway’s own event: an allowed device moved to another sync group, because its endpoint’s group was changed (its sync_group set, changed or taken away). It is told once for each allowed device of the endpoint and each change. The endpoint’s policy package’s moved hook is called after it is stored. The envelope’s tenant, endpoint and device name the device, and group is the group it is in now.
Schema id: urn:houradvantage:events:3:device.moved
Fields
| Field | Type | Required | Description |
|---|---|---|---|
device_id | integer | yes | The gateway’s own number for the device in its register. |
from | object | yes | Where the device was. |
from.group | string | yes | The id, within the tenant, of the sync group it was in. |
group | string or null | yes | The id, within the tenant, of the sync group it is in now. |
Example
{ "device_id": 17, "from": { "group": "hq" }, "group": "plant-7"}JSON Schema
device.moved.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:houradvantage:events:3:device.moved", "title": "device.moved: data", "description": "The gateway's own event: an allowed device moved to another sync group, because its endpoint's group was changed (its sync_group set, changed or taken away). It is told once for each allowed device of the endpoint and each change. The endpoint's policy package's moved hook is called after it is stored. The envelope's tenant, endpoint and device name the device, and group is the group it is in now.", "type": "object", "properties": { "device_id": { "type": "integer", "description": "The gateway's own number for the device in its register." }, "from": { "type": "object", "description": "Where the device was.", "properties": { "group": { "type": "string", "description": "The id, within the tenant, of the sync group it was in." } }, "required": [ "group" ] }, "group": { "type": [ "string", "null" ], "description": "The id, within the tenant, of the sync group it is in now." } }, "required": [ "device_id", "from", "group" ], "examples": [ { "device_id": 17, "from": { "group": "hq" }, "group": "plant-7" } ]}