-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Make dim buttons of the Philips Dimmer Switch usable. #352
Conversation
Thanks. Please can you sign your commit and the PR. |
Signed-off-by: Raik Bieniek <[email protected]>
1c0ea7a
to
70e3cd6
Compare
Do you mean I should add this "Signed-off-by" line to the commit? I've done it now and replaced the original commit. |
Yes, that's correct - as per the contributors guidelines, you are signing off that you accept the conditions. Thanks. |
The generically discovered version contains battery channels which work fine. This static thing version does not contain them yet. Should I add them? At the moment, when you add a remote to the system you get the auto discovered device in the Inbox first. You add it and discovery completes while it is already added. Only then you get static thing as a new thing in the Inbox. When you add it you have 2 things for one remote. The temperature can then just be taken from the generic thing and the Dimm buttons from the static thing. |
May Zigbee standard knowledge is not that good but I do not understand why the parameter I also think there is something like a |
Thanks for adding this, @rbi! To my knowledge, it is currently not possible in the binding to have some channels of a thing from a static channel definition in the XML thing type, and to have some other channels being dynamically generated by the binding. Hence, it would be good if you could add the low-battery channel. Regarding the attribute for the parameter name, and why this is needed: It is necessary to somehow specify the parameter value to distinguish different buttons for which the device emits the same command, just with different parameter values. The library used by the binding for ZigBee communication provides parameter values of commands via getter methods that include the parameter name, hence the use of the parameter name in the thing type. You are correct, this is nothing from the ZigBee standard. When implementing this feature, @cdjackson and I discussed briefly whether to extend the underlying ZigBee library to permit a different way to access the parameters, but decided that simply using the parameter name should be good enough. You probably do not find this in the link you provided, because this information is encoded by the hex values listed there. Regarding the option to add additional triggers like 'long-press-release': When implementing this, I wanted to use the standard system channel types from Eclipse Smarthome, and not introduce custom channel types. I think that in ESH, there are currently no suitable system channel types that cover all the options (hence the 'workaround' for the release channel for the innr remote). I don't see any other option than introducing ZigBee-binding specific channel types for this, extending the list of system channel types in ESH after some discussion there, or just using a workaround similar to the one used in the innr remote thing type. |
@hsudbrock Thanks for the explanation. I think I understand now the need for the for the parameter name. The dimmer emits events on the cluster "0xfc00" too. I guess that is a proprietary one? As I understand it the underlying library has generated classes for well-known clusters. These classes contain the getters with the parameter name. I guess for proprietary clusters no class is generated so I can not access them at all? Or is there some kind of generic class which can be used in that case? What would the parameter_name be? |
Yes, clusters with IDs in the range |
I've seen the I've never seen a value for the I just recognized that I forgot the sign-off again. I fix this in the afternoon. |
This channel type is based on the attribute |
…dimmer switch. Signed-off-by: Raik Bieniek <[email protected]>
052bad3
to
fe38f93
Compare
Unfortunately I don't know this so I have commented out it for now. I've added the Signed-Off Line. With this definitions all button channels generate |
@@ -1,6 +1,7 @@ | |||
philips_sml001,vendor=Philips,modelId=SML001 | |||
philips_rwl012,vendor=Philips,modelId=RWL021 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one last question, as I overlooked this before: Should it be 012
or 021
in the ID? It looks as if the digits were accidentally transposed on one side of this property entry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be rwl021. Thanks for the hint. I've fixed it.
I will probably get one of those switches myself and take a look; then I can add the channel or remove the commented section for the channel with an additional PR at a later point. |
Signed-off-by: Raik Bieniek <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @rbi!
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
This is a static thing definition for the Philips Dimmer Switch. When the Switch is autodiscovered only the On and Off buttons generate any events that can be used in OpenHab. With this PR both Dimm Buttons in the middle can be used too.
To get the right values I looked at this source code file:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/2f9c700cdb679de87666abe56c3477b31916e438/sensor.cpp#L96
I tried to use the proprietary definitions which would allow even more fine grained controling with this remote but I failed. I didn't know what I should use for the "*_parameter_name" properties. The commented out values work for me however.