-
Notifications
You must be signed in to change notification settings - Fork 325
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
Setting zboss adapter to always use LUMI manufacturer code #1331
base: master
Are you sure you want to change the base?
Conversation
debea94
to
13b3038
Compare
The default manuf code would be set in firmware, ZH just doesn't appear to override it (likely not needed). zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts Lines 619 to 639 in 915347f
zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts Lines 1867 to 1872 in 915347f
Package linking would be the easiest way. |
@kirovilya please take a look |
I don't think this last commit works. |
@Nerivec you are correct. Thanks for the hints, I'll give it a try. I pushed the commit to this branch for testing, I'll mark the PR as draft until I can verify the next iteration works. |
Confirmed working and i can still join other devices as well |
You'll want to add the secondary IEEE prefix for lumi too. I also moved away from using permit join to disable, since it won't trigger automatically anymore (unless explicitly triggered by user), meaning it won't reset in a lot of cases. Any chance you have another event like ember (stack closed) that you can use? |
I added the second manufacturer code as requested.
I'm not sure how the ember adapter works or how it differs from the zboss stack. From a cursory glance it seems that I looked through the zboss spec and can't find anything similar, the only "events" (called indications in zboss) are for when devices leave, which we can not use since we don't know if we have more Lumi devices that are still connected. (?) My thinking is that the node descriptor should mainly be requested when joining, and since we reset before allowing join it should not be any problems for currently joined devices if the manufacturer code is stuck as Lumi? If that is not the case please help me pinning down what actually needs to be done. |
It should mostly be fine I think. It creates a few edge cases, but hopefully not too problematic. Technically, proper devices should not use the manuf code as a barrier like these crappy Aqara devices... so, that, in itself, should limit the impact. It just creates a state that makes debugging a lot harder in case it is ever a problem. |
The fix for this seems to have been to set the manufacturer code to match the incoming code for the specific vendor.
Since the zboss library doesn't set the manufacturerCode anywhere i assume it's fine to just set it globally?
According to the Nordic documentaation for ZBOSS the NCP code on the micro-controller transparently handles the node_desc messages without interaction from the host, so a case-by-case implementation would require custom firmware.
For now i think that just setting the ManufacturerCode is an okay workaround, yes?
Side-note: Some documentation in zigbee2mqtt on how to override the zigbee-herdsman version would be A+ from a dev-standpoint.