Skip to main content

Python library to interface with iHome API.

Project description

pyihome

Python library to interface with the iHome API.

This library interfaces with the EVRYTHING API

Currently this library supports the following:

All Devices

  • get devices associated with the account which are swtiches with only one outlet

Switch

  • turn_on(device_id)
  • turn_off(device_id)
  • get_state(device_id)

How to use

from pyihome import PyiHome

#init api
api = PyiHome("username", "password")

#get devices
devices = api.get_devices()

#get device id of the first item
device_id = devices[0]["id"]

#get switch specific api
switch = api.Switch()

#turn on the switch
switch.turn_on(device_id)

#turn off the switch
switch.turn_off(device_id)

#get state
print("State: {}".format(switch.get_state(device_id)))

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

pyihome-0.0.41.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file pyihome-0.0.41.tar.gz.

File metadata

  • Download URL: pyihome-0.0.41.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyihome-0.0.41.tar.gz
Algorithm Hash digest
SHA256 3366a88071e8a711bfebf4db6033baf11edbe0b943f9830c15b977b9b781adb0
MD5 17f51ef46312a2158a964d8f347b719a
BLAKE2b-256 8c83e2a82fd6b76ae146f0ad64efddb81ce36313773c850b702356435f6ff197

See more details on using hashes here.

Supported by

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