skillfed

pywemo

Lightweight Python module to discover and control WeMo devices

pywemo v2.1.2 76.3K downloads/30d#14,638 on PyPI301
Permissive license MIT Active released

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 pywemo

uv

uv add pywemo

poetry

poetry add pywemo

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

wemo device controlbelkin smart home apilocal wemo discoverysmart plug automationhome automation pythonwemo setup and resetnetwork device control
home-automationiot-controllocal-first

More Networking packages