getDeviceSync

The method getDeviceSync() is called by the server hub to retrieve the current state of all subscribed attributes as well as device name and label for a device that is local to the hub running the Remote Client.

Function getDeviceSync
Purpose Retrieves the current attribute and device name/label.
Parameters None
URL Format /device/:deviceId/sync/:type
HTTP Method GET - Incoming
HTTP Parameters
Name Type Description
deviceId Integer The ID of the physical device (from the sharing hub).
type String The groupname from the NATIVE_DEVICES driver definition map.  (i.e. "switches", etc.)
Return JSON

Name

Type Return Values
status String "success" or "error" on failure.  If failure, no other parameters will be returned.
name String Current device name. (device.name)
label String Current device label. (device.label)
currentValues
List

List of objects containing the current value of each attribute.

Name Description
name Attribute name.  (i.e. "switch", "level", etc)
value Current value of the attribute as reported by the physical device. (i.e.  "on", "100", etc.)
unit Optional unit of measurement.  (i.e. "v" for voltage)
  • v2api
  • 4026 Users Found This Useful
Was this answer helpful?

Related Articles

deviceSendEvent

The method deviceSendEvent() is called by the server hub anytime an attribute value changes on...

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...

hsmReceiveAlert

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