Previous: , Up: Concepts   [Contents]


1.5 Data Flow

  1. configure parses <plugin name="tuya-cloud"> (credentials, poll interval, allowlist).
  2. start opens the cloud context on the worker thread, obtains a token, discovers devices, loads models, runs an initial poll, and emits a batch of STCAValue entries.
  3. The timer queues further polls; each successful poll re-emits the full batch.
  4. Adapter PUT /data/… (or D-Bus SetData) calls write_value(s), which groups commands per device and posts /v1.0/devices/{id}/commands on the cloud thread.
  5. stop cancels the timer and tears down the cloud loop.