Hacking support for Z-Wave Central Scene Command Class
Posted: Mon Aug 31, 2015 4:54 am
So I've been playing recently with a pretty nifty 8-button Z-Wave controller that complies to the central scene command class. Indigo doesn't support it yet, but I'm keen to demonstrate it and try it out in my own house and show it off to some clients.
Indigo does add the device and does log the Z-Wave responses and requests. Indigo does request, interpret, and display the battery level status. As for button presses, button held down, button double clicks, etc, it just spits out the Z-Wave requestReply coming from the controller such as:
Single click:
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 76 00 01 D9 (hex)
Byte 6 is the device number, 0x03 in this case.
Byte 12 is the button number, 0x01 in this case.
Byte 10 is the level, 0x76 in this case (up from 0x75) (decimal 118)
Byte 11 is the type of press, with 0x0 being a single click.
Double click:
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 79 03 01 D5 (hex)
Byte 11 is 0x03
Button held-down:
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 7A 02 01 D7 (hex)
.
.
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 81 02 01 2C (hex)
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 82 02 01 2F (hex)
.
.
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 83 01 01 2D (hex)
Byte 11 is 0x02 when held down
When released, byte 11 changes to 0x01, marking the end of the user's intention.
What I think would work:
Turn on Z-Wave debug logging
Use SQL Logger plug-in and ensure that event log entries are stored in the database
Use an external python script that monitors the sqlite db.
Whenever the script detects changes, it checks to see if any of the above are present. Obviously I will need to account for different device numbers and button numbers. Then it matches it to some pre-defined action group and executes it via the REST API.
This is basically a quick idea I've had and will most likely go ahead and try to implement it sometime this week after work. If anyone thinks it's off or there's a better way, do let me know please.
What would be awesome is if Indigo allowed us to define our own device files, etc for unknown/unsupported Z-Wave devices.
Indigo does add the device and does log the Z-Wave responses and requests. Indigo does request, interpret, and display the battery level status. As for button presses, button held down, button double clicks, etc, it just spits out the Z-Wave requestReply coming from the controller such as:
Single click:
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 76 00 01 D9 (hex)
Byte 6 is the device number, 0x03 in this case.
Byte 12 is the button number, 0x01 in this case.
Byte 10 is the level, 0x76 in this case (up from 0x75) (decimal 118)
Byte 11 is the type of press, with 0x0 being a single click.
Double click:
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 79 03 01 D5 (hex)
Byte 11 is 0x03
Button held-down:
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 7A 02 01 D7 (hex)
.
.
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 81 02 01 2C (hex)
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 82 02 01 2F (hex)
.
.
RCVD requestReply1: 01 0B 00 04 00 03 05 5B 03 83 01 01 2D (hex)
Byte 11 is 0x02 when held down
When released, byte 11 changes to 0x01, marking the end of the user's intention.
What I think would work:
Turn on Z-Wave debug logging
Use SQL Logger plug-in and ensure that event log entries are stored in the database
Use an external python script that monitors the sqlite db.
Whenever the script detects changes, it checks to see if any of the above are present. Obviously I will need to account for different device numbers and button numbers. Then it matches it to some pre-defined action group and executes it via the REST API.
This is basically a quick idea I've had and will most likely go ahead and try to implement it sometime this week after work. If anyone thinks it's off or there's a better way, do let me know please.
What would be awesome is if Indigo allowed us to define our own device files, etc for unknown/unsupported Z-Wave devices.