Skip to main content

Downloads Downloads Downloads Language grade: Python

Overview

w3mo is a pure python API wrapper for wemo devices

Installation

pip3 install w3mo

Usage

Interactive "Shell"

from w3mo import w3mo
w3mo.interactive() #this mode will launch a "shell" to interact with discovered devices on your network

Device Discovery

from w3mo import w3mo

#returns a dictionary of devices with the device name as the key
#{'name':{'ip':device_ip,'obj':instantiated w3mo control class}}
x = w3mo.discover(return_type=dict)

#returns a list of devices
#[{'name':'device_name_1','ip':'device_ip':,'obj':instantiated w3mo control class}]
x = w3mo.discover(return_type=list)

#sets the timeout in seconds that the script will wait for a thread to join. This basically improves speed with the understanding that threads will still be running in the background if set too short. Default is 5s.
x = w3mo.discover(join_timeout=5)

#prints verbose debug data to the console. Default is False.
x = w3mo.discover(debug=True)

Device Control

from w3mo import w3mo
import time

devices = w3mo.discover(return_type=list)

#define device as the control class instantiation at index 0 of devices
device = devices[0]['obj']

#device name and state are set at instantiation and updated throughout use
print("Device Name = {}".format(device.name))
print("Device State = {}".format(device.state))

#turn on
device.set_state(1)


#time.sleep(.25)
#turn off
#device.set_state(0)

Supported Devices

  • NOTE: supported just means I had these devices / firmwares on hand for testing. Other devices SHOULD work, if you find something that doesn't fix it and submit a pull request!

Wemo Mini Smart Plug - F7C063

Firmware Version Supported
WeMo_WW_2.00.11452.PVT-OWRT-SNSV2 :heavy_check_mark:
WeMo_WW_2.00.11420.PVT-OWRT-SNSV2 :heavy_check_mark:
WeMo_WW_2.00.11326.PVT-OWRT-SNSV2 :heavy_check_mark:

Wemo WiFi Smart Light Switch - WLS040

Firmware Version Supported
WeMo_WW_2.00.11451.PVT-OWRT-LIGHTV2 :heavy_check_mark:
WeMo_WW_2.00.11395.PVT-OWRT-LIGHTV2 :heavy_check_mark:

Related Projects

Metadata

Release files for w3mo 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for w3mo 0.1.10
File Size Uploaded
w3mo-0.1.10.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for w3mo 0.1.10
File Interpreter ABI Platform
w3mo-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 kB

Release files / w3mo-0.1.10.tar.gz

Download URL w3mo-0.1.10.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4f8596d734bbe9c58b2f5c66442c4d2eac0bfc2ad5428dd110a5ef11cdc8c6c7
BLAKE2b-256 checksum
How to use checksums
7401c4bcbe0b8e7c8296e2706b2916e9dc80a85683f2ec87252f2f8af9542098
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.3

Release files / w3mo-0.1.10-py3-none-any.whl

Download URL w3mo-0.1.10-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c13d188efc6bd1975ffc51bb4c42585e104a25760b820ced3a61bddc32a41962
BLAKE2b-256 checksum
How to use checksums
d03d7fb307e0fa800cfdc71b3d0a04f7e4995ae326b55bebbba8d644d8b22f84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page