-
Notifications
You must be signed in to change notification settings - Fork 88
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
Storage of ZCL attribute datatypes by the network data store #989
Comments
In general, I don't mind this approach and can certainly see some benefit. However, there are a couple of things that we should keep in mind.
I'm not completely sure we can overcome these two issues (at least the first) if you are only updating existing attributes. See also #236 which is I think directly linked to what you are reporting (ie changes to the XML definition do not flow through if the device was already persisted into the store) and probably should not have been closed (I will reopen it). |
I agree, #236 is directly linked to this one. I think that your second issue it not a problem: I think we can overcome it by still taking the attribute "attributes" from the I agree that we need to think about the first issue, the custom attributes. Couldn't we check via the However, I just saw that this field ( |
So I guess you are basically suggesting a split approach. Use the existing system and create the attribute for all manufacturer specific attributes, and for standard ZCL defined attributes you only update the last update time, supported flag and last value?
That sounds fine to me and would also solve the other issue.
Adding the extra field to the DAO should not be a problem - at least it should not be breaking. Although I guess that depends on how the serialisation is handled. For OH and the console app I think it should be ok (although of course you will loose any manufacturer specific attributes since it will try to update the existing attribute and there won’t be one).
|
manufacturer-specific attributes This resolves zsmartsystems#989 and zsmartsystems#236.
manufacturer-specific attributes This resolves zsmartsystems#989 and zsmartsystems#236. Signed-off-by: Henning Sudbrock <[email protected]>
manufacturer-specific attributes This resolves zsmartsystems#989 and zsmartsystems#236. Signed-off-by: Henning Sudbrock <[email protected]>
…rer-specific attributes (#1001) * Fix typo in JavaDoc * Only restore dynamic attribute state from the node database, except for manufacturer-specific attributes This resolves #989 and #236. Signed-off-by: Henning Sudbrock <[email protected]>
Currently, implementors of
ZigBeeNetworkDataStore
need to store information about ZCL attributes like the datatype or whether the attribute is mandatory. When reading a node from the data store, new instances ofZclAttribute
are populated with that data, and those new instances are then used instead of the attributes defined inZclCluster.initialize{Server|Client}Attributes
.I wonder if this should really be done that way. The method
ZclCluster.initialize{Server|Client}Attributes
provides the values defined in the ZCL spec, and I do not see why it should be possible that implementors ofZigBeeNetworkDataStore
should be able to provide different values for those attribute properties.Why do I even care about this? If there is, at some point in time, wrong attribute information in the autocoder XML files, this wrong information will make it into the data written by a network data store. If the autocoder XML files are fixed, this fix will never make it into the
ZclAttribute
instances that are created from network data store information that was written before that fix.One concrete example is #534, which fixed wrong datatypes in the thermostat cluster XML files. I have one system here which reads a thermostat node that was persisted before #534 was merged, and in consequence this node still contains wrong attribute datatypes.
Chris, do you think it is sensible to not create new instances of
ZclAttribute
from aZclAttributeDao
here inZclCluster.setDao
, but rather to update the attributes created byinitialize{Server|Client}Attributes
during object creation with the infos from theZclAttributeDao
(excluding information defined by the ZCL spec like datatype, mandatory, etc.)?The text was updated successfully, but these errors were encountered: