[BETA] Z-Wave Tweaker

developers
z-wave
dth_misc

(codersaur) #1

#Z-Wave Tweaker
Version: 0.08 (2017-03-16)
Source: https://github.com/codersaur/SmartThings/tree/master/devices/zwave-tweaker


This is a device handler to assist with interrogating and tweaking Z-Wave devices. It’s designed for end-users who want to tweak their devices and for developers who want to quickly discover and report the functionality of new devices. It is intended to temporarily replace a device’s normal device handler.

Key features in v0.08:

  • Discover association groups, multi-channel endpoints, and configuration parameters.
  • Configure association group members from the SmartThings GUI.
  • Configure parameter values from the SmartThings GUI.
  • Configure Protection and Switch_All modes from the SmartThings GUI.
  • Discover supported meter/alarm/notification/sensor report types.
  • Automatically build a complete list of the Z-Wave commands sent by a device.
  • Support for Z-Wave and Z-Wave Plus devices.
  • Extensive inline code comments to support community development.

Main screens:

Example Output:

General Info:

Discovered Association Groups:


Discovered Endpoints:

Discovered Parameters:

Comands:

Full installation instructions and a user guide can be found on github: https://github.com/codersaur/SmartThings/tree/master/devices/zwave-tweaker

All feedback welcome!

Z


Is there a way to set up a z-wave association between two devices?
[BETA] GE/Jasco Z-Wave Plus Dimmer Switch With Double-Tap, Associations, And All Configuration Options
Need Help Making a Device Handler for Leviton DZ6HD Dimmer
How do I return this useless piece of rubbish?
Fibaro dimmer 2 (fgd 212) with dual lights
[RELEASE] Qubino Flush 1D Relay, Flush 2 Relays, Flush 1 Relay, & Flush Dimmer
Aeon Home Energy Meter
Dragon Tech WS-100 - Z-Wave Plus -On/Off Switch Anyone?
Smart Hot Water Recirculation Solution
Led indicator light not working on GE 14294 Dimmer
HomeSeer HSM100 Z-Wave MultiSensor
Aeon Smart Dimmer 6 device type now available
Fibaro Relay Switch 1X3kw
Is anyone working on Leviton Vizia RF +?
[RELEASE] Aeon WallMote Dual & Quad - 2 & 4 Button
Aeon Labs panic button stopped working
[RELEASE] Aeon Multisensor 6 (Advanced)
Qubino and Smartthings
"Device Handler for Dummies"? Any suggestions for a newbie?
How to set Multichannel Associations to endpoints of a device
Sending Configuration Parameters
Z-Wave Library Changes Feb 2017
Why do Aeotech Multisensor 6 devices go from 100% batteries to dead in weird ways? EEs?
Turn Off Power Notifications on SmartThings Power Outlet
Remove Dimming Capability
How do I determine/query the list of capabilities for a Z-Wave Device?
FAQ: CONFIRMED: Local Processing - Working Device Handlers
GE Switch button's reversed
Device Parameters
Space Heater Outlet
Creating Signal Strength device handler
One physical light switch to control a separate smart switch?
Wiring Switches/Dimmers in Banks
Multiple Aspire RF9500 having unwanted crosstalk
Syntax: How to delay a command?
Too many missing entries in the IDE Log
Are all Z-Wave switches compatible?
Wireless Wall Switch (ZME_WALLC-S) to control Smartthings devices and routines
Aeotec Nano Dimmer Features
Use Cooper RFWC5 as a multi button switch?
Cooper Aspire RF syncing master and auxiliary switches
Pass command to another zwave device
FAQ: How can I change the parameters on a Zwave device?
Delayed piston execution how to troubleshoot
Aeotec Nano Switch Wiring?
Blind Roller Shutter rate control
Dimmer module that can be set to ramp up
Turn On instead of "Dim On" - GE Z-Wave Lighting Module, 12718
Change Parameter 11 on MIMOlite
Delayed piston execution how to troubleshoot
2 way switch wiring questions
Help with WT00Z when used manually
GE Portable Smart Motion Sensor problems (DTH in post 40)
Aeotec Nano Dimmer - Slow Dim Speed
Aeotec Nano Dimmer - Slow Dim Speed
Fade between 2 levels (GE dimmers)
[RELEASE] Qubino Flush 1D Relay, Flush 2 Relays, Flush 1 Relay, & Flush Dimmer
Aeotec Nano Dimmer Features
Associating the WT00Z and the WS15Z-1?
Evolve LTM-5 transmitter to LRM-AS association
Z Wave Tweaker Switch Association help needed
GE 12726 40 amp outdoor switch
Configuration Set command?
Wireless Switch for New Light in UK - Best Solution?
Z-wave virtual 3-way switch
Fibaro Motion Sensor - New device-handler with all settings and auto sync feature
Everspring In-wall On/Off Module - AN179. Is there a device handler?
Aeon micro v2 (non energy) specific device drivers
Device handler for Fibaro heat controller
Linear WO15Z-1 Nuisance with LED light
New GE switches: anyone have hands on using their associations capability?
FAQ: How zwave direct association changed with zwave plus
[DEPRECIATED] Jasco/GE Motion Dimmer Switch 26933
Aeotec Aeon Nano Dimmer
Leviton releases 5 zwave plus devices--solves low load glow problem
Aeotec Aeon Dry Contact Sensor
Aeon Labs Garage Door Controller
Fibaro RGBW sets off lights everywhere, but only when physically activated
FAQ: Solution for Linear/GoControl 3-way switches? (WD500Z-1 and WT00Z-1) (Association options)
Hogar Touch Panel Switch - Has anyone written a device handler for this?
New Fibaro switches FGS-213/223
Vitrum / multichannel / z-wave UK. Any DTH for these?
Alternative usage of Monoprice Garage door sensor
Fibaro FGS-212: trouble sending commands to it
(Ron Talley) #2

