Overview
Device state is organized into named containers called buckets. Each bucket has anobject_key, object_revision, and object_timestamp. All communication between device and server is framed in terms of buckets.
Object Key Format
device.09AA01AB12345678— device bucket for serial09AA01AB12345678shared.09AA01AB12345678— shared bucket for the same devicestructure.abc123— structure bucket for a homeuser.homeassistant— user bucket for pairing
Revision and Timestamp
Every bucket tracks two versioning fields:Sync Rules
Timestamp is the sole authority for determining which data is newer:Zero Timestamp Sentinel
A timestamp of0 signals “no data exists.” When the device receives object_timestamp: 0, it treats this as an invitation to upload its current local state via PUT. This happens after device reset or server-side data deletion.
Conditional Writes
Most buckets usebase_object_revision in PUT requests — informational only, no validation. One exception:
The shared bucket uses if_object_revision — a conditional write guard. If the revision doesn’t match the server’s current revision, the server should reject the write. This prevents the device from overwriting a temperature change the server pushed while the device was preparing its PUT.
All 28 Bucket Types
Direction key:
For most home server implementations, only the essential buckets need active handling:
device, shared, structure, user, and schedule.
Write Protection
Thedevice bucket has 113 device-only fields that the server cannot write. If you push a value for one of these fields, the device compares it against its local value and if different, re-sends its own value in the next PUT — actively overwriting your change.
Accept these re-PUTs normally. Do not try to fight them.
See device bucket for the full list.
Merge Strategy
- Subscribe responses (server → device): Shallow merge — device applies the fields in
valueto its local state - Schedule bucket: Full replacement — always push the complete schedule JSON
- PUT requests (device → server): Inline merge — data fields mixed with metadata at the top level