RFID Config API
Manages the persisted RFID configuration for a location. Values saved here override environment variables for all RFID operations at that location.
GET /api/rfid/u300/config
Returns the effective config — DB values merged with env var fallbacks.
GET /api/rfid/u300/config
Authorization: Bearer <token>
x-selected-location: 42Response:
{
"ok": true,
"locationId": 42,
"result": {
"configType": "rfid_settings",
"u300": {
"baseUrl": "http://192.168.1.100:5000",
"relayToken": "",
"ingestKey": "...",
"ingestEndpointUrl": "https://app.vercel.app/api/rfid/u300/ingest",
"ingestPollMs": 1000,
"rfLink": 1,
"antennaPower": 30,
"antennas": [1, 2]
},
"moisture": {
"tagFamily": "AZN3120-AFR",
"skipTidReads": true
},
"shared": {
"killPasswordHex": ""
},
"r1": { "baseUrl": "" },
"cp30": { "baseUrl": "" }
}
}PATCH /api/rfid/u300/config
Deep-merges a partial config into the saved location config.
PATCH /api/rfid/u300/config
Authorization: Bearer <token>
x-selected-location: 42
Content-Type: application/json
{
"u300": {
"antennaPower": 30,
"antennas": [1, 2, 3]
},
"moisture": {
"skipTidReads": true
}
}Only the provided fields are updated. All other fields retain their current values.
Response:
{
"ok": true,
"locationId": 42,
"result": { ...full updated config... }
}Config fields reference
u300
| Field | Type | Default | Description |
|---|---|---|---|
baseUrl | string | "" | U300 relay base URL |
relayToken | string | "" | Bearer token for relay auth |
ingestKey | string | "" | Secret key for ingest endpoint |
ingestEndpointUrl | string | "" | URL relay POSTs tag events to |
ingestPollMs | number | 1000 | Poll interval in ms (300–10000) |
rfLink | number | 1 | RF link profile (see U300 docs) |
antennaPower | number | 20 | TX power in dBm (1–30) |
antennas | number[] | [] | Active antenna ports. Empty = relay default |
moisture
| Field | Type | Default | Description |
|---|---|---|---|
tagFamily | string | "AZN3120-AFR" | Tag family name (must exist in rfid_tag_families) |
skipTidReads | boolean | true | Skip TID reads, treat all tags as tagFamily |
shared
| Field | Type | Default | Description |
|---|---|---|---|
killPasswordHex | string | "" | 8-char hex kill password |