Aroma Device Profile

Standards / Aroma Device Profile / Specification

Aroma Device Profile, version 1.0

Version 1.0 — public draft Source: Aroma Device Profile @ 5a06920 (2026-11-24)

Contents

Status: Version 1.0 draft.

An Aroma Device Profile describes one kind of scent device: how many chambers it has, which boosters (fans) it drives, and the steps in which it sets levels and times. A player of an ASMF document (spec/asmf-format.md) or of an Aroma Recipe (spec/aroma-recipe.md) reads the profile of the device it drives and adapts to it, instead of knowing a particular device in advance. A profile is a single JSON document.

Every JSON example in this document is checked by the reference implementation (section 9). The line above each example says whether it is a valid profile, an invalid one (and the error it gives first), or a fragment; a comment that is not shown when the document is rendered repeats the verdict for the checker.

1. Scope

This document defines:

  • the profile format (sections 3 to 5 and 7),
  • how a player rounds levels and times to a device's steps (section 6),
  • the device identifiers (section 8),
  • how to check an implementation (section 9).

It does not define how a device is controlled (its commands, connection or protocol), how a player discovers which device is connected, or how profiles are distributed. A profile states facts about the hardware that its maker knows; it is not a measurement and makes no promise about a particular unit.

2. Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY" and "OPTIONAL" in this document are to be interpreted as described in BCP 14 (RFC 2119 and RFC 8174) when, and only when, they appear in all capitals, as shown here.

  • Profile: one Aroma Device Profile JSON text.
  • Reader: software that parses and validates profiles. Its version is the version of this specification it implements; a reader of this specification has version 1.0.
  • Player: software that drives a scent device, for example from an ASMF document or an Aroma Recipe.
  • Chamber: the unit of space in a device that holds one aroma, as in ASMF section 2. Chambers are numbered from 1.
  • Booster: an air output of the device, named as in ASMF section 7 (inner, outer).
  • Level: an aroma's concentration or a booster's intensity, 1–100, as in ASMF.
  • Structural error, rule violation and path: as in ASMF sections 2 and 5.

3. Document

A profile is a single JSON text (RFC 8259) encoded in UTF-8 without a byte order mark. Its top level is an object. The rules of ASMF section 3 for the text apply unchanged: a text that is not valid UTF-8, is not JSON, contains a string escape for a lone surrogate, or starts with a byte order mark is MALFORMED with the empty path.

The profile of the Aroma Shooter:

Valid.

{
  "aromaDeviceProfile": "1.0",
  "device": {"id": "aroma-shooter-3", "name": "Aroma Shooter 3", "maker": "Aromajoin Corporation"},
  "chamberCount": 6,
  "boosters": ["inner", "outer"],
  "levelStepPercent": 1,
  "timeStepMs": 100,
  "autoInnerIntensity": 100,
  "minInnerIntensity": 50
}

A device of another maker with four chambers and no booster:

Valid.

{
  "aromaDeviceProfile": "1.0",
  "device": {"id": "com.example.scentbox-4", "name": "Scentbox 4", "maker": "Example Devices Inc."},
  "chamberCount": 4,
  "boosters": [],
  "levelStepPercent": 10,
  "timeStepMs": 250
}

3.1 Top level

Field Required Type Meaning
aromaDeviceProfile yes string Format version "<major>.<minor>" (section 7). This specification is "1.0".
device yes object Which device the profile describes (section 3.2).
chamberCount yes integer 1–64 Number of chambers, numbered from 1.
boosters yes array of strings The booster names the device drives, from "inner" and "outer", each at most once, in any order. [] for a device without boosters.
levelStepPercent yes integer 1–100 The step, in percent, in which the device sets concentration and intensity (section 6).
timeStepMs yes integer 1–60000 The step, in milliseconds, in which the device times its outputs (section 6).
autoInnerIntensity when boosters contains "inner" integer 1–100 The delivery level of the automatic inner booster (ASMF section 7.5).
minInnerIntensity when boosters contains "inner" integer 1–100 The recommended minimum inner intensity (ASMF section 8).

autoInnerIntensity and minInnerIntensity MUST be present when boosters contains "inner" and MUST be absent otherwise.

3.2 device

Field Required Type Meaning
id yes string The device identifier (section 8). It is the value ASMF uses in layout.device.
name yes string The product name, 1–200 Unicode code points. For display.
maker yes string The maker, 1–200 Unicode code points. For display.

3.3 Numbers

