Skip to main content

An API for the homematicip cloud

Project description

homematicip-rest-api

A Python 3 wrapper for the homematicIP REST API (Access Point Based) Since there is no official documentation about this API everything was done via reverse engineering Use at your own risk.

CircleCI PyPi codecov Average time to resolve an issue

Installation

Just run pip3 install homematicip to get the package

Usage

first run hmip_generate_auth_token.py (from the command line) to get an auth token for your access point. it will generate a “config.ini” in your current directory. The scripts will look for a config.ini in 3 different locations depending on your OS. Copy the file to one of these locations so that it will be accessable for the scripts.

  • General

    • current working directory

  • Windows

    • %APPDATA%:raw-latex:homematicip-rest-api

    • %PROGRAMDATA%:raw-latex:homematicip-rest-api

  • Linux

    • ~/.homematicip-rest-api/

    • /etc/homematicip-rest-api/

  • MAC OS

    • ~/Library/Preferences/homematicip-rest-api/

    • /Library/Application Support/homematicip-rest-api/

Examples

Implemented Stuff

  • [X] generate authentication token

  • [X] Read current state of the Environment

  • [X] Weather

  • [X] Location

  • [X] Basic Informations( apversion, pinAssigned, timeZone, … )

  • [X] Devices (partly)

  • [X] Client

  • [X] Groups

Devices:

  • [X] HMIP-eTRV (Heating-thermostat)

  • [X] HMIP-WTH, HMIP-WTH-2 (Wall Mounted Thermostat Pro)

  • [X] HMIP-BWTH (Brand Wall Mounted Thermostat Pro)

  • [X] HMIP-SWDO (Shutter Contact)

  • [X] HMIP-SWDO-I (Shutter Contact Invisible)

  • [X] HMIP-SWSD (Smoke Detector)

  • [X] HMIP-FAL230-C6 (Floor Terminal Block)

  • [X] HMIP-PS (Plugable Switch)

  • [X] HMIP-PSM (Plugable Switch Measuring)

  • [X] HMIP-STHD (Temperature and Humidity Sensor with display - indoor)

  • [X] HMIP-STH (Temperature and Humidity Sensor without display - indoor)

  • [X] HMIP-WRC2 (Wall-mount Remote Control - 2-button)

  • [X] HMIP-ASIR (Alarm Siren)

  • [X] HMIP-KRCA (Key Ring Remote Control & alarm)

  • [X] HMIP-SMI (Motion Detector with Brightness Sensor - indoor)

  • [X] HMIP-FROLL (Shutter Actuator - flush-mount)

  • [X] HMIP-BROLL (Shutter Actuator - brand-mount)

  • [X] HMIP-SPI (Precence Sensor - indoor)

  • [X] HmIP-PDT (Pluggable Dimmer)

  • [X] HMIP-BSM (Brand Switch and Meter)

  • [X] HmIP-PCBS-BAT (Printed Curcuit Board Switch Battery)

  • [X] HmIP-STHO (Temperature and Humidity Sensor outdoor)

  • [X] HmIP-SWO-PR (Weather Sensor – pro)

  • [X] HmIP-SWO-B (Weather Sensor)

  • [X] HmIP-SRH (Rotary Handle Sensor )

Events

It’s also possible to use push notifications based on a websocket connection

##initialize the api
#...
#get the home object
home = homematicip.Home()
#add a function to handle new events
home.onEvent += printEvents
#enable the event connection -> this will also start the websocket connection to the homeMaticIP Cloud
home.enable_events()


#example function to display incoming events
def printEvents(eventList):
    for event in eventList:
        print "EventType: {} Data: {}".format(event["eventType"], event["data"])

#if needed you can close the websocket connection with
home.disable_events()

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

homematicip-0.9.3.2.tar.gz (45.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

homematicip-0.9.3.2-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

Details for the file homematicip-0.9.3.2.tar.gz.

File metadata

  • Download URL: homematicip-0.9.3.2.tar.gz
  • Upload date:
  • Size: 45.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for homematicip-0.9.3.2.tar.gz
Algorithm Hash digest
SHA256 bdcd344bcd3b2707aff5ec4d7780975854d5bd849bb7e088adb46e7a8e69df32
MD5 f5ad1e2ab3a1f2115e6f4fef0b932a6a
BLAKE2b-256 6db2c94f129ee3b49763147ae3f9f0eecf963f6897ded4d6007d7ef4f2479a2f

See more details on using hashes here.

File details

Details for the file homematicip-0.9.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for homematicip-0.9.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb1af3e80e763909c995452e42ab5977d0a5d03f5580bb014588a0665cea1eb9
MD5 d9cf99caa7f8fe7c73858ae97529f593
BLAKE2b-256 554db15655d3655983fbfb61c430fe2eaa0084aa408bacb30206cb2eb49b25f5

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