Re: [sensors] Sensor discovery (#7)

Hi @Symbitic - Thanks for sharing this!

> One thing I thought of: there is a certain amount of overlap between sensor discovery and WebHID. Since this is the Sensors and Device working group, maybe some kind of merge between Generic Sensor discovery and WebHID should be considered, either in the form of extending WebHID or creating a new HID that replaces WebHID and unifies devices and sensors.
For example, navigator.hid.getDevices() could be pre-populated with things like Magnetometer or Accelerometer after calling navigator.permissions.query. Generic Sensor is extensible and future-proof, but we shouldn't assume that the future holds that sensor and device are exclusive the way they are today.

In general, discoverable sensors could have many possible types of connections - and they may go in and out of range, only be available in certain locations, with certain permissions, etc. and IMO should not be tied to the transport layer.

A first step might be to create the foundation for extensibility via e.g. drivers adhering to a specific interface to be brokers between external sensors (serial, hid, bluetooth, virtual, etc) and generic sensor class counterparts, available to applications.  

The current generic sensor implementations are not suited for multiple sensors of the same type used in the same application.  Registration, discovery, selection and usage should also be catered for in the APIs.  This is something that should be possible to experiment with using polyfills today.  Recently, I made an experiment to inject sensor data from an external device into a web application using the existing sensor APIs.  Something that might be practical when developing applications using sensors not available on the device used for development - maybe some inspiration can be found there too? https://dev.to/denladeside/generic-sensors-and-thingy52-9oa

One other thing that might be interesting to look at in this area is the potential use of the Coordinated Set Identification Profile ( https://www.bluetooth.com/specifications/csip-1-0-1/ ) - try to read section 1, where sensors are mentioned.

I'd love to put some effort into reviving this topic and maybe you can give your thoughts on some of the things I've mentioned above?

-- 
GitHub Notification of comment by larsgk
Please view or discuss this issue at https://github.com/w3c/sensors/issues/7#issuecomment-1836728612 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 1 December 2023 20:22:49 UTC