Numbers follow ASMF section 3.7: every number in a member the reader reads MUST be a JSON integer token (no fraction part, no exponent part, not -0), or the profile is MALFORMED at the member's path; an integer outside the signed 64-bit range is MALFORMED at the member's path; a number too large in magnitude for a finite IEEE 754 double anywhere in the text, ignored members included, is MALFORMED with the empty path. Values inside the signed 64-bit range reach validation, which reports OUT_OF_RANGE.

Invalid: MALFORMED at levelStepPercent.

{"aromaDeviceProfile": "1.0", "device": {"id": "aroma-shooter-3", "name": "Aroma Shooter 3", "maker": "Aromajoin Corporation"},
 "chamberCount": 6, "boosters": [], "levelStepPercent": 1.0, "timeStepMs": 100}

4. Rules

A profile that breaks one of these rules has a rule violation (section 5.2).

  1. Device identifier. device.id has the form of section 8.
  2. Texts. device.name and device.maker are 1–200 Unicode code points.
  3. Ranges. chamberCount is 1–64, levelStepPercent 1–100, timeStepMs 1–60000, autoInnerIntensity and minInnerIntensity 1–100.
  4. Boosters. Each entry of boosters is "inner" or "outer" and appears at most once. Names a reader does not know are treated as in section 7.
  5. Inner booster facts. autoInnerIntensity and minInnerIntensity are present exactly when boosters contains "inner".

Invalid: INVALID_VALUE at autoInnerIntensity.

{"aromaDeviceProfile": "1.0", "device": {"id": "com.example.scentbox-4", "name": "Scentbox 4", "maker": "Example Devices Inc."},
 "chamberCount": 4, "boosters": ["outer"], "levelStepPercent": 10, "timeStepMs": 250, "autoInnerIntensity": 100}

Invalid: INVALID_VALUE at minInnerIntensity.

{"aromaDeviceProfile": "1.0", "device": {"id": "aroma-shooter-3", "name": "Aroma Shooter 3", "maker": "Aromajoin Corporation"},
 "chamberCount": 6, "boosters": ["inner", "outer"], "levelStepPercent": 1, "timeStepMs": 100, "autoInnerIntensity": 100}

Invalid: OUT_OF_RANGE at chamberCount.

{"aromaDeviceProfile": "1.0", "device": {"id": "aroma-shooter-3", "name": "Aroma Shooter 3", "maker": "Aromajoin Corporation"},
 "chamberCount": 0, "boosters": [], "levelStepPercent": 1, "timeStepMs": 100}

Invalid: INVALID_VALUE at boosters[1].

{"aromaDeviceProfile": "1.0", "device": {"id": "aroma-shooter-3", "name": "Aroma Shooter 3", "maker": "Aromajoin Corporation"},
 "chamberCount": 6, "boosters": ["outer", "outer"], "levelStepPercent": 1, "timeStepMs": 100}

5. Errors

Errors come in two groups. A profile is valid when it has neither.

5.1 Structural errors

The reader reports exactly one structural error, {"code": …, "path": …}, and stops; it does not check the rules.

Code Meaning
MALFORMED As ASMF section 5.1: not UTF-8 or not JSON (a lone surrogate escape included); top level not an object; a byte order mark; larger than 4 MiB (4194304 bytes); nesting deeper than 32 levels (the top-level object is level 1); a member name twice in one object; a number token too large for a finite double; a required field missing; a value of the wrong JSON type (an entry of boosters that is not a string included); a number in a member the reader reads that is not an integer (including -0) or outside the signed 64-bit range.
UNSUPPORTED_VERSION aromaDeviceProfile is not of the form "<integer>.<integer>" (one or more ASCII digits on both sides of one ., each number at most 4294967295), or its major version is not one the reader implements.
UNKNOWN_FIELD A member the reader does not know, under the conditions of section 7.

Errors about the text as a whole carry the empty path; the others carry the path of the offending member (device.id, boosters[0], levelStepPercent, device.colour). A missing autoInnerIntensity or minInnerIntensity is not a structural error: whether they are required depends on boosters, and it is reported as a rule violation (section 4, rule 5).

A reader checks in this order and reports the first error it finds:

  1. The size limit and the byte order mark.
  2. The UTF-8 encoding, the JSON syntax, duplicate member names and the nesting depth, over the whole text.
  3. The top level is an object.
  4. aromaDeviceProfile: present and a string (MALFORMED), then its form and major version (UNSUPPORTED_VERSION), both at aromaDeviceProfile. Nothing else is read in a profile of another major version.
  5. Unknown members of the top-level object.
  6. device (an object; its unknown members; then id, name, maker), chamberCount, boosters (an array; then each entry in index order), levelStepPercent, timeStepMs, autoInnerIntensity, minInnerIntensity, in that order.

