Scouts can return "reports" on demand as well as automatically trigger them when they detect state changes.
Each report is it's own minimal JSON object, they all must be <100 bytes serialized to fit on the RF mesh.
A report always contains a "_":"***"
where *** is the type of report it is, all of which should be documented below.
This report is sent upon startup.
- "e" - integer (1-255), EEPROM version
- "hv" - integer (1-255), hardware version
- "hf" - integer (1-64k), hardware family id
- "hs" - integer (big), hardware serial id
- "b" - integer, build version (YYYYMMDD)
- "m" - integer, milliseconds since boot
- "f" - integer, free memory
- "r" - integer, random number
- "t" - integer, celcius
- "h" - integer, high since last boot
- "l" - integer, low since last boot
Triggered every change of degree.
- "p" - integer from 0 to 100, battery percentage charged
- "v" - integer, battery voltage usually 370-420 (3.7V to 4.2V)
- "c" - bool, battery charging state
- "vcc" - bool, is vcc enabled
- "a" - bool, alarm triggered
Power reports are automatically sent every 10% of battery change, and every 1% when below 5. They are also sent whenever charging is enabled/disabled.
- "l" - array of [1,2,3], the rgb status of the main led colors (0-255 each)
- "t" - [1,2,3] rgb status of the torch colors
- "a" - array of all 8 analog pin values, each array entry is 0-1023, [0,0,0,255,0,42,0,128]
- "d" - array of all 7 digital pin values, each array entry is 0/1 (LOW/HIGH), [0,0,0,1,0,1,0]
This report is sent upon any pin change (by command or by hardware) and no more often than once every 10 seconds.
A list of all attached backpacks is sent as one report
- "a" - array of all attached backpacks, ["wifi","env"]
This report is sent on startup, and whenever a backpack is added/removed.
Each backpack attached generates it's own report (two backpacks on one scout would be two reports). These reports are sent on startup and whenever a backpack is added/removed.
- "b" - name of backpack, "wifi" or "env", etc
- "v" - version of backpack, float
There may be more values based on each backpack (power usage, etc).
"b":"wifi"
- "v" - version
- "c" - connection status, true/false
- "n" - network (max 16 char)
- "id" - device id, integer
- "p" - pan id, integer
- "c" - channel id, integer
- "tx" - transmit power, string
- "r" - data rate, string
- "t" - routing table size, integer