BLE Hubs 1.0Think SignalR for BLE!Think SignalR for BLE!Hub it up!
UniHub 1.0Universal Hubs - SignalR Styled Hub BLE or HTTP - Why not both!?Universal Hubs - SignalR Styled Hub BLE or HTTP - Why not both!?YES PLEASE!
Sensors
The sensors bridge streams the device’s motion and environment sensors to the page. It ships in Shiny.AppDeviceBridge.Maui and is added by AddSensorsBridge().
The accelerometer (g), gyroscope
(rad/s), magnetometer (µT), compass (degrees from magnetic north), barometer (hPa) and orientation (a quaternion), over
.NET MAUI Essentials.
Start, then listen.POST sensors/compass with { "speed": "UI", "minIntervalMs": 16 } starts the sensor; readings
arrive only as events. Posting again with another speed restarts it; another interval changes only what gets through.
Throttled. Readings closer together than minIntervalMs (16 by default, at least 5) are dropped before they
reach the page, so Fastest can’t flood the event stream. sensors.shake is never dropped, and fires only while the
accelerometer runs.
Stopped for you. A sensor stops once nothing listens to its event (the accelerometer keeps running while
sensors.shake has a listener), so a page that navigates away or closes doesn’t leave one draining the battery. DELETE sensors stops them all.
Platforms. Whatever Essentials offers on Android, iOS, Mac Catalyst and Windows, and only the sensors the device
has. GET sensors says which; starting one that isn’t there answers 501. The macOS (AppKit) and Linux (GTK4) heads
have none.
Readings closer together than this are dropped before they reach the page, which is what keeps a fast sensor from flooding the event stream. 16 (about 60 a second) by default; never less than 5.
Readings closer together than this are dropped before they reach the page, which is what keeps a fast sensor from flooding the event stream. 16 (about 60 a second) by default; never less than 5.