Invalid: UNSUPPORTED_VERSION at aromaDeviceProfile.

{"aromaDeviceProfile": "2.0", "device": {"id": "aroma-shooter-3", "name": "Aroma Shooter 3", "maker": "Aromajoin Corporation"},
 "chamberCount": 6, "boosters": [], "levelStepPercent": 1, "timeStepMs": 100}

Invalid: MALFORMED at timeStepMs.

{"aromaDeviceProfile": "1.0", "device": {"id": "aroma-shooter-3", "name": "Aroma Shooter 3", "maker": "Aromajoin Corporation"},
 "chamberCount": 6, "boosters": [], "levelStepPercent": 1}

Invalid: UNKNOWN_FIELD at device.colour.

{"aromaDeviceProfile": "1.0", "device": {"id": "aroma-shooter-3", "name": "Aroma Shooter 3", "maker": "Aromajoin Corporation", "colour": "white"},
 "chamberCount": 6, "boosters": [], "levelStepPercent": 1, "timeStepMs": 100}

5.2 Rule violations

The reader reports every violation as a list of {"path": …, "code": …}.

Code Meaning Path
OUT_OF_RANGE chamberCount not 1–64; levelStepPercent not 1–100; timeStepMs not 1–60000; autoInnerIntensity or minInnerIntensity not 1–100. The number: chamberCount, levelStepPercent, timeStepMs, autoInnerIntensity, minInnerIntensity.
INVALID_VALUE device.id not of the form of section 8; device.name or device.maker empty or longer than 200 code points; a boosters entry that is not a booster name the reader knows (section 7), or that repeats an earlier entry; autoInnerIntensity or minInnerIntensity present while boosters has no "inner", or absent while it has one. device.id, device.name, device.maker, boosters[i] (of the later entry for a repeat), autoInnerIntensity, minInnerIntensity.

5.3 Reporting order

Validators MUST report violations in this order: device.id, device.name, device.maker, chamberCount, boosters[i] in index order, levelStepPercent, timeStepMs, autoInnerIntensity, minInnerIntensity. For autoInnerIntensity and minInnerIntensity, a presence violation (INVALID_VALUE) replaces the range check: a member that should be absent is not range-checked.

6. Rounding

A device sets levels in steps of levelStepPercent and times in steps of timeStepMs. A player that sends a level or a time to the device rounds it as follows, so that players agree:

  • Rounding to a step s (an integer at least 1) of a value v: when v <= 0, the result is 0. Otherwise let q = floor(v / s) and r = v - q × s; the result is q × s when 2r < s and (q + 1) × s otherwise (the nearest multiple of s, ties up). A result of 0 becomes s: a value above 0 never rounds to off.
  • Levels (concentration and intensity) are rounded to levelStepPercent. A level above 100 is first taken as 100, and a result above 100 becomes the largest multiple of levelStepPercent that is at most 100.
  • Times (a start, an end or a duration in milliseconds) are rounded to timeStepMs. A time above 4294967295 (the largest time of ASMF) is first taken as 4294967295.

For the Aroma Shooter (levelStepPercent 1, timeStepMs 100): every level from 0 to 100 is sent as it is; 50 ms is sent as 100, 149 ms as 100 and 150 ms as 200. For a device with a levelStepPercent of 10: level 1 is sent as 10, 14 as 10, 15 as 20 and 0 as 0.

Rounding is what a player sends, not a change to the document: ASMF's reference levels (ASMF section 7.3) and playback rules (ASMF section 10) are computed on the document's values first. A player MUST NOT raise levels on its own (ASMF section 10, rule 9) other than by this rounding.

7. Versioning and extension

The rules of ASMF section 6 apply, with aromaDeviceProfile as the version member:

  1. Major version. A reader MUST reject a profile whose major version it does not implement (UNSUPPORTED_VERSION).
  2. Minor version. A reader reads a profile whose minor version is higher than its own. A minor version MAY only add optional members, and booster names (when ASMF adds them).
  3. Unknown members. A member whose name begins with x- is ignored in every object. Any other unknown member is ignored when the profile's minor version is higher than the reader's, and is UNKNOWN_FIELD otherwise.
  4. New booster names. A boosters entry whose name the reader does not know is ignored in a profile whose minor version is higher than the reader's, and is INVALID_VALUE otherwise.

A 1.0 reader accepts this 1.1 profile: it ignores the unknown member and the unknown booster name.

