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

WIP: Adapter ZiGate #241

Merged
merged 4 commits into from
Oct 23, 2020
Merged

WIP: Adapter ZiGate #241

merged 4 commits into from
Oct 23, 2020

Conversation

G1K
Copy link
Contributor

@G1K G1K commented Oct 21, 2020

My comrades (@devbis, @kirovilya) and I prepared an initial implementation of an adapter for interacting with NXP JN5168 / JN5169 chips
We are using zigbee2mqtt on a xiaomi gateway with openwrt operating system.
https://github.com/openlumi

Some places are not yet sufficiently perfected and I have not managed to implement all of them, but I want to share with the community so that my efforts are not wasted.

For successful operation, you need to use the firmware for the chip with a memory leak fix, it will be released in the ZiGate 3.1d firmware, but it is not stable yet, I added this fix to 3.1c
You can download the firmware or source codes here https://github.com/openlumi/ZiGate/releases/tag/snapshot-20201008

After flashing, you need to do a hard reset or ./zigate.sh erase_pdm (script next to the firmware)

You can flash using official utilities from NXP for windows or
https://github.com/Jerome-PS/JennicModuleProgrammer

What you can try as a coordinator

Thanks to the creators of these libraries (@Neonox31 , @nouknouk), they helped in understanding the protocol and implementation of this adapter.
https://github.com/Neonox31/zigate
https://github.com/nouknouk/node-zigate

@G1K G1K changed the title WIP: Adapter zigate WIP: Adapter ZiGate Oct 21, 2020
@G1K G1K mentioned this pull request Oct 21, 2020
7 tasks
@Koenkk
Copy link
Owner

Koenkk commented Oct 22, 2020

Cool!

Your pr looks ok (added one small comment).

You marked your pr as wip, but can this already be integrated? (or do you want to do more testing first?)

Note to self: after this merge: Koenkk/zigbee2mqtt#4737

@G1K
Copy link
Contributor Author

G1K commented Oct 22, 2020

Thank you, I accidentally committed that line.

I think for a general test it is better to merge this and give dev a chance to test a wide range of people. Functionally, this adapter does not overlap with the others, so it should not cause problems for the majority of users.

WIP: I marked it because the functionality does not fully cover the capabilities and not everything is implemented, but it should be enough for basic use.
I have very few devices to perform tests, almost all of these are end devices without power.

But I will definitely not have the opportunity to implement it in the near future.

An approximate list of problems:

  • Groups were not implemented
  • lqi for the map is not fully tested and finalized (perhaps you need to make a routingTable)
  • Broadcast messages have not been tested either
  • Green Power does not work - there is no default in the firmware, but even when I put it together it was not possible to send, perhaps I did not fully understand the parameters.
  • InterPAN - I don't know what it is and I don't even want to guess)

and others I don't know ... I'm not an expert in ZigBee)

.npmignore Show resolved Hide resolved
rollback .npmignore
remove forgotten debug
@Koenkk
Copy link
Owner

Koenkk commented Oct 23, 2020

Thanks!

@Koenkk Koenkk merged commit bed5824 into Koenkk:master Oct 23, 2020
@G1K
Copy link
Contributor Author

G1K commented Oct 23, 2020

Sorry, I messed up. When merging this commit bd5c5b4 , it so happened that the line with the port opening was lost. as a result, nothing works. What can I do now ? to open a new PR?

@Koenkk
Copy link
Owner

Koenkk commented Oct 24, 2020

yes please open a new pr

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.

3 participants