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

[meta] Add integration manifest files #1116

Closed
rytilahti opened this issue Aug 13, 2021 · 1 comment
Closed

[meta] Add integration manifest files #1116

rytilahti opened this issue Aug 13, 2021 · 1 comment
Milestone

Comments

@rytilahti
Copy link
Owner

rytilahti commented Aug 13, 2021

Add manifest files describing meta data related to the integration. This is used to dynamically initialize the implementations based on the model information & allow for plugin-based integrations in the future. It can also be used to generate a list of supported devices, so no more need for manual updates to README.md.

This information could be used to populate a registry of supported models during the import of the miio module (or accessed explicitly, or just initialized whenever needed).

Information such as:

  • supported models by the given integration, based on miIO.info model info
  • mdns information (which is currently stored inside the discover)
  • supported features for the model?
  • device-specific configurations, e.g., fan speeds for vacuums and fans

Potential data structure:

name: Rockrobo vacuum
class: <module>.<implementing class> # to initialize the implementation dynamically
supported_devices:
  - model: device.model.1
    name: Gen1 vacuum
    mdns: device-model-1
    supported_features:
      - zone_clean
      - feature2
    device_data:  # allow describing the fan speeds & adding support for new models by simply adjusting the manifest
      fan_speeds:
         - 80
         - 90
  - model: device.model.2
    supported_features:
      - feature2

Open questions:

  • JSON? YAML?
  • Data structure?
@rytilahti
Copy link
Owner Author

I don't think it makes sense to add a separate file for this, the mdns information can be used to create a model name so the discovery could be adapted to check if a supported device is found by performing that conversion.

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

No branches or pull requests

1 participant