Awesome Sauce! This should make it way easier for noobs to get into developing DTH!

Thanks.


#4

Very slick! :sunglasses:

Tagging @duncan @tyler @gausnes @jodyalbritton @slagle @Robert_Vandervoort @krlaframboise @adamv @Fuzzyligic @erocm1231


#5

Holy awesome sauce!


(Eric M) #6

@zcapr17 Very cool! I was actually working on something similar, but never got around to finishing it. Yours looks much more involved any way so well done. The long term goal I wanted to achieve was to provide developers with a few commands and methods that they could put into their device handlers for the SmartApp to interact with. For example.

command “configurationSet” [“number”, “number”]
command “associateGroup”, [“number”, “list”]

For an example of the method that would need to be placed in a handler you can see Generic Z-Wave Association Handler and the SmartApp Z-Wave Direct Association Tool.

My version was far from finished and I really don’t have time to anyway. Plus what you have done is fantastic work. Not sharing this info as any indication of competing, I just think it would be cool to have a common way to interface your tool with current and new device handlers (in addition to having a temporary tool device handler).


(codersaur) #7

I considered controlling this kind of thing with a SmartApp, but unless there is a widely-adopted standard capability/interface then I can’t see it getting off the ground. Some kind of “Z-Wave Configurable” capability perhaps…?

I think a better solution would be for SmartThings to simply handle tweaking of Z-Wave device parameters and association groups etc. natively as part of the platform (i.e. just another auto-generated section of the settings screen).


(Chris Nussbaum) #8

First off I want to say awesome job on this. I find my self often temporarily adding code into an existing DTH to try and do just some of what you have done with a UI to boot. I see this becoming one of my regular tools for working with Z-Wave devices. I did find a small bug (it maybe something unique to the device I am working with it seems to be misbehaving in general). Every time it tried to initialize I would get a null reference error. The issue was that the list of command ID’s had a null entry. I added the line “ccIds.removeAll([null])” to the section of the initialize function that parses the fingerprint and it solved the issue:

// Parse fingerprint for supported command classes:
def ccIds = []
if (getZwaveInfo()?.cc) {
    logger("Device has new-style fingerprint: ${device.rawDescription}","info")
    ccIds = getZwaveInfo()?.cc + getZwaveInfo()?.sec
    ccIds.removeAll([null])
}
else {
    logger("Device has legacy fingerprint: ${device.rawDescription}","info")
    // Look for hexadecimal numbers (0x##) but remove the first one, which will be deviceID.
    ccIds = device.rawDescription.findAll(/0x\p{XDigit}+/)
    if (ccIds.size() > 0) { ccIds.remove(0) }
}

(codersaur) #9

Added in v0.08.


(Tim Slagle) #10

(Eric M) #11

Yes, I have been wanting this for years . . .


(Tony - SmartThings Unpublished Contributor ) #12

Truly great work putting this amazing (and very helpful) DTH together! Thank you, thank you, thank you.


(Jared) #13

Has anyone tested this with Leviton DZ6HD Dimmers? When I click on Scan General for that kind of device I get:
scanGeneral(): Scanning for common device attributes

And then nothing. Same for Scan Params.


(codersaur) #14

What do you get from the print commands?


(Jared) #15

For the ‘Print General’ I get:
Device Name: Dining Room
Raw Description: zw:L type:1101 mfr:001D prod:3201 model:0001 ver:1.13 zwv:4.33 lib:03 cc:5E,85,59,86,72,70,5A,73,26,20,27,2C,2B,7A ccOut:82 role:05 ff:8600 ui:8600
Supported Command Classes: [BASIC (0x20), SWITCH_MULTILEVEL (0x26), SWITCH_ALL (0x27), SCENE_ACTIVATION (0x2B), SCENE_ACTUATOR_CONF (0x2C), ASSOCIATION_GRP_INFO (0x59), DEVICE_RESET_LOCALLY (0x5A), ZWAVEPLUS_INFO (0x5E), CONFIGURATION (0x70), MANUFACTURER_SPECIFIC (0x72), POWERLEVEL (0x73), FIRMWARE_UPDATE_MD (0x7A), ASSOCIATION (0x85), VERSION (0x86)]
Security: Device is not using security.
Manufacturer ID: null
Manufacturer Name: null
Product Type ID: null
Product ID: null
Firmware Metadata: Firmware ID: null, Checksum: null
Application (Firmware) Version: null
Z-Wave Protocol Version: null
Z-Wave Library Type: null
Powerlevel: null
Protection Mode: [ Local: null (null), RF: null (null) ]
Switch_All Mode: null (null)

