This board generation predates every AC dump the registry was built from and differs in three ways, all handled here behind presence checks so no other family's behaviour changes: * No /wind/* resources at all. Fan speed and vane direction share a single /airflow/vs/0 resource, whose speedLevel uses the same 0-4 scale as _DEVICE_TO_FAN and whose direction uses the same codes as _DEVICE_TO_SWING, so the existing maps are reused rather than duplicated. The resource reports no supportedModes, so the full scale is offered. * No /mode/convenient/vs/0. The convenient-mode preset is a Comode_* token in /mode/vs/0's options, synthesised into a convenient-shaped rep so the existing dynamic preset resolver keeps working unchanged. Codes were learned by driving one unit through its cloud integration and reading the token back each time: Nano is what the app calls WindFree, plus Quiet/Comfort/2Step/ Speed (Fast Turbo) and Off. * Several settings that newer boards expose as dedicated resources are options tokens here: SPI, auto clean, air monitoring, beep volume, Good Sleep, outdoor temperature and filter time. Writes reuse option_write's single-token merge, the same mechanism the display light already uses on this href. Newer families carry some of the same tokens *alongside* dedicated resources for those settings, so the token entities are gated on this generation's resource shape (/airflow/vs/0 present, /wind/strength/vs/0 absent -- the same test the climate entity's fan/swing fallback uses, so the two can never disagree). Without that gate they duplicated auto clean on TP1X/TP2X boards and applied a calibration from this board to theirs. Two calibrations, both from hardware rather than from the token names: OutdoorTemp is offset by 55 (token 75 against a 20.3 C outdoor thermometer in the same install, token 74 against a 19.4 C forecast; Fahrenheit fits far worse), and FilterTime is tenths of an hour (token 1710 while the official Samsung app displayed "171 hours 0 minutes" for the same unit's filter). Whether filter time counts up or down is deliberately not claimed: it was seen rising while the unit ran, which contradicts the app's "remaining" wording. Humidity now falls back to the plain x.com.samsung.da.humidity field where fivepercentHumidity is absent, still as one entity rather than two, and 0 reads as "not measuring" rather than 0% -- on this board the field only carries a reading (51%, matching the same unit's cloud integration) while Air monitoring is on, which the unit switches back off by itself after about a minute. Fan, swing, preset, SPI and beep-volume writes were confirmed by read-back on hardware. Good Sleep's upper bound is a guess (only 0 has been observed), and /airflow/0 -- the OCF-standard mirror of the vendor resource -- is ignored rather than modelled, since air_purifier.py found the opposite reliability ordering between these two hrefs on its own family. Refs #136
LocalThings
A native Home Assistant custom integration for local control of newer-generation Samsung connected appliances. No cloud round-trip. Add a device through HA's normal Settings > Devices & Services flow and it talks CoAP-over-DTLS straight to the appliance on your LAN.
This integration uses the smartthings-local library to handle the low-level DTLS/CoAP communication with devices.
What you get
Adding a device just needs a host IP and your CA credentials in the UI. The integration reads the appliance's identity and picks the matching capability registry on its own, so there's no per-model descriptor to write for a new unit of a type that's already supported.
Credential setup is one-time. The first device you add asks for a CA certificate and key (see Part 2); every device after that reuses the same stored CA and only asks for the host IP, minting its own per-device leaf cert automatically.
Your state stays on your LAN: HA talks to the appliance over a direct DTLS session, and Samsung's cloud sees nothing from this integration. (The appliance itself still maintains its own connection to Samsung; that's firmware behavior on the device side, not something this integration controls.)
Supported appliance types
| Type | Registry |
|---|---|
| Air conditioner | by_type/airconditioner.py |
| Air purifier | by_type/air_purifier.py |
| Dehumidifier | by_type/dehumidifier.py |
| Dryer | by_type/dryer.py |
| Oven | by_type/oven.py |
| Microwave | by_type/microwave.py |
| Gas cooktop (read-only burner status) | by_type/cooktop.py |
| Range hood | by_type/range_hood.py |
| Range | by_type/range.py |
| Dishwasher | by_type/dishwasher.py |
| Refrigerator | by_type/refrigerator.py |
| Washer | by_type/washer.py |
| Water purifier | by_type/water_purifier.py |
| Vacuum clean/auto-empty station | by_type/vacuum_station.py |
Each registry composes shared and family-specific Capability objects from registry/capabilities/; those modules document the individual resources/entities in more depth than a README table can stay current with.
Other Tizen RT / DAWIT-family appliances almost certainly speak the same protocol underneath, since the auth path and CoAP primitives are shared across the fleet. Adding a new type means writing a new by_type/<name>.py registry file; it doesn't require reverse-engineering the protocol again. See Adding a new appliance type below.
Part 1: Is your appliance compatible?
# UDP scan for DTLS-CoAP ports
nmap -Pn -sU -p 49152-49160 "$APPLIANCE_IP"
- Any UDP port in
49152-49160open|filtered with a DTLS handshake responding: newer firmware (Tizen RT 3.x, DAWIT 3.0+). This is what the integration talks to. Most devices answer on49154/49155, but some builds bind lower (e.g.49153). The config flow sweeps the whole range and auto-detects the live port, so you don't need to know which one your device uses. - Only
8888/tcpopen (token-based HTTPS): older firmware (roughly 2018-2022). Not supported here.
Part 2: One-time setup, get the AC14K_M CA credentials
The config flow (Part 3) needs a CA certificate and CA private key to mint each device's leaf cert itself. Specifically, it needs the AC14K_M intermediate CA — a cert chain that's been public for years and still ships in current Samsung firmware trust stores. Every Samsung Tizen/RT-OCF appliance trusts identities chained to that CA with full access by default, so a cert signed by it is what lets HA talk to your appliance without Samsung's cloud in the loop. HA doesn't need the device's original cert or key, only something AC14K_M has signed, and it mints that itself once you give it the CA.
This repo doesn't include the needed CA bundle. For an example of how to obtain it, including fetching the AC14K_M cert and key and verifying they pair, see the smartthings-local protocol project's setup_cert.py. However you obtain the CA cert and key, paste their PEM contents into the HA config flow's "CA Certificate (PEM)" and "CA Private Key (PEM)" fields in Part 3. You only need to do this once, since every appliance you add afterward reuses the same stored CA.
Part 3: Add the integration in Home Assistant
- Copy
custom_components/localthings/into your HA config'scustom_components/directory. (Or add this repo as a custom repository in HACS —Integrationcategory — and install it from there.) - Restart HA.
- Settings > Devices & Services > Add Integration > LocalThings.
- First device: paste the appliance's IP, plus the contents of the CA private and public key from Part 2.
- The flow fetches the current UUID from Samsung's cloud gateway, mints a leaf cert signed by your CA, sweeps the
49152-49160range to find the live DTLS port, and confirms the device answers/device/0. On success it creates the config entry and detects the device type automatically. - Every subsequent device only asks for the host IP; the stored CA credentials are reused to mint that device's leaf cert.
Entities appear under one HA device per appliance, named Samsung Appliance (<ip>) initially. Rename freely: the config entry is keyed on the device's serial, not the name.
Development
Docker Compose dev environment
docker compose up -d --build
docker compose logs -f
The Dockerfile builds on the official home-assistant/home-assistant:stable image and pre-installs smartthings-local, so the dependency is present at container start instead of depending on HA's own runtime pip-install step. Re-run with --build whenever the pinned smartthings-local version changes.
docker-compose.yml sets network_mode: host, which is required since DTLS is UDP and won't traverse Docker's bridge NAT to reach LAN appliances, and bind-mounts custom_components/localthings/ read-only into ha_config/custom_components/. Bump custom_components.localthings to debug in ha_config/configuration.yaml for verbose protocol logging.
Tests
python3 -m venv .venv
.venv/bin/pip install -r requirements-dev.txt
.venv/bin/pip install pytest-homeassistant-custom-component homeassistant
.venv/bin/pytest tests/ -q
A large suite covering registry composition, discovery, entity descriptors, and golden-file regression against captured device dumps. requirements-dev.txt pins smartthings-local the same way manifest.json does, so tests exercise the real published protocol layer rather than a vendored copy.
Repo layout
custom_components/localthings/
manifest.json Requirements (incl. the smartthings-local PyPI dep), version, domain
__init__.py async_setup_entry / async_unload_entry
config_flow.py UUID fetch, leaf cert minting, port probing, config entry creation
coordinator.py Polling + push update coordination, stale-state fallback, write dispatch
observe.py CoAP OBSERVE (push-mode) support layered on the coordinator
diagnostics.py Redacted diagnostics download (device state + coverage metadata)
const.py Domain, config keys, probe ports
entity.py Base entity wiring capability registry -> HA entity
sensor.py / binary_sensor.py / switch.py / number.py / select.py / button.py / time.py / fan.py / climate.py
One module per HA platform
catalog.py Reads the shipped translation catalog (which keys/states exist)
translations/ Config-flow copy + entity name/state translations, one file per
language; en.json is the source of truth (no strings.json —
Home Assistant never reads one from a custom integration)
registry/
registry.py Builds the global capability registry, validates href collisions
capability.py Capability dataclass (href, entities, transforms)
entities.py Per-platform entity descriptor dataclasses
discovery.py Binds a device's live resources to registered capabilities
adapter.py Flattens bound entities into HA-ready state
identity.py Reads device identity for type detection
redact.py Strips account/identity data before diagnostics leave HA
capabilities/ Shared + per-family Capability definitions (common, airconditioner,
cooktop, range_hood, dryer, oven, dishwasher, fridge, washer,
laundry, operational, ignored)
by_type/ One DeviceRegistry per appliance type, composed from capabilities/
tests/ Registry composition, discovery, entity descriptors, coordinator/observe
behavior, and golden-file regression against captured device dumps
requirements-dev.txt Test deps, including the smartthings-local package
docker-compose.yml / ha_config/ Local HA dev environment
Reporting a capability gap
If your appliance's type isn't recognized, or it exposes resources this integration doesn't model yet, a Repairs issue appears under Settings > System > Repairs pointing you at Settings > Devices & Services > this device > the menu > Download diagnostics. That download is already redacted of account/network identifiers (Bixby login email, access tokens, device IDs, MAC addresses, serial numbers) before it's generated, so it's safe to attach directly to a new issue using the linked device-support template. This is the fastest way to help add or expand support for hardware the maintainers don't have.
Adding a new appliance type
- Get a capture of the appliance's
/device/0response. The easiest way: add the device to HA (type detection failing is fine) and pull its Diagnostics download from Settings > Devices & Services > the device > the menu > Download diagnostics — it already contains a redacted dump of the device's resources. - Reuse existing
Capabilityobjects fromregistry/capabilities/wherever the resource matches one already declared. Mostcommon.pycapabilities (power, kids lock, remote control, alarms, energy/water meters) are shared verbatim across families; add new ones only for resources unique to the new type. - Create
registry/by_type/<name>.pywith aDeviceRegistry(name=..., capabilities=_build([...])). Usepattern_capabilitiesinstead ofcapabilitiesfor any resource whosehrefisn't fixed (for example per-compartment fridge resources); seerefrigerator.pyfor the pattern. - Register it in
_REGISTRY_BY_KEYinregistry/by_type/__init__.py, keyed on the lowercased, space/hyphen-to-underscore-converted suffix of the device'soneUiVersionstring (see_type_key()in that file for the exact transform). If the device never reportsoneUiVersion, add its consumer-model prefix to_CONSUMER_PREFIX_TO_KEYsofor_device_by_model()can route it. If it also omits/information/vs/0(as the verified NA9300K cooktop does), add a distinctive, conservative resource-signature rule tofor_device_by_resources(). - Add golden-file coverage in
tests/against a captured/device/0dump for the new type.
No config-flow changes are needed. Device-type detection and entity wiring are fully driven by the registry.
Known device behavior
Samsung's firmware occasionally drops the DTLS session briefly — this is normal appliance-side behavior, not a bug. The integration reconnects automatically, and from HA's perspective a brief reconnect looks like an entity holding its last value for one poll cycle rather than going unavailable. When an appliance supports it, the integration prefers push-based updates (instant, via observe.py) over polling, falling back to polling otherwise.
If reconnects become persistent (more than a handful per minute), something's actually wrong. Check the appliance's Wi-Fi link first, then look for a competing DTLS client on the LAN — only one active session per appliance is allowed at a time.
Contributing
Patches are welcome, especially:
- New
by_type/registries for appliance families not yet covered (AC, microwave, etc.) on the same Tizen RT 3.x firmware family. - Confirmation or refutation of compatibility on additional models within an already-supported type.
- Protocol-level fixes, which belong upstream in
smartthings-localrather than here. HA-side fixes (entities, config flow, coordinator, registry) belong in this repo.
If you submit a PR, please don't include real device UUIDs, MACs, serials, IPs, or CA private key material. Use the placeholders from the config-flow form instead.