Skip to main content

Lightweight Python module to discover and control WeMo devices

Project description

pyWeMo |Build Status|

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, netifaces and six.

How to use

.. code:: python

>> 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.

.. code:: python

>> 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 scbscription 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.

.. |Build Status| image:: https://travis-ci.org/pavoni/pywemo.svg?branch=master :target: https://travis-ci.org/pavoni/pywemo

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.36.tar.gz (38.9 kB view details)

Uploaded Source

Built Distribution

pywemo-0.4.36-py2.py3-none-any.whl (46.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pywemo-0.4.36.tar.gz.

File metadata

  • Download URL: pywemo-0.4.36.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pywemo-0.4.36.tar.gz
Algorithm Hash digest
SHA256 308eb84d8e1cdefa5f07594cb64ba4730c0288d2697c9cc55b15c9fbbb5a85cd
MD5 ae41b0d40fa8202fef0f0e32112f94c0
BLAKE2b-256 ccc11a6c6b6fc0ede206aead2c75b1578d916a14f6e1d631e2cff7b6ed353e49

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: pywemo-0.4.36-py2.py3-none-any.whl
  • Upload date:
  • Size: 46.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pywemo-0.4.36-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a8f344f4d6aa2257228331c46607cc928629cbc44ed9a54f6a253553502bb078
MD5 683a24ccaf2535802974a722857ec9b8
BLAKE2b-256 35f5ff3a7ebef821e0bae4c8987b0c2c3132d2b83957064805ab951a4be42296

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