-
Notifications
You must be signed in to change notification settings - Fork 2
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
Refactor implementation of capabilities. #20
Comments
This resulted in the creation of the
Working on this has made me realise that the concept of fetching a Capabiltiy object from a Gateway to operate on a Device is a bit crazy. It has some real limitations, such as making it difficult to have multiple implementations of the same Capability in one DA. For example in the case of If there is the need for a one capability structure to serve all devices, this can effectively be done by small structs that just hold enough binding data, which proxies to the singleton capabiltiy. In I started a lot of this rework without thinking to track the work in this ticket, so I'll now create the todo list to keep track of what needs doing. |
Todo:
|
Thoughts about persistance: zstack, zda and the need to store data in a somewhat simplistic for, kinda equivilent to maybe the windows registry or a large ini file. Specifically for zda, we might need to store data about a node, a device and a capability on a device. In each case the data store is likely to be a simplistic key value store. Can we input some kind of persistence store interface which can be provided at init time. We'd need to be able to add/delete/list devices/nodes, get and set values (maybe as maps, rather than individual values). |
|
|
My initial approach to
zda
was to assume that devices would support the zigbee specification, while I knew this not to be true I believed that the exceptions could be managed well.Further many
Capabilities
that merely monitor an attribute in a cluster (Temperature, Humidity, etc) are essentially duplicates, even though they reuse functionality.I want to refactor to acheive two main goals:
Capability
methods.rules.json
to specify that a specific implementation should be used, for example XiaomiTemperature can be added based on device type.Solving both of these things would allow much more rapid development of ZDA.
The text was updated successfully, but these errors were encountered: