# Pet Schema Notes (field reference)

This file collects **frequently-changing** field explanations and `set*` common inputs, so that the main [SKILL.md](../SKILL.md) does not need to be touched as often.

## Queries: common response fields

Notes:

- Returned fields follow the actual response; they typically live under `data.resp.body.data` or a similar nesting path (depending on the envelope).
- When a field is missing, treat it as "not returned by cloud / version difference"; do not hard-depend on it from the caller side.

### `getPetState` (pet state)

- **bindTs**: timestamp of the binding day
- **character**: current persona (`gentle`, `happy_sunshine`, `clingy`, `sensitive`, `irritable`)
- **characterValue**: current persona score (0–10)
- **nextCharacter**: next-stage persona (same enum; may be absent on older versions)
- **nextCharacterRequiredValue**: total score required to reach the next stage (0–100; may be absent on older versions)
- **lastCharacterChangeTs**: timestamp of the latest persona change (may be absent on older versions)

### `getVolume` (voice volume)

- **total**: total volume steps (integer)
- **volume**: current volume step (integer)
- **isAuto**: auto-adjust flag (`1` / `true` = auto; `0` / `false` = manual)

### `getMicro` / `getCamera` (microphone / camera)

- **enable**: `0` = off, `1` = on

---

## Settings: `set*` common inputs

For `set*` commands, the unified input names below are recommended. `get*` and `display` are out of scope here.

### Compatibility rules

- **Recommended prefix**: `pet_`
- **Case style compatibility**: `snake_case` and `camelCase` are both accepted (e.g. `petTimeoutSeconds` is equivalent to `pet_timeout_seconds`).
- **Boolean compatibility**: `0/1`, `true/false`, and `on/off` are all accepted.

### Common settings input fields

The names in parentheses are the on-device field names, listed for understanding only; callers do not need to depend on them.

- **`setMicro` / `setCamera`**: `pet_enable` (→ `enable`)
- **`setWakeTimeout`**: `pet_timeout_seconds` (→ `timeout`)
- **`setLanguage`**: `pet_language` (→ `use`)
- **`setNickname`**: `pet_wake_word` (→ `nickname`)
- **`setPetGender`**: `pet_gender` (→ `value`)
- **`setInitiateState`**: `pet_initiate_state` (→ `initiateState`)
- **`setVolume`**: `pet_total`, `pet_volume`, `pet_auto` (→ `total / volume / isAuto`)
- **`setEyesLight`**: `pet_total`, `pet_light`, `pet_auto` (→ `total / light / isAuto`)
  Note: this command is **not in the default allowlist** and some hardware returns `iot param error (20011)`; only enable it after on-device verification.
