Z-Way Data Model Reference
This is the description of the data object (called Data Holder or DH).
General note: Z-Way objects and it's decendents are NOT simple JS objects, but native
JS objects, that does not allow object modification.
- name: Name of data tree element
- updated: Update time
- invalidated: Invalidate time
- valueOf(): Returns value of the object (can be omitted to get object value)
- invalidate(): Invalidate data value (mark is as not valid anymore)
- bind(function (type[, arg]) ..., [arg, [watchChildren=false]]): Bind function
to a change of data tree element of its descendants
- unbind(function): Unbind function bind previously with bind()
- Description: zway is the Z-Wave part of the object tree
- Syntax: zway.X with X as child object
- Child objects
- controller: controller object, see below for details
- devices: devices list, see below for details
- version: Z-Way.JS version
- isRunning(): Check if Z-Way is running
- isIdle(): Check if Z-Way is idle (no pending packets to send)
- discover(): Start Z-Way discovery process
- stop() : Stop Z-Way
- InspectQueue() : Returns list of pending jobs in the queue.
- item: [timeout, flags, nodeId, description, progress, payload]
- flags: [send count, wait wakeup, wait security, done, wait ACK, got ACK, wait response, got response, wait callback, got callback]
- ProcessPendingCallbacks(): Process pending callbacks (result of setTimeout/setInterval or functions called via HTTP JSON API)
- bind(function, bitmask): Bind function to be called on change of devices list/instances list/command classes list
- unbind(function) : Unbind function previously bind with bind()
- all function classes in are also methods of this data object
You can access the data elements of "controller" in the Z-WAVE EXPERT USER INTERFACE in menu
Network > Controller Info using the buttons Show controller data
and Show controller's device data.
- Description: Controller object
- Syntax: controller.X with X as child object
- Child objects
- data: Data tree of the controller
- homeId: Home ID of the controller
- nodeId: Node ID of the controller
- SISPresent: is SIS available (if TRUE, SUCNodeId is a SIS, otherwise it is SUC)
- SUCNodeId: Node ID of SUC or SIS or 0 if no SUC/SIS present
- isInOtherNetworks: is controller the original Primary or it is in other's network
- isPrimary: can controller include devices (Primary or Inclusion controller)
- isRealPrimary: is controller Primary Controller or SIS in the network
- isSUC: is SUC present
- libType: Z-Wave library type
- frequency: current frequency of the transceiver
- controllerState: current network management state of the controller
- lastExcludedDevice: Node ID of last excluded device
- lastIncludedDevice: Node ID of last included device
- secureInclusion: shall inclusion be done using Security: 0 (unsecure inclusion), 1 (S2 if possible, otherwise unsecure), 2 (S2 or S0 if possible, otherwise unsecure), 3 (S0 if possible, otherwise unsecure)
- caps: Z-Way license information
- softwareRevisionVersion: version of Z-Way build
- softwareRevisonDate: date of Z-Way build
- softwareRevisionId: git commit of Z-Way build
- manufacturerId / manufacturerProductId / manufacturerProductTypeId: IDs to identify the transceiver hardware
- vendor: name of hardware vendor
- APIVersion: Version of the Serial API of the transceiver firmware
- SDK: Z-Wave SDK version of the transceiver firmware
- ZWVersion: ZWave Version (firmware)
- ZWaveChip: Serie of the transceiver Z-Wave chip
- ZWlibMajor / ZWlibMinor: library version
- capabilities: array of Function Class IDs supported by the transceiver firmware
- functionClasses: ordered array of IDs of Function Classes
- functionClassesNames: ordered array of Names of Function Classes
- uuid: Z-Way transceiver firmware unique ID
- memoryGetAddress: address of last data stored in memoryGetData read by one of memory read function
- memoryGetData: last data read by one of memory read function
- countJobs: shall job be counted (nonManagementJobs and devices[x].data.queueLength)
- nonManagementJobs: number of non-management jobs in the queue
- deviceRelaxDelay: time in 10ms to wait before sending next command to same device (configurable in Defaults.xml)
- promiscMode: true if Zniffer promiscuous mode is enabled
- incomingPacket: last incoming packet from Z-Wave network
- nodeId: source Node Id
- dstNodeId: destination NodeId (usually the controller Id, but in primiscuous mode it will show the real destination)
- securePayload: decoded payload for secure packet (if decoding was possible)
- RSSI: RSSI level
- frameType: packet type: "Explore Frame", "broadcast", "multicast", "singlecast"
- hops: array of repeaters nodes, zero means no more repeaters
- duplicate: the number of repetition of this packet, >0 means it is a duplicate
- outgoingPacket: last outgoing packet to Z-Wave network
- delivered: was the packet delivered
- deliveryTime: delivery time in 10 ms
- packetLength: packet length
- nodeId: nodeId
- returnRSSI: array of RSSI levels the recipient and hops have detected
- hops: array of repeaters nodes, zero means no more repeaters
- returnChannel: the channel of the ACK
- txChannel: the channel of the outgoing packet
- speed: used speed
- schemeState: used scheme state
- tries: number of retries
- lastFailPath: array of two nodes at which the last failure occured (if the packet was not delivered): last working repeater on the path and the unreachable repeater
- securePayload: unencrypted payload for a secure packet
- curSerialAPIAckTimeout10ms: timing parameter of Serial API
- curSerialAPIBytetimeout10ms: timing parameter of Serial API
- oldSerialAPIAckTimeout10ms: previous timing parameter of Serial API
- oldSerialAPIBytetimeout10ms: previous timing parameter of Serial API
Function classes as shown in section are called as methods of the object zway.controller.
The devices object contains the array of the device objects. Each device in the network - including the
controller itself - has a device object in Z-Way.
- Description: list of devices
- Syntax: devices.X with X as child object
- Child objects
- Device object
- length: Length of the list
- SaveData(): Save Z-Way Z-Wave data for hot start on next run (in config/zddx/HOMEID-DevicesData.xml)
The data object can be accesses in the Z-WAVE EXPERT USER INTERFACE in advanced mode of 'Configuration'
- Description: the device object
- Syntax: devices[n].X with X as child object
- Child objects
- id: (node) Id of the device
- Data: Data tree of the device
- SDK: SDK used in the device firmware
- ZDDXMLFile: file of the Devcie Description Record
- ZWLib: Z-Wave library used in the device firmware
- ZWProtocolMajor / ZWProtocolMinor: Z-Wave protocol version
- applicationMajor / ApplicationMinor: Application Version of devices firmware
- manufacturerId / manufacturerProductId / manufacturerProductTypeId: ids used to identify the device
- basicType: Z-Wave Basic Type
- genericType: Z-Wave Generic Type
- specificType: Z-Wave Specific Type
- deviceTypeString: verbal Z-Wave Device Class
- vendorString: verbal vendor name
- nodeInfoFrame: Node Information Frame (NIF) array
- isLR: is device a Long Range device
- isSmartStart: was the device included using SmartStart inclusion
- isListening: is always listening
- isAwake: is currently awake
- keepAwake: shall the device be kept awake even if there is nothing to send to it
- isRouting: is abale to send routed unsolicited packets
- sensor1000: device is a FLiRS with 1000 ms wakeup
- sensor250: device is a FLiRS with 250 ms wakeup
- isVirtual: is virtual device from a bridge controller
- option: are optional Command Classes present in addition to mandatory for this Device Class
- infoProtocolSpecific: internal information about the device
- interviewDone: set to true when device finishes the interview (might not match with interviewDone on individual CCs if they appear after interview done)
- unsolicitedReportOnSet: if set, do not send a Get after Set and wait for an unsolicited Report. If no Report within few seconds, send an explicit Get. By default for all Z-Wave Plus product where Z-Way is in association group 1 (LifeLine group).
- acceptSetSecurityLevel: accept Set commands from devices to Z-Way with lower security levels. 0 - accept all packets, 128 - accept S0 and S2 packets, 1 - accept S2 packets, 2 - accept S2 Authenticated and Access packets, 4 - accept only S2 Access packets, -1 or not set - use the most secure level (default).
- acceptReportSecurityLevel: accept Report commands from devices to Z-Way with lower security levels. 0 - accept all packets, 128 - accept S0 and S2 packets, 1 - accept S2 packets, 2 - accept S2 Authenticated and Access packets, 4 - accept only S2 Access packets, -1 or not set - use the most secure level (default).
- mapBasicSetToSpecificReport: if set, interpret Basic Set commands as if it was a specific Report (Sensor Binary or Switch Binary report)
- securityS2ExchangedKeys: the bitmast of exchanged security keys. 128 for S0, 1 for S2 Unauthenticated, 2 for S2 Authenticated, 4 for S2 Access
- secureChannelEstablished: set to true if secure channel was established
- guessS2Keys: set to true to force guest security keys on force interview
- secureAllCCs: if set, Z-Way will encrypt all packets a device with negociated security even if the CC is allowed unsecure (default is from Defaults.xml SecureAllCCs)
- neightbours: list of neighbour nodes
- priorityRoutes: list of priority routes assigned to the node (via AssignPrioritySUCReturnRoute and AssignPriorityReturnRoute) used to restore routes on network reorganization
- hop 1, hop 2, hop 3, hop 4, speed: route hops node Id (1..232 or 0 for end of route), speed flag
- givenName: name for Expert UI
- isFailed: is failed
- failureCount: number of tries since last device failed
- lastRecevied: timestamp of last packet received
- lastSend: timestamp of last sent operation
- lastPacketInfo: structure with deliveryTime, delivered and packetLength information about last packet sent
- queueLength: length of device specific send queue (if countJobs is enabled)
- lastNonceGet: internal
- acceptSetSecurityLevel: minimal security level that is accepted for Set commands from the device: 0 - accept both secure S0/S2 or unsecure Set commands, 128 - accept S0 and all S2 levels, 1 - accept all S2 levels (Unauthenticated, Authenticated and Access), 2 - accept S2 Authenticated and S2 Access, 4 - accept only S2 Access
- instances: Instances list of the device
- RequestNodeInformation(): Request NIF
- RequestNodeNeighbourUpdate(): Request routes update
- InterviewForce(): Purge all command classes and start interview based on device's NIF
- RemoveFailedNode(): Remove this node as failed. Device should be marked as failed to remove it with this function.
- SendNoOperation(successCallback = NULL, failureCallback = NULL): Ping the device with empty packet (even if device is not reachable successCallback is called - use isFailed to check device availability)
- LoadXMLFile(file): Load new Z-Wave Device Description XML file. See http://pepper1.net/zwavedb/
- GuestXML(): Return the list of all known Z-Wave Device Description XML files with match score. [score, file name, brand name, product name, photo]
- WakeupQueue(): Pretend the device is awake and try to send packets
- AssignReturnRoute(target): Send device new routes to target node
- DeleteReturnRoute(): Clear routes in device
- AssignSUCReturnRoute(): Inform device about SUC and route to reach it
Each device may have multiple instances (similar functions like switches, same type
sensors, ...) If only one instance is present the id of this instance is 0. Command
classes are located in instances only.
- Description: list of instances
- Syntax: devices[n].instance[m].X with X as child object
- Child objects
m | : instance object
- length: Length of the list
- commandClasses: list of command classes of this instance. In case there is only one instance, this is equivalent to the list of command classes of the device. For details see below.
- Data: data object of instance
- dynamic: flag if instance is dynamic
- genericType: generic Z-Wave device class of instance
- specificType: specific Z-Wave device class of instance
|
This is the Command Class object. It contains public methods and public data elements that are described
in chapter
- Description: Command Class Implementation
- Syntax: device[n].instance[m].commandclass[id].X with X as child object
- Child objects
- id: Id of the Command Class of the instance of the device
- data: Data tree of the Command Class
- interviewCounter: number of attempts left until interview is terminate even if not successful
- interviewDone: flag if interview of the command class is finished
- security: flag if Command Class is operated under Security Command Class
- version: version of the Command Class implemented in the device
- supported: flag if Command Class is supported or only controlled
- commandclass data: Command Class specific data - see chapter for details.
- name: Command Class name
- Method: Command Class method - see chapter for details.