For the ‘Print Params’ I get:
2:42:17 PM: info Parameters [0]:

I doesn’t seem to be able to scan the parameters.


(codersaur) #16

Possibly the tweaker is trying to use security when it shouldn’t. Try editing the DTH code so encapCommand() is as follows:

private encapCommand(physicalgraph.zwave.Command cmd) {
    return cmd
}

Save and re-publish, then try again.


(Jared) #17

Tried that but the results are the same.


(codersaur) #18

ok, even though the device doesn’t advertise support for security, you could try the opposite (i.e. force security), by changing to:

private encapCommand(physicalgraph.zwave.Command cmd) {
    return zwave.securityV1.securityMessageEncapsulation().encapsulate(cmd)
}

or forcing CRC encapsulation:

private encapCommand(physicalgraph.zwave.Command cmd) {
    return zwave.crc16EncapV1.crc16Encap().encapsulate(cmd)
}

if both those options fail, return the tweaker code to the original, and try excluding and re-adding the device.


(Pavol Babinčák) #19

I’d like to share a success story with Z-Wave Tweaker. Thank you David, it is really awesome!

My setup: I have two lights that I wanted to control with a separate switch. Both lights can be controlled by Fibaro Dimmer 2 modules. Switch is button powered Z-Wave.me ZME_WALLC-S. Neither of these devices by SmartThings natively so for Dimmer 2 I use device handler from David. For switch I use Device Handler made by AdamV.

First attempt to control lights was by Smart Lightning app. It was pretty easy to configure but lights reaction after switch presses were pretty slow and jitter pretty big: from 2 to about 30 seconds.

Second attempt is with Z-Wave associations. I had to read quite a lot to understand how it works.

Gotcha: switch is battery operated device. Easiest way to configure it is to enter management mode (press all buttons at once for about 5 seconds until green light starts blinking) and use 2nd button (top right). This way switch won’t get to sleep for 10 seconds.

It took me some time to find out that I had to hit scan param and association button first. Only after that Z-Wave Tweaker allowed me to set params.

In the end I have ended up with following configuration:

  • Parameter #12: [id:12, scaledConfigurationValue:1, size:1]. Even though manual says it is default my switch had value 2 there.
  • Parameter #14: [id:14, scaledConfigurationValue:1, size:1].
  • Association Group #3: [id:3, maxNodesSupported:10, multiChannel:true, name:Group B, nodes:[00, 03, 01]]. 03 is dimmer’s network id in my network.

Now my lights respond to button pushes under 1 second! And as a bonus I can dim my lights.

Finally a proof: https://youtu.be/5-jAyrgdUso


#20

Excellent! Thank you so much!


(Joey Leslie) #21

Hi all. With the help of @ccheng I’ve been pointed to the Tweaker DH by @zcapr17 to try and get the new Aeotec Nano Dimmer functional in my system.

Was able to get logs of all parameters (had to use Print function in Tweaker).

I understand how to change a few parameters that I need. In my case they are 249, 129 and 130. I was able to change 249 and it immediately synched and showed up in the log.

28bf874c-dac4-4ca0-ab8e-1cac690b3dba 7:14:10 PM: info Parameter #249: Size: 1, Value: 2
28bf874c-dac4-4ca0-ab8e-1cac690b3dba 7:14:08 PM: info Parameter #249: Size: 1, Value: 0
28bf874c-dac4-4ca0-ab8e-1cac690b3dba 7:14:07 PM: info sync(): Syncing parameter #249: Size: 1, New Value: 2

I need to change 129 and 130 to see if i can get the Dim function to work. The Tweaker app shows pending synch and doesn’t change. I’ve left it for 15 min. If i go mess with other functions eventually the synch with turn green but the parameter change i requested isn’t there. Immediately after changing a parameter i get this:

28bf874c-dac4-4ca0-ab8e-1cac690b3dba 7:15:23 PM: info Parameter #129: Size: 1, Value: 0
28bf874c-dac4-4ca0-ab8e-1cac690b3dba 7:15:22 PM: info Parameter #129: Size: 1, Value: 0
28bf874c-dac4-4ca0-ab8e-1cac690b3dba 7:15:22 PM: info sync(): Syncing parameter #129: Size: 1, New Value: 2

Any ideas/suggestions on getting Tweaker to change these two parameters? I’ve tried it with light on and off. I’ve closed apps, restarted, replaced the DH and back to Tweaker. Can’t seem to push a parameter change.

Thanks!