Sound Switch
Version supported : 2
Interview process
For each tone number reported : Tone Info Get
Command Class Commands
Tones Number Get
Trigger on undefined reported value of TONES_NUMBER
Tones Number Report
Mapping between Report command and attribute store :
Z-Wave Command Attribute |
Z-Wave Attribute Store |
---|---|
|
|
Tone Info Get
Trigger on undefined reported value of TONE_INFO_IDENTIFIER
Mapping between attribute store and Get command :
Z-Wave Attribute Store |
Attribute State |
Z-Wave Get Field |
---|---|---|
|
Desired |
|
Tone Info Report
Mapping between Report command and attribute store :
Report Field Command |
Z-Wave Attribute Store |
---|---|
|
|
|
|
|
None. Deducted from |
|
|
Configuration Set
Trigger on new desired value of :
CONFIGURED_DEFAULT_VOLUME
CONFIGURED_DEFAULT_TONE_IDENTIFIER
Note
Trigger function is mapped to both attributes. Any of those attributes that have a desired value will trigger this function. The Set command look for desired and reported value so you don’t have to set both desired values.
Mapping between attribute store and Set command :
Z-Wave Attribute Store |
Attribute State |
Z-Wave Set Field |
---|---|---|
|
Desired else reported |
|
|
Desired else reported |
|
Configuration Get
- Trigger on undefined reported value any of :
CONFIGURED_DEFAULT_VOLUME
CONFIGURED_DEFAULT_TONE_IDENTIFIER
Note
Trigger function is mapped to both attributes. Any of those attributes that doesn’t have a reported value will trigger this command.
Configuration Report
Mapping between Report command and attribute store :
Report Field Command |
Z-Wave Attribute Store |
---|---|
|
|
|
|
Tone Play Set
Trigger on new desired value of TONE_PLAY
TONE_PLAY
represent the current node played. It follows the Table 2.517 of the Z-Wave specification.
Value |
Description |
---|---|
0x00 |
No tone is currently played |
0x01..0xFE |
Specific tone is played |
0xFF |
Default tone is currently played |
Mapping between attribute store and Set command :
Z-Wave Attribute Store |
Attribute State |
Z-Wave Set Field |
---|---|---|
|
Desired else reported |
|
|
Desired else reported |
|
Tone Play Get
Trigger on undefined reported value of TONE_PLAY
Tone Play Report
Mapping between Report command and attribute store :
Z-Wave Command Attribute |
Z-Wave Attribute Store |
---|---|
|
|
|
|
Unify Clusters
UAM files
UAM File |
Cluster |
Comments |
---|---|---|
|
|
Used to control volume and current tone |
|
|
Used to play/stop tone |
Bindings
Z-Wave Attribute Store |
Cluster attribute |
Comments |
---|---|---|
0 |
Level MinLevel |
Z-Wave -> Cluster (Read only) |
100 |
Level MaxLevel |
Z-Wave -> Cluster (Read only) |
1 |
Level MinFrequency |
Z-Wave -> Cluster (Read only) |
|
Level MaxFrequency |
Z-Wave -> Cluster (Read only) |
|
Level CurrentLevel |
Z-Wave <-> Cluster (Read/Write) |
|
Level CurrentFrequency |
Z-Wave <-> Cluster (Read/Write) |
|
OnOff On/Off |
Z-Wave <-> Cluster (Read/Write). |
|
OnOff OnTime |
Z-Wave <- Cluster (Write) |
TONE_PLAY
is mapped to 2 clusters attributes :
// Workaround to allow to send a specific tone ID though this attribute.
//
// The OnOff UCL cluster only support boolean states and we need a uint8_t to be able to
// send specific toneID though the Play Set command.
//
// There is 3 way to do this :
// - Add an attribute to an existing UCL cluster
// - Add a whole new cluster for sound switch
// - Map this functionality to an unused property.
//
// The latest has been choosen to avoid changes on clusters. This approach might change
// in future release, don't take this as a reference for now.
//
// With this workaround we can :
// - Play the default tone (255) with the ZCL OnOff attribute (1)
// - Stop the tone (0) with the ZCL OnOff attribute (0)
// - Play specific tone (1-254) with the ZCL OnTime attribute (1-254) that will be "copied" into our ATTRIBUTE_COMMAND_CLASS_SOUND_SWITCH_TONE_PLAY
// - It can be controlled by the command WriteAttribute of the OnOff cluster though MQTT : ucl/by-unid/+/ep0/OnOff/Commands/WriteAttributes {"OnTime":2}
Command actions
Action |
MQTT Topic |
Comments |
---|---|---|
Change default tone to 12 |
|
On Command will play this tone. |
Change default volume to 12 |
|
Each tone will be played with this volume. |
Play default tone |
|
Will set |
Stop tone |
|
Will set |
Play specific tone (tone 12) |
|
Will set |