Best forex management account17 comments
The definition metadata defines core information about your Device Handler. The initial values are set from the values entered when creating your Device Handler.
The closure defines the capabilities, attributes, commands, and fingerprint information for your Device Handler. To define that your device supports a capability, simply call the capability method in the closure passed to definition. The argument to the capability method is the Capability name. If you need to define a custom attribute for your Device Handler, call the attribute method in the closure passed to the definition method:.
To define a custom command for your Device Handler, call the command method in the closure passed to the definition method:.
Then, when a device is added, its join information is compared to all fingerprints in the default handlers and your self-published handlers to determine which type of device it is. You can also include the manufacturer and model name in the fingerprint to limit the fingerprint to a specific product:.
Z-Wave fingerprints used to be based on the format used for ZigBee, but there is now a new format that is preferred. You may see the original fingerprints on older Device Handlers; see below for information on the legacy format. The best place to start is to add your device to SmartThings and look for the Raw Description in its details view in the SmartThings developer tools.
Z-Wave devices added since the introduction of the new format will have raw description strings with multiple key-value fields, such as:. For example, the fingerprint to match the raw description example above would be:. No other parameters are required. Note that you need to add quotes and commas to the more concise raw description format to make it valid Groovy code. If you are writing a general Device Handler that supports all devices of a certain type, you can still base the fingerprint on command class support.
That fingerprint would match all devices of the Binary Switch generic device class — i. When fingerprints have the same rank, self-published Device Handlers take precedence over the default production ones. Legacy fingerprints include the device class — or type value see above — in the deviceId parameter and the command classes it supports in the inClusters parameter.
A Device Handler can have multiple fingerprints in order to work with multiple versions of a device. Each fingerprint is independent. If any of them is the highest ranking match, the device will use your device type.
The order of the inClusters and outClusters lists is not important to the pairing process. It is a best practice, however, to list the clusters in ascending order. The device can have more clusters than the fingerprint specifies, and it will still pair. If one of the clusters specified in the fingerprint is incorrect, the device will not pair. If you copied a working fingerprint from a default or template handler, it would be ambiguous which type should match if yours was published.
The easiest way to remedy this is to include manufacturer and model info in all fingerprints. SmartThings Developer Documentation latest.
The possible values for this attribute. You must also define a method in your Device Handler with the same name. An ordered list of the parameter types for the command method, if needed.
The fingerprinting process differs between ZigBee and Z-Wave devices. Home Automation SEP: An example of a ZigBee fingerprint definition: For example, the fingerprint to match the raw description example above would be: Read the Docs v: