Skip to content
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

Add Zbeacon DS01 quirk removing PollControl cluster #2913

Merged
merged 9 commits into from
Jan 19, 2024

Conversation

Caius-Bonus
Copy link
Contributor

@Caius-Bonus Caius-Bonus commented Jan 16, 2024

Proposed change

The Zbeacon DS01 (no idea who made this, but it's a cheap chinese door sensor that runs on 2xAAA and is long rectangular in shape).

Add quirk for Zbeacon DS01, which removes the PollControl cluster, which is incorrectly implemented by the device I think.

Additional information

The device will send "PollControl:checkin()" on PollControl cluster, but doesn't respond when checkin_response is sent after that from the coordinator.
This results in error messages every 30-60 minutes with the message that the device didn't respond.

This is easily avoided by just disabling the PollControl Cluster.

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works

@Caius-Bonus Caius-Bonus changed the title init Add Quirk for Zbeacon DS01 Jan 16, 2024
Copy link

codecov bot commented Jan 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6b9516d) 87.56% compared to head (2ba701b) 87.57%.
Report is 3 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2913      +/-   ##
==========================================
+ Coverage   87.56%   87.57%   +0.01%     
==========================================
  Files         293      294       +1     
  Lines        8997     9005       +8     
==========================================
+ Hits         7878     7886       +8     
  Misses       1119     1119              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MattWestb
Copy link
Contributor

MattWestb commented Jan 16, 2024

With witch coordinator do you have testing and also is you having one sniffing of the pairing that we can taking one look on.
Interesting to see if all flags is set OK also if the end device time out is being OK replayed from the devices parent then joining
TI coordinators was having all pull control disabled but was fixed for one half year ago and some is not doing it OK.

Edit: I have not seen any tuya end device using pull control and checkins only good working ones real Zigbee 3 that is doing it well is IKEA with current production firmware.

@TheJulianJES TheJulianJES added the new quirk Adds support for a new device label Jan 17, 2024
Copy link
Collaborator

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some small comments.

(Note for the next time, we also have an experimental "quirk-generator" to generate a quirk that just matches a device based on the provided signature/diagnostics file.)

zhaquirks/tuya/doorsensor.py Outdated Show resolved Hide resolved
zhaquirks/tuya/doorsensor.py Outdated Show resolved Hide resolved
zhaquirks/tuya/doorsensor.py Outdated Show resolved Hide resolved
@TheJulianJES TheJulianJES changed the title Add Quirk for Zbeacon DS01 Add Zbeacon DS01 quirk removing PollControl cluster Jan 17, 2024
Caius-Bonus and others added 3 commits January 18, 2024 18:47
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
@Caius-Bonus
Copy link
Contributor Author

Caius-Bonus commented Jan 18, 2024

@TheJulianJES Great that there is a tool to generate quirks now, nice job.

@MattWestb My coordinator is a Conbee II with the latest firmware (15-May-2022). The testing is done with 2 devices and I have consistent errors with both every ~45 minutes without this quirk (even after re-pairing). I could send a log, but it'll take a little while for me to get around to it.

About the classification: I wasn't sure where to put it, because it is unclear to me who made it. The sellers advertise it as being TuYa. I could move it to Elivco or IHseno IH-MC01 (both seem identical in the pictures, but mine are from Elivco).

@MattWestb
Copy link
Contributor

Then its not one TI-Coordinator problem then one tuya is trying implanting pull control and more then likely we is getting more device from them with the same problem very sooooooon.
If being one own brand its not so importing for my then its not looking like normal tuya IDs like LIDL and other is using.

@Caius-Bonus
Copy link
Contributor Author

Caius-Bonus commented Jan 19, 2024

I moved it to its own manufacturer for now; I just put it under Zbeacon. It is probably using a TuYa ZTU module, but that doesn't mean it's programmed by TuYa. I cannot find anything about Zbeacon, Elivco or IHsense. Although Elivco seems to yield some results with smart plugs.

Copy link
Collaborator

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
I think it's fine to have it separated from Tuya, as it doesn't seem to be from Tuya at first glance at least. We can always move it later of course.

@TheJulianJES TheJulianJES self-assigned this Jan 19, 2024
@TheJulianJES TheJulianJES merged commit 94e920c into zigpy:dev Jan 19, 2024
14 checks passed
@Caius-Bonus Caius-Bonus deleted the FixZbeaconDS01 branch January 31, 2024 16:57
lgraf pushed a commit to lgraf/zha-device-handlers that referenced this pull request May 6, 2024
---------

Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new quirk Adds support for a new device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants