Skip to main content

This package allows controlling devices in a SmartHab-powered home.

Project description

python-smarthab

This Python library allows you to programmatically control your SmartHab-powered home.

Security warning!

SmartHab currently offers no secure connection to their API. The credentials are sent in clear-text. You've been warned.

What is SmartHab?

SmartHab is a company that installs their home automation solution in new buildings, and offers a mobile application for home owners or renters to control their home over the Internet.

Mobile App → API → SmartHab box (1 at each floor) → Z-Wave devices

What does this library do?

python-smarthab connects to the SmartHab API and allows you to automate your home without having to use the mobile application.

It might prove particularly useful if integrated into a home automation box or software. Feel free to use it, it's under the GPL!

How do I use it?

pip3 install SmartHab
import pysmarthab

hub = pysmarthab.SmartHab()

# Login
hub.login('smarthab.user@example.com', '1234567')

if not hub.is_logged_in:
    # Bad credentials :(
    raise SystemExit

# Get the list of available devices
devices = hub.get_device_list()

# Close all roller shutters and turn on all lights
for device in devices:
    if isinstance(device, pysmarthab.Light):
        device.turn_on()

    if isinstance(device, pysmarthab.Shutter):
        device.close()

Project details


Download files

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

Source Distribution

SmartHab-0.20.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file SmartHab-0.20.tar.gz.

File metadata

  • Download URL: SmartHab-0.20.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.7

File hashes

Hashes for SmartHab-0.20.tar.gz
Algorithm Hash digest
SHA256 cbd32b96cf236bf24df8ecb21a3608edb20d53fab3109f829bb242f605ceff2f
MD5 1b99ade1b27e4ab0da19243f3804e51d
BLAKE2b-256 a193d34bc95882a44e7c6f5a1dce570599bbbf796a2640b5119ce3ee93eb1e38

See more details on using hashes here.

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