Skip to main content

Lightweight Python module to discover and control WeMo devices

Project description

Lightweight Python 2 and Python 3 module to discover and control WeMo devices.

This is a stripped down version of the Python API for WeMo devices, ouimeaux, with simpler dependencies.

Dependencies

pyWeMo depends on Python packages: requests, ifaddr and six

How to use

>> import pywemo

>> devices = pywemo.discover_devices()
>> print(devices)
[<WeMo Insight "AC Insight">]

>> devices[0].toggle()

If discovery doesn’t work on your network

On some networks discovery doesn’t work reliably, in that case if you can find the ip address of your Wemo device you can use the following code.

>> import pywemo

>> address = "192.168.100.193"
>> port = pywemo.ouimeaux_device.probe_wemo(address)
>> url = 'http://%s:%i/setup.xml' % (address, port)
>> device = pywemo.discovery.device_from_description(url, None)
>> print(device)
<WeMo Insight "AC Insight">

Please note that you need to use ip addresses as shown above, rather than hostnames, otherwise the subscription update logic won’t work.

License

The code in pywemo/ouimeaux_device is written and copyright by Ian McCracken and released under the BSD license. The rest is released under the MIT license.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywemo-0.4.46.macosx-10.15-x86_64.tar.gz (102.7 kB view details)

Uploaded Source

Built Distribution

pywemo-0.4.46-py2.py3-none-any.whl (49.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pywemo-0.4.46.macosx-10.15-x86_64.tar.gz.

File metadata

  • Download URL: pywemo-0.4.46.macosx-10.15-x86_64.tar.gz
  • Upload date:
  • Size: 102.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for pywemo-0.4.46.macosx-10.15-x86_64.tar.gz
Algorithm Hash digest
SHA256 1dfc4750a64ff907e8c1387f126f62af143342ff3f6c373d4caed4f78eb8cd34
MD5 d640029a9479f17534a27358db9e6b09
BLAKE2b-256 e9075ab6651a88c7df6b1903fac3a1a3efd69c3524aadd160b664a5bbf6c3043

See more details on using hashes here.

Provenance

File details

Details for the file pywemo-0.4.46-py2.py3-none-any.whl.

File metadata

  • Download URL: pywemo-0.4.46-py2.py3-none-any.whl
  • Upload date:
  • Size: 49.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for pywemo-0.4.46-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 10b818fbe7221efd7c668de78d3e1eebd49db576992ffe46a0b166e47a4f3382
MD5 882b28c425c24a275207c10419afe438
BLAKE2b-256 394d0408e47bb7d883adf4e57af3e3fd0bda8cbe5a5ca43943bd0b34f102e5cc

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page