deviceSendEvent

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.
  • 3628 משתמשים שמצאו מאמר זה מועיל
?האם התשובה שקיבלתם הייתה מועילה

מאמרים קשורים

devicesSaveAll

The method devicesSaveAll() is called by the server hub to save and create virtual, shadow copies...

getAllHSMStates

The method getAllHSMStates() is called by the server hub to retrieve the current list of Hubitat...

getAllModes

The method getAllModes() is called by the server hub to retrieve the current list of system modes...

getDeviceSync

The method getDeviceSync() is called by the server hub to retrieve the current state of all...

hsmReceiveAlert

The method hsmReceiveAlert() is called by the server hub to pass along a Hubitat Safety Monitor...