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

xbee: experimental support for any coordinator #1089

Merged
merged 2 commits into from
Oct 25, 2021

Conversation

Shulyaka
Copy link
Contributor

This PR removes the dependency on coordinator-specific remote_at_command() by emulating it for other coordinators.

While this should work in theory with other coordinators, I could only test the code with xbee coordinator for the lack of hardware, I simulated it by slightly modifying zigpy_xbee code for the test.

@coveralls
Copy link

coveralls commented Oct 21, 2021

Pull Request Test Coverage Report for Build 1368197253

  • 31 of 86 (36.05%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 79.981%

Changes Missing Coverage Covered Lines Changed/Added Lines %
zhaquirks/xbee/init.py 31 86 36.05%
Totals Coverage Status
Change from base Build 1367560763: -0.7%
Covered Lines: 4291
Relevant Lines: 5365

💛 - Coveralls

@codecov-commenter
Copy link

Codecov Report

Merging #1089 (243ce09) into dev (2d5d68c) will decrease coverage by 0.70%.
The diff coverage is 36.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1089      +/-   ##
==========================================
- Coverage   80.68%   79.98%   -0.71%     
==========================================
  Files         197      197              
  Lines        5280     5365      +85     
==========================================
+ Hits         4260     4291      +31     
- Misses       1020     1074      +54     
Impacted Files Coverage Δ
zhaquirks/xbee/__init__.py 41.11% <36.04%> (-1.96%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d5d68c...243ce09. Read the comment docs.

@Adminiuga
Copy link
Contributor

did you sniff XBee commands and translated them into zigbee ZCL commands?

@Shulyaka
Copy link
Contributor Author

Yes

@Adminiuga
Copy link
Contributor

This is pretty cool. How can I test assuming I have a Xbee 2C or maybe xbee 3 joined as a router?

@Shulyaka
Copy link
Contributor Author

What is your coordinator?

@Adminiuga
Copy link
Contributor

EZSP based

@Shulyaka
Copy link
Contributor Author

Great! If you have it already as a router, then you probably have switches for digital i/o. Just try to flip those switches and see if you get any exception. Flipping a switch generates an AT command that configures the pin. You can also double check the pin state with XCTU,

@dmulcahey dmulcahey merged commit 861a19b into zigpy:dev Oct 25, 2021
@Shulyaka Shulyaka deleted the xbee_any_coordinator branch October 25, 2021 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants