watchface_create_local_clock
Create and upload a custom local clock watchface to a Divoom LAN device by providing a backdrop image and clock element metadata.
Instructions
POST /create_local_clock (multipart) — Device/CreateLocalClock. metadata.DialAssets accepts 'auto' (default; sniffs gzip magic on the file part), 'image' (single JPEG/WebP backdrop), or 'bundle' (clock_bg.tar.gz). Legacy UseDialAssetBundle (0=image, non-0=bundle) is honored when DialAssets is omitted. Backdrop is JPEG/WebP only; element slots inside the tarball accept JPEG/WebP/PNG (firmware wf_validate_bundle_slot_image_file). Each ItemList[i] needs disp/font/x/y/w/h/size/alig numbers and color_1/color_2/item_id non-empty strings; ItemIdList must be a parallel non-empty string array. alig: 3=center, 4=left, 5=right. Pointer slots DIVOOM_CLOCK_DISP_SUPPORT_HOUR_POINT_IMAGE=131, MIN_POINT_IMAGE=132, SECOND_POINT_IMAGE=233: mandatory shared square w=h and identical x,y,w,h on all three rows; w×w bitmaps; center pivot, hand toward 12 o'clock — never full-screen 800×1280 layers or mismatched thin rects; reference ClockId 60012 export. transp: MUST use 100 for visible layers — LLMs often emit 0 → invisible on device. hier: ONLY 0=auto, 1=bottom, 2=top (no tier 3+). See docs/tool-examples.md §5b. Uniqueness: do not duplicate the same image-backed disp in one dial — later rows overwrite earlier ones; especially NET_PIC family (disp 13, 125–130, 173–175, DIVOOM_CLOCK_DISP_SUPPORT_NET*_PIC); see docs/disp-usage.md. Multipart framing (Content-Length per part): see watchface_upload_file description.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Optional per-call target override. If omitted, environment variables are used. | |
| imagePath | Yes | Either a single JPEG/WebP dial backdrop (recommend 800x1280, ≤ 500 KiB) or a `clock_bg.tar.gz` USTAR+gzip archive. Tar contents: required `clock_bg.jpg|webp` at the root plus one file per local leaf referenced by `ItemList[i].image_addr` (no subdirs, leaf basenames ≤ 95 bytes). Leaves may be JPEG/WebP/PNG; non-supported sources should be transcoded client-side. | |
| metadata | Yes | First multipart JSON: `ClockName`, `ItemList`, `ItemIdList`. Optional `DialAssets` (`auto`|`image`|`bundle`) or legacy `UseDialAssetBundle` (0/!=0). In bundle mode, `ItemList[i].bundle_image` is an alias for `image_addr` leaf and is also accepted. Tool minifies the JSON before sending. | |
| filePartName | No | Second multipart part name. Default is current UTC ms timestamp. | |
| fileName | No | Filename in multipart header. Defaults to basename(imagePath). |