-
Notifications
You must be signed in to change notification settings - Fork 181
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
Merge elements when getting new composition data #541
base: main
Are you sure you want to change the base?
Conversation
Quick fix for #539 possibly this logic should be on a setter in ProvisionedBaseMeshNode. |
66de31f
to
90acbda
Compare
Thank you for the PR! @roshanrajaratnam is on parental leave so it may take some time before he merges it. Would you mind using your branch until then? |
Hi, |
@philips77 Thanks for the response, regarding the changing of elements. Just read up on the Mesh Profile 1.0.1 spec and believe I found what you refereed to under the section Elements:
Do you know if this also apply for changes to models within the element? When writing this I took some inspiration from the iOS library, it also seems to merge the elements in a similar fashion: |
Yes, it says that the structure of elements can't change without reprovisioning. Indeed, the iOS library does it a bit differently, but perhaps I can simplify it as well there. I don't remember the reason why I did it this way. Perhaps I was hoping this limitation could be removed.. or for testing? |
Not sure exactly why, I saw it was referenced in this PR: It feels a bit wrong just to ignore the element information and just not caring about it. But I understand since the mesh spec does not support this behavior and it is then considered undefined. I can imagine a user having a mesh, then wanting to add an extra feature (model) to an element thus updating the node with DFU over BLE outside of Mesh. E.g adding the scene server and client to later support scenes. The provisioner could use the VID with the new model information from the new composition data to then derive what features are supported. The process of unprovisioning, DFU, and then reprovisioning the node and trying to restore the subscribes/publications used would be quite cumbersome to add a feature to a node. |
Yes, I know it could have been done differently, but spec explicitly says that it is not possible and reprovisioning is needed. Mind, that when reprovisioned, the device will be assigned a new Unicast Address and all its configuration will be lost. |
Yes, that correct. However, imagine that you have a set of lights that is the majority of your mesh and they receive a new firmware update that adds a new model that would mean that you have basically have to re-do the majority of your mesh. The update processes of unprovisioning, dfu and provisioning can also try to restore the previous settings but the flow is quite cumbersome and error-prone since it requires a lot of connections in series to be established and a lot of messages to be sent to be successful. Anyhow I understand your point, since the spec says the device must be reprovisioned in makes sense that it is what should happen until the spec says otherwise. Also worth mentioning that it is not only nodeFeatures that can change in composition data. e.g vid, could also change if a new version of firmware is running on the device. I guess it is also up for discussion if it is possible that cid and pid may change as well, I've yet to find the mentioning anything about these fields. |
As far as I know nothing can change in the data returned as Page 0 of the Composition Data, including |
@philips77 That sounds strange, not allowing for changes to the I've tried to look through the mesh profile, to find anything supporting this, but I haven't found anything besides the section mentioned before about Elements' structure not being allowed to change and that the page 0 is mandatory. I've searched for all mentions of "page 0" and "composition data" and read through the sections related, but maybe I've missed something? |
Hi, |
No description provided.