-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZWave Scene Support (i.e. multiple clicks) #46
Comments
0.7.1 has better scene support. I have a wallmote quad and verified that it works. I'll need to see more devices to see what might or might not be further improvement. |
I have been experimenting with a After getting to grips with understanding/debugging zwave-adapter, node-openzwave-shared and openzwave, I have been able to add the devices as things, and after minor tweaks to the zwave-classifier, add rules so that I can control switches with various combinations of presses and press & hold. I am now at a stage trying to understand the philosophy of the zwave-classifier in respect of Central Scene Notifications. I see that in adding the So for a generic device/wall controller what should the classifier do by default? It could read the device configuration and find the list of buttons, and then add events for each of them (either explicitly with the Dev version of OpenZwave library or implicitly with the Master version of the library - the dev version has the values for scenes be a list rather than an int property). If that is the "generic" approach how does one handle specific devices like the Not sure if this is the best place for discussing this, but it seems closely related to Adding the |
When you query the wallmote, it says that it has the on/off command class, but it only uses that command class when you use associations (i.e. the wallmote is directly controlling a device). When using the wallmote with a gateway, it seems that the only notification that you get are the central scene notifications. The classifier create an on property because this is something that the user is comfortable with. The device also generates events, which is probably more in keeping with the central scene notifications. Since it only adds a small amount of code, I decided to have the wallmote support both state and events, and the user can choose to use whichever they're more comfortable with. |
That makes sense. I guess the question then is how to handle devices like the Fibaro Key fob which has 6 buttons, in the current code. This has a minimum of 6 scenes and can generate more if sequences are taken into account, Is it sufficient to just iterate over the values returned from the node (read fro the xml cache file??) and create the events and pseudo properties? At the moment the code distinguishes its code paths with an if based in the scene count, 2 for a simple controller else it assumes the wallmote - so perhaps it needs to check for known devices first (e.g the wallmote has swipe, though I am not sure if that is its own scene). Then if it is not special, just do something for each scene id. Is this something that you are considering? Is it likely to be of any help if I experiment and come up with a PR of some kind? |
I think we should probably generate events for each possible button/single/double press that can be done. With a 2 button device, having one button represent on and the second button represent off kind of makes sense to me. And then long-press on one of the buttons increases brightness and decreases on the other. For more than 2 buttons, we could make a press be a toggle of the on/off state (which is what the wallmote does). So what we could do is have a table of labels which are manufacturer specific, along with a function that could be called. For the wallmote, we'd put the addSlideProperties, and config items into that function (and it looks like the levelProperty as well. We could then use generic labels if no specific ones are found and have the toggle/events per button for devices with more than 2 buttons. PRs would be welcome! |
We already have a quirks table at the top of the file for configuration, adding some items for labels and/or classification would probably make sense. |
Sounds good to me. |
Increasingly more zwave switches and remotes support zwave scenes in the form of multiple button presses. The possibilities for attaching rules and scripts to multiple button press combinations are endless. Here are some examples of such devices:
The text was updated successfully, but these errors were encountered: