Power control
Turn a smart plug on or off. The plug runs Tasmota firmware, so you can drive it directly over HTTP or from Python — no broker required.
Tasmota exposes a command endpoint at /cm. Address the plug by its IP or
mDNS hostname (<plug-host>) — no broker needed.
Turn on / off / toggle
curl "http://<plug-host>/cm?cmnd=Power%20On"
curl "http://<plug-host>/cm?cmnd=Power%20Off"
curl "http://<plug-host>/cm?cmnd=Power%20Toggle"
Query current state
Each call returns JSON, e.g. {"POWER":"ON"}.
The openculture client drives the plug over the same HTTP endpoint — no
broker. Address plugs by name: a bare name resolves to its mDNS
host (maxone-a → maxone-a.local), or supply an explicit host.
from openculture import SmartPlugClient
with SmartPlugClient() as plug:
plug.on("maxone-a") # turn on -> "ON"
plug.off("maxone-a") # turn off -> "OFF"
plug.toggle("maxone-a")
plug.is_on("maxone-a") # -> True / False
# Pin an IP (skip mDNS); pass web-admin credentials if the plug is protected:
plug = SmartPlugClient({"maxone-a": "192.168.1.42"},
user="admin", password="...")
Multi-relay plugs: pass relay=2 to target POWER2. Install with
pip install openculture.
Without the SDK — the same request with plain httpx:
Coming soon
MCP tools for smart plug control are on the roadmap.