SmartThings-Local

Python library and reference bridge. 2026.


A Python library for controlling Samsung connected appliances directly on the LAN, over authenticated CoAP-over-DTLS, with no SmartThings cloud round-trip. It ships the DTLS transport, a state layer built on tiered polling and OBSERVE, and the certificate tooling needed to mint an identity the appliance will accept.

The design follows from one finding. The appliance emits CoAP OBSERVE notifications on the LAN within about 100ms of a state change, but only while it can reach Samsung’s servers; the decision to send is gated inside its cloud-publish thread. Block the appliance from the internet and the pushes stop, even though the LAN path is untouched and the device still answers reads and accepts writes at full rate. Push could not be the foundation.

So freshness comes from polling. Door and operational state refresh on a sub-second tier, mode and alarms every 15 to 30 seconds, and a sweep of the full /device/0 tree every five minutes. Cadences were calibrated against measured per-firmware ceilings, around 14 requests a second on the dryer and 8 on the oven. OBSERVE stays on as an accelerator: a notification is absorbed into the cache and resets that resource’s next-poll timer. Air-gapped, worst-case lag goes from ~100ms to one tier interval, and nothing else about the behaviour changes.

Published on PyPI as smartthings-local under MIT, for Python 3.11 and up. The repository also carries a reference MQTT bridge that presents the library as auto-discovered Home Assistant entities, one DTLS session per appliance. Washer and fridge support came from outside contributors, and mbillow’s localthings component builds on the package, which is where new appliance mappings now go.

return home

/
Repository
github.com/QuiteYellow/SmartThings-Local →
Package
pypi.org/project/smartthings-local →
License
MIT
Stack
Python 3.11+ · CoAP over DTLS · cbor2 · pyOpenSSL
Protocols
OCF · RFC 7252 (CoAP) · RFC 7641 (Observe) · RFC 7959 (Block2)
Status
Public source, alpha