denki 0.2.0

CLI for controlling TP-Link smart home devices — denki (電気) means electricity in Japanese
Documentation
# devices.toml — source of truth for device capabilities
#
# Each entry maps a real device model to a DeviceKind and the set of
# features denki supports on that kind.
#
# Capability consistency tests in src/app/tests/capabilities.rs parse this
# file (via src/devices/registry.rs) and verify that:
#   1. Every feature listed here is permitted by the corresponding can_* guard.
#   2. Every guarded feature NOT listed here is denied by the guard.
#
# When you add or change a guard in src/devices/guards.rs, update this file
# to match. When you add a new device model, add an entry here.
#
# Guarded features (each maps to a can_* function in src/devices/guards.rs):
#   power      — can_control_power(kind)
#   dim        — can_dim(kind)
#   color_temp — can_set_color_temp(kind)
#   color      — can_set_color(kind)
#   specs      — can_get_specs(kind)
#   presets    — can_get_presets(kind)
#   schedules  — can_get_schedules(kind)
#   led        — can_control_led(kind)
#   clock      — can_get_clock(kind)
#
# Informational features (listed in supports; not enforced by the
# capabilities consistency test's GUARDED set):
#   energy     — available on Bulb/LightStrip always; Plug/Strip when ENE is set
#   outlets    — Strip kind only
#   effects    — LightStrip only (also has can_get_effects; used by handlers)

# ── Bulbs ─────────────────────────────────────────────────────────────────────

[[device]]
model    = "KL135"
kind     = "Bulb"
verified = true
supports = ["power", "dim", "color_temp", "color", "energy", "specs", "presets"]
# schedules / led / clock not present on KL135

[[device]]
model    = "LB130"
kind     = "Bulb"
verified = false
supports = ["power", "dim", "color_temp", "color", "energy", "specs", "presets"]
# older generation; same guard profile as KL135

# ── Light strips ──────────────────────────────────────────────────────────────

[[device]]
model    = "KL430"
kind     = "LightStrip"
verified = false
supports = ["power", "dim", "color_temp", "color", "energy", "effects"]

[[device]]
model    = "KL420L5"
kind     = "LightStrip"
verified = false
supports = ["power", "dim", "color_temp", "color", "energy", "effects"]
# light-strip support matches the KL430 namespace

# ── Dimmers ───────────────────────────────────────────────────────────────────

[[device]]
model    = "HS220"
kind     = "Dimmer"
verified = false
supports = ["power", "dim", "schedules", "led", "clock"]

# ── Plugs ─────────────────────────────────────────────────────────────────────

[[device]]
model    = "KP115"
kind     = "Plug"
verified = true
supports = ["power", "energy", "schedules", "led", "clock"]

[[device]]
model    = "HS110"
kind     = "Plug"
verified = true
supports = ["power", "energy", "schedules", "led", "clock"]

[[device]]
model    = "HS105"
kind     = "Plug"
verified = true
supports = ["power", "schedules", "led", "clock"]
# no energy chip — feature string is "TIM", not "TIM:ENE"

# ── Power strips ──────────────────────────────────────────────────────────────

[[device]]
model    = "HS300"
kind     = "Strip"
verified = true
supports = ["power", "energy", "schedules", "led", "clock", "outlets"]
# Verified on HS300(US) HW 2.0 / FW 1.1.2
# HW 2.0 omits relay_state from sysinfo (defaulted) and uses short child IDs ("00"–"05")
# that must be prefixed with deviceId for per-outlet commands

[[device]]
model    = "KP303"
kind     = "Strip"
verified = false
supports = ["power", "schedules", "led", "clock", "outlets"]
# KP303 typically lacks energy monitoring (feature string is "TIM", not "TIM:ENE")

# ── Tapo devices (KLAP protocol) ──────────────────────────────────────────────

[[device]]
model    = "P125"
kind     = "Tapo"
protocol = "klap"
verified = true
supports = ["power"]
# Auto-adapter info and on/off readbacks verified on HW 1.0,
# FW 1.4.0 Build 260803 Rel.232153; toggle remains unverified.
tapo_auto_supports = ["power"]
tapo_auto_verified = false
# Original Tapo entries select KLAP; auto-adapter capabilities are separate.

[[device]]
model    = "P110"
kind     = "Tapo"
protocol = "klap"
verified = false
supports = ["power", "energy"]

[[device]]
model    = "P115"
kind     = "Tapo"
protocol = "klap"
verified = false
supports = ["power", "energy"]

[[device]]
model    = "KP125M"
kind     = "Tapo"
protocol = "klap"
verified = false
supports = ["power", "energy"]

[[device]]
model    = "P125M"
kind     = "Tapo"
protocol = "klap"
verified = false
supports = ["power"]