-
Notifications
You must be signed in to change notification settings - Fork 88.7k
[CHAD-5501][zigbee multi switch] Need Exception handling for eZEX multi switch #44306
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
were you having problems if you didn't include this new condition?
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.
https://smartthings.atlassian.net/browse/CHAD-5501
eZEX sensor send undefined packet(refer to below), so need to add exception for filtering of undefined attributeId.
(ZCL Rx: ep:01 prof:0104 clus:0006 lqi:C4 rssi:-51 fc:08 mc:0000 seq:34 cmd:0A body:11 00 18 07)
@greens, I don't have eZEX switch sensor, so I can't check it doesn't have problem without this condition.
But logically, As I said in decription, eZEX sensor send packet to hub with undefined attributeId(like 0x0011)
and we don't check the validity of attributeId in appengine-zigbee(only check the clusterId),
so it is recoginized as and 'off' value (even its real value is '07')
https://github.com/PhysicalGraph/appengine-zigbee/blob/master/src/main/groovy/physicalgraph/zigbee/Zigbee.groovy#L832
So I added this condition to activate with only 0x0000(OnOff) attribute.
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.
Right, but that event was being created by the code I've asked you to remove.
zigbee.parse()
most likely will not create that event, so just removing that extra code should solve that problem.Uh oh!
There was an error while loading. Please reload this page.
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.
@greens @inasail
Hi I'm a Smartthings customer in South Korea, and I would like to add comment about it.
Similar error also seems to occur in not only in Ezex, but also in Dawon multi switches.
Below is a thread in Korean Smartthings Community.
https://cafe.naver.com/stsmarthome/18408 (Sorry, It's in Korean, but @inasail, you could read it.)
If you decide to modify source code in either way, you may need to make sure that the change does not cause problem with zigbee-multi-switches from other manufacturers.
There must be some reason that "if (eventDescMap?.clusterId == zigbee.ONOFF_CLUSTER)" part of the code is there. Maybe, some products from other manufacturer (maybe, one of the products from Orvibo, GDKES, HONTAR, HEIMAN, Dawon and eWeLink) send faulty ZHA packets with only clusterId OnOff without attrId or wrong attrId, and that might be the reason of that part of the quirky code.
You may need to check out the history of the zigbee-multi-switch DTH, and look for previous pull request of that part of the code.
Thank you guys for all your efforts.
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.
So I don't believe this is correct @greens . The
getEvent
call will generate an incorrect event for this message because we don't verify the attribute ID there. So we should also make a change https://github.com/PhysicalGraph/appengine-zigbee/blob/master/src/main/groovy/physicalgraph/zigbee/Zigbee.groovy#L832 to check the attribute ID there.