Hub Object

From Hubitat Documentation
Revision as of 16:01, 11 November 2019 by Cschwer (talk | contribs)
Jump to: navigation, search

The Hub object is composed of methods that allow you to interact with the settings and values of a hub. This object is available to Apps and Drivers via the Hub object "getLocation().getHub()" method or simply using the property "location.hub".

Properties

id

Long: An id for the hub. (Usually the value is 1 but not guaranteed)

name

String: The name of the hub as a String.

data

Map: A Map of data for the hub

zigbeeId

String: The Zigbee EUI

zigbeeEui

String: The Zigbee EUI

hardwareID

String: The hardware ID of the hub

type

String: The type of hub, always returns "PHYSICAL"

localIP

String: The local ip address of the hub

localSrvPortTCP

String: The local tcp port of the hub (always returns 39501)

firmwareVersionString

String: The current firmware version that the hub is running.

uptime

BigInteger: The uptime of the hub in seconds.

Methods

updateSystemTime

Update the date/time of the Hub.
Signature
boolean updateSystemTime(Date date)
Parameters
date - The date/time to update to.
Returns
boolean - True if update time is successful, false otherwise.