pywemo
Lightweight Python module to discover and control WeMo devices
What it is and what it does
pyWeMo is a Python library for discovering and controlling Belkin WeMo smart home devices on a local network. It handles device discovery, state control (toggling, querying), setup (connecting devices to Wi-Fi), and factory reset—all without relying on Belkin's cloud services. The library works with modern Python versions and depends on cryptography, ifaddr, lxml, requests, and urllib3 for network communication and device XML parsing.
The package is designed for local-only control, making it suitable for Home Assistant and other home automation systems that need reliable offline device management. It includes fallback mechanisms for networks where automatic discovery fails, allowing manual IP-based device connection. The library also provides methods to inspect device capabilities via the explain() method and supports multiple Wi-Fi encryption methods for device setup, with troubleshooting guidance for common connection issues.
Use it for:
- Integrate WeMo smart plugs and switches into Home Assistant or other local home automation platforms without cloud dependency.
- Programmatically toggle or query WeMo device state from Python scripts for custom automation workflows.
- Set up and reset WeMo devices locally without the Belkin app, useful when physical access is limited or cloud access is unavailable.
- Discover all WeMo devices on a network and enumerate their capabilities for inventory or monitoring purposes.
- Control WeMo devices on networks where automatic discovery fails by manually specifying device IP addresses.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Discovers and controls Belkin WeMo smart home devices over local network, including setup, reset, and device management without cloud dependency.
Yes. Active maintenance, no known vulnerabilities, low install friction, and permissive MIT license make this a solid choice for local WeMo control. Particularly valuable for Home Assistant users and anyone needing offline device management before Belkin's January 2026 support end-of-life. Verify that your specific WeMo product model is supported via the project wiki before committing to it.
Install
pywemo on PyPI
pip
pip install pywemouv
uv add pywemopoetry
poetry add pywemoInstalling pywemo
Before you install
Low install friction with five common runtime dependencies (cryptography, ifaddr, lxml, requests, urllib3). Active maintenance with recent commits and no known vulnerabilities.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects including Home Assistant integrations.
Quickstart
pip install pywemo
import pywemo
devices = pywemo.discover_devices()
if devices:
devices[0].toggle()
Requires Python 3.10 or later; automatic discovery may fail on some networks, requiring manual IP-based setup instead.
Verify before relying
- Whether all WeMo product models are supported or if some remain unsupported
- Reliability of automatic discovery across different network configurations
- Performance characteristics when controlling multiple devices simultaneously
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — cryptography, ifaddr, lxml, requests, urllib3 |
| Maintenance | actively maintained — 173 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 76,297/month — #14,638 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pywemo-2.1.2-py3-none-any.whl
Keywords: wemo, api
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
roombapyroombapy is a Python library for controlling…
permissive · top 15,000 on PyPI
tinytuyaControls and monitors Tuya WiFi smart devices…
permissive · top 15,000 on PyPI
aioruckusAsync Python client library for querying and…
permissive · top 15,000 on PyPI
flux-ledControls Magic Home and Surp Life WiFi LED…
copyleft · top 15,000 on PyPI
pyvesyncAsynchronous Python library to discover,…
permissive · top 15,000 on PyPI
broadlinkA Python module and CLI for discovering,…
permissive · top 15,000 on PyPI
python-miioPython library and CLI tool for controlling…
copyleft · top 15,000 on PyPI
nmclinmcli is a Python wrapper for the…
permissive · top 15,000 on PyPI
python-kasaControl TP-Link Kasa and Tapo smart home…
copyleft · top 15,000 on PyPI
devolo-plc-apiProvides a Python API to communicate with…
copyleft · top 15,000 on PyPI