Skip to content

Release v0.5.0

Latest

Choose a tag to compare

@heshaoqiong-tuya heshaoqiong-tuya released this 24 Sep 02:13
· 30 commits to master since this release

Added

  • docs-site — English edition of the full documentation site, published at /en/ with Simplified Chinese retained at /.

    • All 29 docs are mirrored under docs-site/i18n/en/, with a locale selector in both the landing-page navbar and the custom docs topbar, localized navbar/footer/sidebar catalogs, and English SVG schematics under current/images/.
    • Heading anchors use explicit IDs shared across locales, and npm run check:i18n gates path, image, and anchor parity as part of npm run build.
  • iot-client — iot_client_config_t.skip_version_report skips SDK-meta and firmware-version reports during iot_client_init() (#37).

    • Default false reports both; set true when the cloud already has the current version.
  • tuya-ble — asynchronous nearby-WiFi lists over big-data, fixed CFG-status query replies, and an ESP-IDF scan provider (#35).

    • Configure wifi_scan_request; complete scans with their original token via tuya_ble_bigdata_wifi_list_complete() on the BLE owner context.
    • A scan provider enables WiFi-list/status capability discovery, not a complete PSK3.0 activation exchange.
  • docs-site — new bilingual guide "DP (Data Point): Definition, Creation, and Usage" under User Guides → Cloud Configuration (#41).

    • Covers the official three-level DP definition, the four elements (DPID/DPCode/type/constraints), the six data types, rw/ro/wr transfer modes, dps and cloud command-set message formats, cloud rate limits, platform-side DP creation, and DP usage in agentic-kit (schema intake, type mapping, core iot_dp_* APIs, a typical code flow), with official and on-site references.

Changed

  • SDK-wide — every build-time knob is renamed with an AGENTIC_KIT_ prefix and its default moves to its owning subsystem's config file; override per product with one agentic_kit_config.h on the include path, -D<NAME>=<value>, or AGENTIC_KIT_USER_CONFIG (#38).

    • BREAKING TAI_FRAG_BUF_SIZE → AGENTIC_KIT_TAI_FRAG_BUF_SIZE, RESPONSE_BUFFER_SIZE → AGENTIC_KIT_RESPONSE_BUFFER_SIZE, and likewise the rest — old→new table in docs-site/docs/guides/compile-time-knobs.md.
    • Knob defaults live at: the override pickup in common/log.h; PAL task sizing in pal/pal_config_defaults.h; per-module knobs in each module's include/ (iot_client_config_defaults.h, tai_config_defaults.h, tuya_ble_config_defaults.h). Non-knob module data (version strings, endpoints, log binding) lives in each module's src-side internal header (src/iot_internal.h restores and renames the former iot_config_defaults.h).
    • Removed the dead IOT_DO_NOT_USE_CUSTOM_CONFIG flag from the ESP-IDF component.
  • SDK-wide — one compile-time log ceiling AGENTIC_KIT_LOG_LEVEL (0–4, default 4) gates every SDK log macro via the new log_tag_* facade in common/log.h; module code no longer calls log_emit() directly (#40).

    • BREAKING -DTAI_LOG_LEVEL=N (rtc-tcp-client only) and the dead -DLOG_LEVEL both move to -DAGENTIC_KIT_LOG_LEVEL=N, which now silences the whole SDK at compile time. Lowering only rtc-tcp-client afterwards is the new -DAGENTIC_KIT_TAI_LOG_LEVEL=N (see below).
    • Optional per-module log ceilings were added back on top: AGENTIC_KIT_IOT_LOG_LEVEL, AGENTIC_KIT_TAI_LOG_LEVEL and AGENTIC_KIT_TUYA_BLE_LOG_LEVEL all default to the SDK-wide ceiling and can only lower their one module below it (effective ceiling = the smaller of the two; values above the global ceiling are clamped to it once in each module's config file, so block-level gates see the effective ceiling too). They gate each module's vocabulary where it is defined, ride the same override pickup, and keep the compile-time-only property — below 3, the rtc-tcp-client packet-log formatter vanishes with its calls. tuya-ble gains its first knob and its tuya_ble_config_defaults.h this way.
    • BREAKING the runtime log layer is removed: log_set_level(), log_get_level() and the tai_set_log_level()/tai_get_log_level() wrappers are gone, and log_emit() no longer filters — the ceiling is the only level gate, so what compiles in is what emits. Migrate runtime log_set_level(N) calls to a lower ceiling at build time, or to level filtering inside your AGENTIC_KIT_LOG target.
    • BREAKING the runtime handler is removed too: log_set_handler(), log_fn_t and the public log_default_handler() are gone — the destination is a compile-time fact, with no mutable log state left in the SDK. Make the old handler function the AGENTIC_KIT_LOG target (it now receives the level and the bare tag directly), and use the new log_emit_valist() — the facade's va_list entry, the esp_log_writev role — to reuse the default stderr output from a function sink. The SDK's own tests migrated the same way: each test build remaps the dispatch into one sink whose capture/quiet/count are modes, not handler swaps.
    • The dispatch itself is customer-remappable at compile time: defining AGENTIC_KIT_LOG(level, tag, fmt, ...) routes every SDK log line into your own macro — straight into ESP_LOGx-style systems with no va_list round trip (the tag arrives as its own token). The AGENTIC_KIT_LOG_LEVEL ceiling still applies, and since there is no runtime handler anymore, the remap is the one and only destination switch. The ESP-IDF pair-by-ble example now uses exactly this: kit_opts/agentic_kit_config.h maps the facade onto ESP_LOG_LEVEL_LOCAL, replacing its old runtime callback (each line also keeps its real module tag instead of one shared "tuya_ble" tag).
    • rtc-tcp-client packet logging selects its INFO/DEBUG sink at compile time — sampling builds have exactly one level; flood mode needs AGENTIC_KIT_TAI_LOG_MEDIA_SAMPLE_N=0 plus a DEBUG ceiling and vanishes otherwise — and its JSON formatter compiles out below INFO. A compile-matrix test builds 19 level × sampling combinations across both the SDK-wide and the rtc-tcp-client-only ceiling, including module-above-global clamp probes.
  • tuya-ble — the SDK-internal log-facade binding, scan-token rotation and pending-credential
    delivery are each defined once in tuya_ble_internal.h instead of being repeated per module.

  • tuya-ble — bounded per-state Trsmitr reassembly, queued TX with backpressure, and configurable radio capability (#35).

    • Ports drive tuya_ble_prov_set_gatt_payload(), tuya_ble_prov_tx_ready() and tuya_ble_prov_tick(); call tuya_ble_prov_close() on disconnect/reset.
    • Recompile consumers for the public state/config layout changes; comm_ability = 0 selects 2.4 GHz.
  • rtc-client — upgrade libstm(#33).

  • rtc-client — frames under TAI_FRAME_COALESCE_LIMIT (default 512 B) now coalesce into a
    single transport write: Ping, control packets and small audio chunks drop from 2–3 TLS
    records to 1(#32).

Fixed

  • tuya-ble — accept incoming Trsmitr versions >= 2 for app Pairing compatibility while keeping TX at version 4 (#39).
  • Docs — the pair-by-ble callback sample no longer claims credentials are never logged; the
    demo's DEBUG protocol log prints the credential JSON on purpose, for device bring-up.
  • Docs — the pair-by-ble stop section now also states the port's nimble_port_deinit() abort,
    instead of implying every tuya_ble_nimble_stop() failure is retryable (#35).
  • tuya-ble — preserve pending credentials under TX backpressure and route Trsmitr diagnostics through the log facade (#35).
  • Examples — isolate BLE WiFi scan completions across cancellation, join workers before teardown, and restart STA before connecting (#35).
  • tuya-ble — enforce Pairing/KEY_12 credential authorization, reject replayed Frames, and accept the app's extra CBC padding block (#35).
  • tuya-ble — reset Pairing state on device-info re-query and defer credential delivery until queued acknowledgements are accepted by the port (#35).
  • iot-client — US-East (UEAZ) fell back to an ATOP host that does not resolve(#31).
    IOT_UEAZ_HOST is now a1-ueaz.tuyaus.com.