/
Binary data storage
Binary data storage
With GCP, device state data is always stored as a base64-encoded representation of the raw data bytes. This differs with ClearBlade IoT Core whenever the state data contains non-printable characters (i.e., the data is not a string). In that case, the text data representation holds a HEX string representing the raw data bytes. Extracting the raw data from the HEX string requires using the Python bytes.fromhex()
function (or equivalent in other languages). When using the cloudiot_devices_states API to retrieve binary states, the base64Encode
query param should be excluded or set to false
to receive a response containing the above HEX string.
Related content
Differences from Google IoT Core
Differences from Google IoT Core
Read with this
Getting device state
Getting device state
More like this
list: projects.locations.registies.devices.states
list: projects.locations.registies.devices.states
Read with this
REST reference
REST reference
More like this
Migration tutorial
Migration tutorial
Read with this
projects.locations.registries.devices.states
projects.locations.registries.devices.states
More like this