The method deviceSendEvent() is called by the server hub anytime an attribute value changes on the remote hub. The event is forwarded to this hub which updates the shadow device that is local to the hub running the Remote Client.
Function |
deviceSendEvent |
Purpose |
Receives and forwards events received from a physical device located on a remote hub. |
Parameters |
Name |
Type |
Description |
params |
Map |
(Optional) |
|
URL Format |
/device/:deviceId/event/:event |
HTTP Method |
GET - Incoming |
HTTP Parameters |
Name |
Type |
Description |
deviceId |
Integer |
The ID of the physical device (from the sharing hub). |
event |
String |
Base64 encoded JSON string containing the event data.
Name |
Type |
Description |
name |
String |
The name of the event (attribute) being fired. (i.e. "switch", "motion", etc.) |
value |
String |
The value of the event (attribute). (i.e. "on", "active", etc.) |
unit |
String |
(Optional) Unit of measurement for [value]. |
descriptionText |
String |
Fulltext description of the event. (i.e. "Light switch in hallway is on") |
data |
Object |
Additional data passed by the event. (i.e. lock codes) |
|
|
Return JSON |
Name |
Type |
Return Values |
status |
String |
"success" or "error" on failure. |
|