Repository navigation
Welcome to Autosense-Community Discussions! #1
Replies: 1 comment
🍇 AutoSense: devices now describe what they can doHi everyone! 👋 AutoSense now has Capability Exposure over MQTT. Your dashboard no longer needs every command coded in by hand. Each AutoSense device now tells it what it can do, and the dashboard builds the controls from that. 🔍 How it worksEach time a device connects to MQTT, it publishes a retained manifest to: The manifest holds the device's MAC address, its firmware version, and a list of capabilities. Each capability is a command or workflow the device supports. Because the message is retained, a client that connects later still sees the device straight away. 🎛️ Each capability tells the UI how to draw itEvery capability has a label, a type and its own command topic: The device subscribes to these topics itself. The supported types are:
So a client can draw the right control for each one without hardcoding anything. 🧪 Step-by-step calibration over MQTTSome features are guided workflows rather than single commands. A capability can define an ordered list of steps, and each step becomes a button that sends its payload. There are two so far:
During calibration the device streams live readings on a Example capability: {
"id": "calibrate_ph",
"action": "autosense/AA:BB:CC:DD:EE:FF/cmd/calibrate_ph",
"readingTopic": "autosense/AA:BB:CC:DD:EE:FF/calibration/ph/reading",
"steps": [
{ "id": "start", "label": "Start Calibration", "payload": "{\"action\":\"start\"}" },
{ "id": "capture_min", "label": "Capture Min (pH 4)", "payload": "{\"action\":\"capture\",\"point\":\"min\"}" },
{ "id": "capture_max", "label": "Capture Max (pH 7)", "payload": "{\"action\":\"capture\",\"point\":\"max\"}" },
{ "id": "stop", "label": "Stop Calibration", "payload": "{\"action\":\"stop\"}" }
]
}⚙️ Always availableEvery device also exposes:
📡 MQTT topics to set up in the HubAll per-device topics start with Discovery (subscribe)
Commands (publish)The device subscribes to these topics itself.
Live calibration readings (subscribe)
Suggested Hub subscriptionsThe Hub needs publish rights on 💡 Why it matters
📦 Supported sensorsOLED · DHT · CO2 (MQ135) · DS18B20 · O2 · pH · TDS · CO · BME688 · MiCS-5524 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Autosense
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
All reactions