Continuing the discussion from [Linear WA00Z1 Smart Light Switch Cover (US)]
Added a thread for you in the developers section. Folks here can probably give you the most help.
For those unfamiliar with it, this new device is basically a battery-operated two button wallmount Minimote. The idea is it fits over an existing light switch so you no longer have the problem of people turning off power to smart bulbs.
@ajpri has made a great start at a device handler, but would like some more help with it.
However, I am not sure if this will pair devices to the device type. When a button is pressed on the switch, it sends a wakeup, central scene notification, and battery life info.
Also, I got inverting buttons working, preference defined in line 61, and sent to device in line 107. The command being sent every time the device is woken up. Is this good or is there a better way? Feels like it could drain the battery.
Final point is on making the device type better - optimizing the code to be efficient, and the best it can be.
Tagging @AdamV and @tgauchat in case they have any suggestions.
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
4
Gotta remember to come back to this one and try to help (or see if otherās have helpedā¦).
ZigBee (EDIT: oopsā¦ Z-Wave! ref: @JDRoberts belowā¦) pairing (and configuring) is still too complex, though SmartThings has added a bunch of new, mostly undocumented commands (so far), but very satisfying when you get it working. Like magic it seems.
Need some time to read this through and cross reference my meager knowledge so far and/or look up the experts to tag. Ah ā¦ @JohnR has been extremely helpful to me and othersā¦ but not sure if he is only ZigBee expert or also Z-Wave.
Why are you not sure if devices will pair to the device type? I was able to test my OSRAM switch that I am working on by removing it from ST, performing a reset, and re-connecting it to see if it would pair to the correct device type. I am looking to get at least one so when I do I can test but someone else will likely get to that before me.
As far as fingerprinting is going, my fingerprint is not auto-identifying. Messed around with it a few times, still showing up as āZ-wave Deviceā. Stressing me out a bit. Once I master fingerprinting, Iāll write a tool that takes the raw description and makes a fingerprint.
Technically only zigbee devices have fingerprints. But SmartThings uses the same term for zwave devices as well. (Zwave devices donāt have āclustersā either, but again SmartThings takes a Zigbee term and uses it for all protocols.)
Just wanted to mention it because it can lead to some confusion if you review outside resources.
This is the ST documentation on āfingerprintingā a Zwave device.
I will say that I found when I added manufacturer and model on mine it would not pair with the device type, leaving the manufacturer and model commented out worked for my OSRAM Dimmer Switch device type. I suspect you have to have these strings exactly as the device would report and I havenāt figured out how to get the manufacturer and model string from the device, I have not seen any messages at join that would indicate it either, wondering if not specifying it for mine works because the device doesnāt actually report it.
Personally Iāve never understood the fingerprinting. Iāve made some devices where it picks it up and matches it straight away, and others where it does not. No clue what seems to push it one way or the other!
@ajpri, I was looking at your fingerprint and wondering why you are not using all the published clusters? I know that @JDRoberts said that z-wave doesnāt use āclustersā but that is what ST calls them so that is what I will call them. When I look at the raw description the āfā indicates that there should be 15 clusters and you are only using 6 of them. If I were to take the raw description the fingerprint I would come up with is below.
If you try that does it pair properly? It may be that the fingerprint you are specifying is not matching the device since you are not specifying all of the āclustersā that the device is reporting.
@Motley, You were very close, but everything before the mark (0xEF) is considered inClusters (supported class), and after are outClusters (controlled classes).
This post helped answer it for me, but thanks for the guidance.
The Fingerprint isā¦
Glad you figured it out and got it working, my switch will be here in 3-4 days. Good to know that the 0xEF is the command class mark, the device type I wrote was a zigbee device type and for that it is slightly different, the first mark (after deviceID) says how many inClusters there are and then after those inClusters are defined the next mark says how many outClusters will be defined and then they are defined. Looks like for z-wave the first mark just defines the total number of clusters (command classes) and then the 0xEF mark defines the start of the outClusters.
I will be glad to help you test/refine the device type once I have mine if you still need help.
Thanks for the support & glad you liked it! Do note the Device Type is still under development and is evolving rapidly. This is my first Device Type and Iām learning as I go.
Just got mine and it paired easily with the device handler installed. Button pushes seem to work just fine. But can the device handler deal with longer button holds? In the manual that came with the GoControl switch it seems like it should be capable of both presses and holds. Thanks for sharing this!
Sweet! So it auto-identified correctly? Right now, the Handler only handles a press, but I believe it can handle a held event as well. Iāll take a look into it soon.
Soory about my slight absence from this project. As some of you may know, Iām just a High School Student, so Iāve been busy getting back from spring break. Also, I think Iām getting a bit under the weather. Iām good, just taking things easy. I hope to have a better code version uploaded soon (Milestone 4, estimating this weekend).