Skip to content

Support multiple instances of the same sensor type in a single device #796

@tyeth

Description

@tyeth

Is your feature request related to a problem? Please describe.
Many components offer multiple values of the same subcomponent type. This is usually represented as a sensor type (Adafruit_Sensor repository), but multiple of the same type in one component is not currently supported in WipperSnapper.

Theoretically this should also cover outputs, but not actually required for this issue. Previously I thought of it separately as we were not getting i2c output components in v1, but now with displays we do, and v2 may well get the same ideas in protobuf.

Examples:

  • ADCs / Power monitors with more than one channel.
  • light/spectral sensors returning more than one wavelength binning value (400nm, 600nm, etc) or "colour"
  • proximity + thermal sensors with more than one "pixel" / multi zone e.g. VL53L8cx, D6T-

It would also be a stepping stone to many devices, particularly the seesaw-like devices, which are often multi input/output, but we'd also need i2c on_change polling (poll period 0).

Describe the solution you'd like
Firmware, component schema, protobuf, and IO website all support components with multiple of the same sub-component type.

Describe alternatives you've considered
We've currently be reusing the RAW sensor event type as a second field if a sensor needed more than one of the same type.

Additional context
See here for a more detailed explanation and how the "multiple of same type" ties in with other things:
https://docs.google.com/document/d/16_Ywka41PmgpYL6qTliFgAM_ejKW9oPztegqctWbw70/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions