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

Prototype of new Device and Exposes Design #25

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

ddellacosta
Copy link
Owner

@ddellacosta ddellacosta commented Feb 17, 2024

The goal of this PR is to produce a new Design for Devices and their capabilities on the frontend. The output of this PR should be at least a single "Matter-like" Device which abstracts details of Matter vs. Zigbee2MQTT so that Devices all present the same interface for use elsewhere in the app. This will also include an updated parsing approach to Zigbee2MQTT exposes data in particular, so that it is more flexible and easier to work with without losing type safety.

I am imagining that this will be followed by a bunch of small PRs for each Device type that is relevant for me, adapted from the Matter 1.2 device spec. This will probably be primarily lights and sensors for the time being.

TODO:

  • update Capabilities/Exposes design and parsing
  • update Device type to be more Matter-like, hiding protocol-specific details behind an abstract interface
  • implement proper Device parsing that checks capabilities and assigns a device a Matter 1.2 type, with Zigbee2MQTT devices used for the first implementation, for at least one Device type
  • update the UI to render the new Device type(s)
  • test all the things

…make implementing the wrapper that can support other device types (Matter) simpler. Test scaffolding in place and first pass at basic Exposes structure implemented.
… basic Device parsing works. DeviceView just dumping output of `show exposes` for now. TODO implement full Device parsing, new Device components for view
…xposes -- reintroduced Capability as a name for any given Exposes value; added lenses to access Device and Capability properties; moved tests inside of `Test` folder to be consistent with `src` layout
@ddellacosta ddellacosta changed the title WIP Prototype of new Device and Exposes construction Mar 30, 2024
@ddellacosta ddellacosta changed the title Prototype of new Device and Exposes construction Prototype of new Device and Exposes Design Mar 30, 2024
…ned by specific types and added a very basic Device-type-specific view for the new types
…ed UI components back in to DeviceView now that it's possible to dispatch on device type, specifically lighting sub-types
…eviously commented out UI code in DeviceView is now all accounted for--it's now a prototype of a more mobile-facing UI
…tend and backend; fixes issue with tests breaking due to react-bootstrap module import failing; introduces groups to frontend and abstracts devices and groups into resources; adds bootstrap-5.3.2 since I guess I didn't do that yet; probably more I forgot since this is ridiculous
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.

1 participant