Valid.

{"aromaDeviceProfile": "1.1", "device": {"id": "com.example.scentbox-4", "name": "Scentbox 4", "maker": "Example Devices Inc."},
 "chamberCount": 4, "boosters": ["side"], "levelStepPercent": 10, "timeStepMs": 250, "heater": true, "x-note": "prototype"}

Invalid: INVALID_VALUE at boosters[0].

{"aromaDeviceProfile": "1.0", "device": {"id": "com.example.scentbox-4", "name": "Scentbox 4", "maker": "Example Devices Inc."},
 "chamberCount": 4, "boosters": ["side"], "levelStepPercent": 10, "timeStepMs": 250}

8. Device identifiers

A device identifier names one kind of device: a model with a fixed number of chambers and boosters. It is the value of ASMF layout.device.

  • Identifiers defined by Aromajoin have no prefix and match ^[a-z0-9-]{1,64}$ (ASCII), for example aroma-shooter-3.
  • Every other maker uses a reversed domain name it controls as a prefix: the identifier matches ^[a-z0-9-]+(\.[a-z0-9-]+)+$ (ASCII, at least one .) and is at most 128 characters, for example com.example.scentbox-4.
  • One identifier names one kind of device for ever. A device whose chambers or boosters differ gets a new identifier.
  • A profile of a device identifier SHOULD be published only by its maker.

Validation checks only the form. ASMF defines the layout of aroma-shooter-3 only; a profile does not change what ASMF reads in a layout.

Invalid: INVALID_VALUE at device.id.

{"aromaDeviceProfile": "1.0", "device": {"id": "Scentbox_4", "name": "Scentbox 4", "maker": "Example Devices Inc."},
 "chamberCount": 4, "boosters": [], "levelStepPercent": 10, "timeStepMs": 250}

9. Conformance

  • A valid profile has no structural error and no rule violation for a reader of its major version.
  • A conforming validator reports, for every input, the same structural error (code and path) as this specification, or, when there is none, the same violation list in the same order (section 5.3).
  • A conforming player that uses a profile rounds as section 6 says, drives only the boosters the profile lists, and uses autoInnerIntensity as the delivery level of ASMF section 7.5 and minInnerIntensity as the minimum of ASMF section 8.

The shared test vectors in vectors/aroma-device-profile-cases.json check an implementation. The file is one JSON object; each section is an array of named cases:

Section Each case An implementation passes when
structural text (raw profile text), or generate (oversize: 4 MiB + 1 bytes; deep: 33 nesting levels; deep32: 32 levels), and expected parsing gives expected: null for success, else {"code", "path"} exactly.
validation document (an object, or a string holding the exact text) and expected parsing and validating document gives exactly the ordered list expected.
rounding levelStepPercent, timeStepMs, levels and times (lists of [input, sent]) rounding each input level (section 6) with that levelStepPercent gives the sent level, and each input time with that timeStepMs gives the sent time.

Some validation documents use a generator, which a runner expands before serialising: {"repeat": s, "count": N} becomes the string s repeated N times, preceded by the string prefix when that member is present.

The reference implementation is the Rust crate in crates/aroma-device-profile. It runs the vectors in its test tests/vectors.rs and checks every example in this document in tests/spec_examples.rs. Aromajoin's published profiles are in profiles/.

10. Media type and file names

  • Media type: application/vnd.aromajoin.aroma-device-profile+json.
  • Version 1.0 defines no file extension of its own: a profile is stored as a .json file. A file named after the device identifier (aroma-shooter-3.json) is RECOMMENDED. A minor version may add an extension.
  • Encoding: UTF-8, without a byte order mark.

11. Security considerations

  • Size, depth, duplicate member names and numbers: as ASMF section 16. A reader MUST reject a text larger than 4 MiB or nested deeper than 32 levels, and a duplicate member name, as MALFORMED.
  • Untrusted profiles. A profile can claim more chambers or a finer step than a device has. A player MUST still keep the commands it sends within what the connected device accepts; a profile tells a player how to adapt, not how far it may go.
  • No active content. device.name and device.maker are plain text and MUST be shown as text, not interpreted as markup.
  • Error reports. Paths can embed member names taken from the profile, of any length and unescaped; treat them as untrusted text when logging or displaying them.
  • Privacy. A profile describes a kind of device, never a unit or its owner: it has no member for a serial number, a location or a user.

12. Change log

Version Date Changes
1.0 2026-11-19 First version (draft).
1.0 (draft revision) 2026-11-20 Wording: the opening counts the device's chambers. No rule changes.