-
Notifications
You must be signed in to change notification settings - Fork 3
DeviceManagerSettings
{
"Buses": [
BusConfig#1,
BusConfig#2
],
"Devices": [
DeviceConfig#1,
DeviceConfig#2
],
}Notes:
- DeviceManager automatically scans the I2C bus to detect devices. For details on the scanning process, priority lists, and multiplexer handling, see I2C Device Scanning.
- DeviceManager automatically publishes device data through the
devjsonanddevbintopics. For details on the published message formats and how to subscribe to device data, see Device Data Publishing.
Array of configurations for Buses which must contain at least the settings defined below. Any other information is passed to the bus constructor as part of the JSON configuration and is specific to the type of bus being defined.
| Setting | Description | Type | Default | Example |
|---|---|---|---|---|
name |
The name of the bus. | string | N/A | "I2CA" |
type |
The type of the bus which must match a registered bus type | string | N/A | "I2C" |
An array of configurations for Devices. Each entry is either a static-device entry (identified by the presence of a class field — DeviceManager instantiates the device via the DeviceFactory) or a bus-tagging entry (no class field — used purely to assign a friendly name and/or role to a bus-discovered device identified by its bus+addr).
A class field is required. Any other information is passed to the device constructor as part of the JSON configuration and is specific to the type of device being defined.
| Setting | Description | Type | Default | Example |
|---|---|---|---|---|
class |
The class name of the device which must match a registered device class. | string | N/A | "Buzzer" |
name |
Optional friendly name for the device. Recorded in DeviceManager's name map and returned by /devman/typeinfo and /devman/listdevs. |
string (optional) | — | "Buzzer1" |
role |
Optional role tag. The default role is normal; set to system to mark the device as system infrastructure (e.g. fuel gauge, RTC) so that consumers can distinguish it from standard measurement devices. |
string (optional) | "normal" |
"system" |
enable |
true (or non-zero) if the device is to be created. |
bool (optional) | true |
false |
Used to attach a friendly name and/or role to a device that is dynamically detected on a bus (i.e. not instantiated from the Devices list). No factory instantiation occurs — the entry exists purely to associate metadata with the bus address.
| Setting | Description | Type | Default | Example |
|---|---|---|---|---|
bus |
Bus name (e.g. "I2CA") on which the device lives. |
string | N/A | "I2CA" |
addr |
Device address on the bus (hex, with or without 0x). |
string | N/A | "0x36" |
name |
Friendly name to assign to the bus device. | string (optional) | — | "FuelGauge" |
role |
Role tag for the bus device (e.g. "system"). |
string (optional) | "normal" |
"system" |
enable |
Set to false to skip this entry. |
bool (optional) | true |
false |
"Devices": [
{ "class": "Buzzer", "name": "Buzzer1" },
{ "class": "MotorControl", "name": "MotorControl", "role": "system" },
{ "bus": "I2CA", "addr": "0x36", "name": "FuelGauge", "role": "system" },
{ "bus": "I2CA", "addr": "0x6a", "name": "IMU1" }
]The
roleandnamemappings configured here can also be changed at runtime through the/devman/setnameand/devman/setroleREST endpoints (in-memory only — runtime changes are not persisted).
Getting Started
- Quick Start
- Architecture at a Glance
- Writing Your First SysMod
- Adding a Comms Channel
- Adding an I2C Device Type
- PlatformIO / Arduino
Scaffolding & Building
- Raft CLI
- SysTypes
- Top-Level SysType
- Build Process
- WebUI Build Pipeline
- File System
- Partitions & Flash
- Local Dev Libraries
- Library Developer Guide
Architecture
Built-in SysMods
- NetworkManager
- BLEManager
- WebServer
- MQTTManager
- SerialConsole
- CommandSerial
- CommandSocket
- CommandFile
- FileManager
- LogManager
- ESPOTAUpdate
- StatePublisher
- Remote Logging
- Data Source Registration
Comms & Protocols
- Stack Overview
- Comms Channels
- ProtocolExchange
- RICREST Protocol
- Real-Time Streams
- Adding REST Endpoints
- Built-in REST Endpoints
- File Download (OKTO)
- OTA Update Flow
Devices & Buses
- DeviceManager
- Device Manager REST API
- Device Factory & Classes
- Device Type Records
- Adding an I2C Device Type
- Device Data Publishing
- Data Logger
- I2C Bus
- I2C Device Scanning
- I2C ID & Polling
- MotorControl Overview
- MotorControl Config
- MotorControl Commands
Helpers
Reference