2026-04-23 20:43:43 -07:00
2026-04-23 20:43:43 -07:00
2026-04-23 20:43:43 -07:00
2026-04-21 16:25:59 -07:00
2026-04-23 09:47:23 -07:00
2026-04-23 20:43:43 -07:00

BagTag

The machine-readable identification standard for Grove5 Cultivar Select bags.

BagTag uses two codes with two completely separate audiences and two completely separate jobs.


Two codes. Two audiences. Two jobs.

AprilTag (Front) QR Code (Back)
Faces Cultivar camera Human / phone
Readable by Machine Human and machine
Payload 12-bit grow profile Full GMP traceability record
Capability 6DOF pose estimation Unlimited data
Job Predeterminant grow intelligence Supply chain, recall, transparency
Human input required Zero On demand

The QR code is a strict superset of the AprilTag payload. If the AprilTag is damaged or obscured by mycelium growth, the human scans the QR and the Cultivar receives the same grow information. Neither code is a single point of failure.


How it works

The Cultivar camera reads one AprilTag41h12 tag at bag insertion. 12 bits. In milliseconds.

Bit 0      → Small or Large bag
Bits 1–5   → Substrate recipe (32 slots)
Bits 6–11  → Species (128 slots, table selected by substrate)

From those 12 bits the Cultivar knows:

  • Temperature targets for colonization and fruiting
  • Humidity profile
  • CO₂ and FAE schedule
  • Colonization timeline estimate
  • Biological efficiency baseline for yield tracking
  • Fruiting trigger conditions

No app interaction. No human input. Just put the bag in.


Tag family

AprilTag41h12 — 2,115 valid tag IDs, Hamming distance 12.

Co-recommended alongside 36h11 by industrial machine vision vendors. Selected for the Cultivar because:

  • Sufficient IDs for the full BagTag encoding space
  • Hamming distance 12 tolerates up to 5 misread bits — robust against condensation, mycelium occlusion, and angle
  • Native 6DOF pose estimation from a single camera frame
  • Lightweight decode on vision coprocessor

Repository structure

BagTag/
├── README.md           ← this file
├── SPEC.md             ← full encoding specification
├── LICENSE             ← MIT
├── tables/
│   ├── substrates.md   ← all 32 substrate slots
│   └── species/        ← per-substrate species lookup tables
│       ├── aio-00.md
│       ├── aio-01.md
│       └── ...
└── tools/
    └── decode.py       ← reference decoder (tag ID → substrate + species)

Quick decode reference

tag_id = 2048
bits = format(tag_id, '012b')  # '100000000000'

size          = int(bits[0], 2)     # 1 = Large
substrate     = int(bits[1:6], 2)   # 0 = Masters Mix + Millet
species_code  = int(bits[6:], 2)    # 0 = Hericium erinaceus (Lion's Mane)

See tools/decode.py for the full reference implementation with lookup tables.


License

MIT — see LICENSE


Part of Grove5

BagTag is one component of the Cultivar ecosystem.

  • Cultivar — smart dual-chamber home mushroom cultivation appliance
  • Cultivar Select — subscription bag service
  • BagTag — machine-readable bag identification standard

Open source software, honest hardware.

S
Description
BagTag is the machine-readable identification standard for Grove5 Cultivar Select bags. It uses two codes with two completely separate audiences and two completely separate jobs.
https://grove5.com
Readme BSD-2-Clause, MIT
435 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 100%