Dokit
Internal development documentation
|
updateInterval
is uint16
seconds (as per the Pokit API 1.00), however for Pokit Pro it's uint32
milliseconds, even though that's not officially documented anywhere. updateInterval
is uint16
(as per the Pokit API 1.00), however for Pokit Pro it's uint32
, even though that's not officially documented anywhere. Also note, the doc claims 'microseconds' (ie 10^-6), but clearly the value is 'milliseconds' (ie 10^-3) for Pokit Pro, and whole seconds for Pokit Meter. null
byte to serial number strings. So here we strip any that are present. a59f052e-c2a1-46b6-8025-64e485c00162
- read/writef89e4130-4347-45ef-b092-4f29e6f3a608
- write only57d3a771-267c-4394-8872-78223e92aec4
which is correct for the Pokit Meter, but Pokit Pro uses 57d3a771-267c-4394-8872-78223e92aec5
instead, that is the last digit is a 5
not 4
. SWITCH_MODE_VOLTAGE
, SWITCH_MODE_ALL
and SWITCH_MODE_CURRENT
. The button event is the second byte, but no idea what the first byte is. In all examples I've see it's always 0x02
. It appears that the Pokit Android app only ever looks at bytes[1]
.
Note, we can actually write to the Button Press characteristic too. If we do, then whatever we set as the first byte persists, and (unsurprisingly) the second byte reverts to the current button state. So still no idea what that first byte is for.
Status
characteristic is 5 bytes. API 1.00 then added an additional byte for Battery Status
, for 6 bytes in total. However, Pokit Pro devices return 8 bytes here. It appears that the first of those 2 extra bytes (ie the 7th byte) is used to indicate the physical switch position, while the other extra byte (ie the 8th byte) indicates the device's current charging status.