-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
More Osram smart+ switch support #366
Conversation
Short press only works for the right buttons. Signed-off-by: Raik Bieniek <[email protected]>
… wrong command id anyway. This fixes an exception. Signed-off-by: Raik Bieniek <[email protected]>
I'm not happy with the four long press release channels. In another pull-request you said that the Eclipse smart home system channel you wanted to use does not define a long press release. Whoever invented that channel must have thought about this I guess. The channel is a text channel. My guess is that it should contain the "LONG_PRESS" text as long as the the user holds the button and cleared afterwards. You could define nice rules then:
My suggestion would be a longpress release attribute in the XML which would make the |
The channel is a trigger channel, so, afaik, it does not have a state that could be cleared. Shouldn't one rather extend the definition of the system channel type in Eclipse SmartHome? Then, after extending the channel type in Eclipse SmartHome, one could use the additional trigger payloads here in the binding. WDYT? |
No, this won't be fixed with #363, as #363 is concerned with manufacturer-specific cluster support. This would be fixed with zsmartsystems/com.zsmartsystems.zigbee#438 (an issue I created in the underlying ZSS ZigBee library last year, when I tried to integrate the Osram switch :) ). |
One more comment (without any expectation to fix this with this PR): The Osram switch comes in three variants, with different model IDs. You have added the model ID |
I read the documentation and created an issue to clarify it :-) eclipse-archived/smarthome#6871 . In the issue where they discussed the introduction of the trigger channels they have talked about release so they must have thought about it eclipse-archived/smarthome#1043 . |
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.
LGTM, thanks @rbi!
Would you rather like to wait with merging until you know more about the issue with the system channel type in ESH? If not, I think that this could be merged now, and improved later.
I would like to wait a little longer at least until we know if it is just a missing documentation issue or a missing LONG_PRESS_RELEASED event issue. I think if it is the former the effort to adapt code in this binding is low. If this would be merged now and the long press release channels would be removed later this would break OpenHAB rules using these channels that where created in the meantime. |
OK, then let's wait with merging. |
There has been no reaction to my question how to correctly handle long press release in two weeks. Maybe we should merge this as it is. |
I agree that we could merge this now. With zsmartsystems/com.zsmartsystems.zigbee#438, we could later improve this by adding the missing short-pressed events, maybe @cdjackson gets to add these missing commands to the zsmartsystems library at some point. |
I hope these will be available very soon - once the new autocoder is ready... |
Nice :) Thanks for the update, Chris! |
With this pull request long press and long press release work for all 4 buttons. Short press work only for the right buttons at the moments because the library can not map the required cluster/commandId combination. I guess that is fixed with #363 ?
The switch reports voltage but now battery percentage. I added a mapping for the voltage too.
While creating the definition I got the following exception
I fixed it in the second commit.