Configuration Files
The CC2 device uses three JSON files to determine its behaviour:
global.json– loaded at every boot, contains the core device configuration (network definitions, entity‑manager server, default dev settings).allocdata.json– loaded when the device transitions to the allocated state (assigned to a user). It can override or extend the global configuration and includes user‑specific data and app definitions.unallocdata.json– loaded when the device is in the unallocated state (ready for a new user). It provides a minimal or default setup that runs before any user data is present.
All three files share a common top‑level structure. allocdata.json and unallocdata.json are often returned from the IES (Infrafon Entity Server) wrapped in a result/httpResponseCode envelope, but the device also supports local versions of these files.
// Common envelope for allocdata / unallocdata (when fetched from IES){ "result": "true", "httpResponseCode": 200, "data": { "global": { "dev": { /* … */ } }, "network": { /* … */ }, "user": { "visitor": "", "apps": { /* … */ } }, "apps": { }, "dicts": [ "config/locations.json", "config/names.json" ] }}
// global.json (standalone file, no wrapper){ "data": { "global": { "dev": { /* … */ } }, "network": { /* … */ } }}The always‑loaded baseline. Defines:
- Default device behaviour (
dev→ rules, core, wifi, alert, nfc, etc.) - Network configurations and their order (
network.networks,networkOrder) - The MQTT broker and IES endpoints (
entityMgrServer) - Fallback access point for DFU / provisioning (
ap)
Active while the device is assigned to a user. It adds:
- User‑specific overrides in
global.dev(merged with global.json) - The active network order
- A
usersection withvisitorname andappsdefining which DVs are loaded, their IDs, and where they come from (src: "local"or"inline") - Optional
dictsfor runtime TLV / language mapping
Active when no user is assigned. It provides:
- The basic device personality while idle
- A minimal set of apps (often just
home,syscfg,sysinfo, etc.) - The network order for the unallocated state
- Often the same structural shape as allocdata, but without user‑specific data
Dictionary Files
Section titled “Dictionary Files”Both allocdata and unallocdata can reference dictionary files that map two‑character keys to human‑readable strings. They are used for:
- Location names (e.g.
"a0":"ED") - User names (e.g.
"a":"Nurse 1") - TLV downlink mappings (e.g.
"0":"devcfg.vibr.song") - TLV uplink mappings
See Dictionary Files for the exact format.
Related
Section titled “Related”- MQTT Overview – how the device communicates after being configured
- Device States – the allocation state machine (allocated / unallocated)
- App Downlink – how DVs defined in
appsare targeted