Tag Families
A tag family defines the calibration curve and classification parameters for a type of RFID sensor tag. Calibration is stored in the rfid_tag_families Supabase table and loaded at runtime.
AZN3120-AFR (Magnus S3)
The primary moisture-sensing tag used by Parlevel.
| Property | Value |
|---|---|
| Name | AZN3120-AFR |
| TID prefix | E28240 (first 3 bytes of TID bank) |
| Sensor bank | Reserved |
| Sensor word | Word 12 (byte offset 24) |
| SC value range | 0–511 (9-bit) |
| Recommended RF link | 1 (PR ASK / Miller4 / 250 kHz) |
Calibration curve
11-point SC → volume mapping used to compute fluid level:
| SC value | Volume (mL) |
|---|---|
| 511 | 700 |
| 480 | 650 |
| 450 | 560 |
| 400 | 490 |
| 360 | 420 |
| 310 | 350 |
| 260 | 280 |
| 210 | 210 |
| 160 | 140 |
| 100 | 70 |
| 40 | 0 |
Linear interpolation is used between calibration points.
Level bands
| Band | Min SC | Max SC | Label |
|---|---|---|---|
| Full | 460 | 511 | Full |
| 3/4 | 380 | 459 | 3/4 |
| 1/2 | 280 | 379 | 1/2 |
| 1/4 | 140 | 279 | 1/4 |
| Empty | 0 | 139 | Empty |
Classification parameters
| Parameter | Value | Description |
|---|---|---|
minReads | 3 | Minimum stable readings before emitting a level |
ambiguousZones | ±15 around band boundaries | SC ranges treated as ambiguous (uses hysteresis) |
Adding a new tag family
- Insert a row into
rfid_tag_families:
INSERT INTO rfid_tag_families (
name, tid_prefix, description,
calibration, level_bands, min_reads, ambiguous_zones
) VALUES (
'MY-TAG-FAMILY',
'E28241',
'Description of the tag',
'[{"sc": 511, "volumeMl": 700}, ...]'::jsonb,
'[{"label": "Full", "minSc": 460, "maxSc": 511}, ...]'::jsonb,
3,
'[{"centerSc": 460, "halfWidthSc": 15}]'::jsonb
);-
In the location RFID settings (UI or API), set
moisture.tagFamilyto'MY-TAG-FAMILY' -
Calibration is loaded once per process start and cached in memory. Restart the server after adding a new family.
Per-location tag family
Each location can use a different tag family. The setting is stored in device_config as moisture.tagFamily. If unset, falls back to the RFID_TAG_FAMILY env var, then to AZN3120-AFR.