66 lines
4.8 KiB
Markdown
66 lines
4.8 KiB
Markdown
# Watex Device Management
|
|
|
|
This context defines how Watex manages device identity, ownership, and user-generated device data throughout a device's lifecycle.
|
|
|
|
## Language
|
|
|
|
**Active Device Binding**:
|
|
The exclusive relationship that grants one user access to a device's live state, details, data, and controls and permits binding-scoped MQTT reports to create or update data. A device has at most one active binding at a time.
|
|
_Avoid_: Device ownership, shared binding
|
|
|
|
**User Device Relationship**:
|
|
The single lifecycle relationship between one user and one device that drives the user's list state. It is reactivated rather than duplicated when the same user binds the device again, while the device may have relationships with different users over time.
|
|
_Avoid_: Binding history, device ownership
|
|
|
|
**Binding in Progress**:
|
|
The exclusive reservation created while a binding identifier is being delivered to the device. It appears as "binding" in the user's list and grants no device access until the device acknowledges that identifier.
|
|
_Avoid_: Active binding, bound device
|
|
|
|
**Binding Failed**:
|
|
A non-active list state reached when binding delivery exhausts its retries without device acknowledgment. It grants no device access, does not reserve the device, and allows the user to retry or remove the list entry.
|
|
_Avoid_: Active binding, binding in progress
|
|
|
|
**Device Unbinding**:
|
|
The source-independent workflow that terminates a device's active binding, revokes the former user's device access, and clears user-specific or runtime data while retaining the device's inventory identity and an unbound device entry for that user.
|
|
_Avoid_: Device deletion, device removal
|
|
|
|
**Unbinding in Progress**:
|
|
A binding state entered as soon as a valid unbinding command is accepted. It appears as a non-interactive "unbinding" item in the former user's device list, grants no device access, prevents any new binding while cleanup is incomplete, and never returns to active after cleanup failure.
|
|
_Avoid_: Active binding, completed unbinding
|
|
|
|
**Unbinding Recovery**:
|
|
The durable continuation of cleanup for a binding in progress. It survives server restarts, retries without depending on another device message, and keeps the device unavailable until cleanup succeeds.
|
|
_Avoid_: Binding rollback, device-triggered retry
|
|
|
|
**Device-Initiated Unbinding**:
|
|
Device unbinding initiated when the server receives an MQTT unbinding message from the device. It follows the same state and cleanup rules as user-initiated and administrator-initiated unbinding; offline button behavior and messages not received by the server are outside this workflow.
|
|
_Avoid_: Offline unbinding, local reset
|
|
|
|
**Unbound Device Entry**:
|
|
A display-only item retained in a former user's device list with the device name and number captured at unbinding, the unbound status, and the unbinding time. If the same user binds the device again, this item becomes the active list item instead of creating a binding-history entry; it grants no access while unbound.
|
|
_Avoid_: Binding history, archived device, inactive binding
|
|
|
|
**List Entry Removal**:
|
|
The physical removal of the user's `UNBOUND` or `BIND_FAILED` relationship from their own device list. It does not remove command or audit records, delete the device's inventory identity, or affect another user's active binding; a later binding creates a new relationship.
|
|
_Avoid_: Device deletion, device unbinding
|
|
|
|
**Binding-Scoped Device Data**:
|
|
User configuration and runtime data belonging to an active binding, including the user's device name, Wi-Fi credentials, watering records, telemetry state, pending commands, and runtime caches. It is permanently cleared when that binding is terminated and is never part of an unbound device entry.
|
|
_Avoid_: Device history, archived device data
|
|
|
|
**Device Inventory Identity**:
|
|
The stable device information retained across bindings: device number, MAC address, factory name, model, serial number, firmware version, QR code, image, and expiration time. It allows an unbound device to remain managed and bindable without retaining a former user's data.
|
|
_Avoid_: User device data, device binding
|
|
|
|
**User Schedule**:
|
|
A user-owned watering plan whose timing and configuration exist independently of any one device. Unbinding a device removes that device's schedule associations but retains the schedule, its details, and associations with other devices.
|
|
_Avoid_: Device schedule, device-owned schedule
|
|
|
|
**Device Deletion**:
|
|
The permanent removal of an unbound device's inventory identity together with its related data. A bound device must be unbound before it can be deleted.
|
|
_Avoid_: Device unbinding
|
|
|
|
**Device Initialization**:
|
|
The physical reset that removes user configuration from a device after unbinding. Device-initiated unbinding completes it after an `applied` result, while user-initiated or administrator-initiated unbinding requests it asynchronously from the server.
|
|
_Avoid_: Device unbinding
|