QR / Barcode Scanner New in 1.0.8
Reads QR codes and barcodes into the screen — from the device's camera, from a USB or Bluetooth handheld scanner, or from a photo — and fires scan with what it read, so a scan can write a tag, look up a record or open a screen.
Reach for it when you need:
- Scanning a work-order or batch label at a line terminal and writing it to a tag
- A tablet on the floor that opens the right equipment screen from the code on the machine
- Checking a part number against a pattern before it is accepted
Component name: BarcodeScanner · Category: Input
In the palette: Reads QR codes and barcodes from the device camera, a USB/Bluetooth handheld scanner (keyboard wedge) or a photo. The scanned text becomes this widget's value ({{nodes.<scanner id>.props.value}}) and fires the scan event — wire scan → Set tag with value scan.text to write it to a tag. Decoding runs in a WebAssembly worker, never on the UI thread. The camera needs HTTPS or localhost; the handheld and image modes work over plain HTTP.
Properties
Any property can be bound to a tag, another component's property, or a query.
| Property | Type | Default | Description |
|---|---|---|---|
value | string | "" | The last ACCEPTED scan. Bind it by node id, e.g. {{nodes.<scanner id>.props.value}}. |
modes | object | {"camera":true,"hid":true,"image":true,"default":"camera"} | Which inputs the scanner offers, and which it shows first. |
↳ modes.camera | boolean | true | Offer the live camera mode. |
↳ modes.hid | boolean | true | Accept a USB/Bluetooth handheld scanner (it types like a keyboard). Listens in every mode while enabled, so a handheld works beside the camera. |
↳ modes.image | boolean | true | Offer decoding a picked or freshly taken photo. |
↳ modes.default | enum | camera | The mode shown first. Options: camera · hid · image. |
scanning | object | {"mode":"continuous","formats":"common","pattern":"","cooldo… (truncated) | What counts as a scan: continuous or single, accepted formats, an optional pattern, the duplicate cooldown and the per-second cap. |
↳ scanning.mode | enum | continuous | continuous keeps scanning; single stops after the first accepted code and shows "Scan again". Options: continuous · single. |
↳ scanning.formats | enum | common | Which symbologies are accepted. Fewer formats decode faster. A code outside the set fires scanRejected (reason format_not_allowed). Options: common · qr · matrix · linear · any. |
↳ scanning.pattern | string | "" | Optional regular expression a scan must match, e.g. ^PN-\d{6}$. A non-matching scan fires scanRejected (reason pattern_mismatch) instead of scan. |