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.
idLong: An id for the hub. (Usually the value is 1 but not guaranteed)
nameString: The name of the hub as a String.
dataMap: A Map of data for the hub. It contains hardwareID plus any entries added with addData(), and also includes these runtime values:
localIP - String: the hub's IP addresslocalSrvPortTCP - String: the hub's TCP portzigbeeEui - String: the Zigbee EUI (may be null)zigbeeChannel - String: the Zigbee channel (null if network information is unavailable)zigbeePanID - String: the Zigbee PAN ID (null if network information is unavailable)zigbeeIdString: The Zigbee EUI
zigbeeEuiString: The Zigbee EUI
hardwareIDString: The hardware ID of the hub (normally 000D)
typeString: The type of hub, always returns "PHYSICAL"
localIPString: The local ip address of the hub
localSrvPortTCPString: The local tcp port of the hub (always returns 39501)
firmwareVersionStringString: The current firmware version that the hub is running.
uptimeBigInteger: The uptime of the hub in seconds.
versionLong: The hub version (may be null).
locationIdLong: The id of the location the hub belongs to (may be null).
updateSystemTimeUpdate the date/time of the Hub.
boolean updateSystemTime(Date date)date The date/time to update to.boolean - true if update time is successful, false otherwise.addDataAdd entries to the hub's data map.
void addData(Map newData)newData - A Map of entries to add, with String keys. Ignored if empty or null.getDataSortedGet a copy of the hub's stored data, sorted by key. Only stored entries are included, not the runtime values (such as localIP) that data adds.
Map getDataSorted()Map - a new Map of the stored data entries, sorted by keygetDataValueGet one hub data value by name.
String getDataValue(String name)name - The data key. The supported dynamic keys are localIP, localSrvPortTCP, and zigbeeEui.String - the value, or null for an unsupported keyisBatteryInUseDetermine whether the hub is running on battery power.
Boolean isBatteryInUse()Boolean - always false, because the hub uses mains powertoMapConvert the hub to a Map.
Map toMap()Map - with these keys:
id - Long: the hub id (may be null)name - String: the hub name (may be null)version - Long: the hub version (may be null)locationId - Long: the location id (may be null)data - Map: the hub's data, as described for the data property