-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix endianess issue with 8002 frames #114
Conversation
Looks good but could you provide a test ? |
hi |
Ok, could you provide a link to the issue ? I'm just not sure this is the right place for that fix : |
I made a test and I just don't see the issue :
|
We are calling serialize to convert into an another format: we need to convert to string "1234"
|
Thanks for the explanation
there's no difference |
I think @pipiche38's intent is to keep radio library specific data types ( In [1]: import zigpy_zigate.types
In [2]: import zigpy.types
In [3]: zigpy_zigate.types.EUI64(range(8)).serialize()
Out[3]: b'\x07\x06\x05\x04\x03\x02\x01\x00'
In [4]: zigpy.types.EUI64(range(8)).serialize()
Out[4]: b'\x00\x01\x02\x03\x04\x05\x06\x07' Right now,
|
When I started zigpy_zigate I was using zigpy types and there was endian issues that's why I create specific types for zigate |
The cause of that problem is the same as this one: zigpy-zigate objects are leaving zigpy-zigate's internal code and are being passed into zigpy. # File: zigpy/application.py
import zigpy.types as t
class ControllerApplication:
...
def handle_join(self, nwk: t.NWK, ieee: t.EUI64, parent_nwk: t.NWK) -> None:
... ^^^^^^^^^^
Other radio libraries are most likely doing the same and should also be fixed. |
This is not my what we are doing. I think it was challenging for us to understand , but on the domotciz side we rely only on zigpy and zigpy.types in order to able to work with all raduio libraries. In any means, you have probably the right point on the handle_message(), but what we have found is that zigpy-zigate doesn't behave as zigpy-znp and this what the PR is about and getting znp working as zigate. Now this is always what we said we are not in position to test with ZHA. You don't like it. fair. We have our fork and will continue with that. We are talking here on 2 lines of code .! We had much more and much more important to push (like handling the Zigate protocol, handling correctly the ACK/NACK , group message, broadcast and more ). |
I just want to be sure it will not break zha, that's all |
In between the library is not performing as it should be there are bug, there are lack of alignment with the firmware, groups commands are not possible, broadcast either. The only issue for me, is that the HA community using Zigate is just impacted by that. |
FYI, there are two very much related topic discussions about those subjects here (seperate from this specific bug and pull request): (No idea how to proceed other than trying to get new ZHA testers and/or developers to help with maintenance of zigpy-zigate). |
Ok so many thanks for fixing that !
No problem, you could be a maintainer too, zigpy_zigate is not mine I'm not preventing anyone to work on it.
What do you mean ? impacted by the bug ? or impacted by this PR ? Just to be clear, if merging this PR break zigate support for HA => it's a problem and we need to provide informations to fix the problem. If it doesn't break anything and just fix a bug, everything is ok. |
Merged, feel free to test and contribute |
No description provided.