Code Monkey home page Code Monkey logo

homematicip-rest-api's Introduction

homematicip-rest-api

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

#Installation Just run pip install homematicip to get the package

Usage

first download and run generate_auth_token.py to get an auth token for your access point. copy the generated auth token from the window config.py and add also the Access Point ID

Examples

  • homematicip_cli.py list devices,groups,securityJournal; set label, turn switches on/off

Implemented Stuff

  • generate authentication token
  • Read current state of the Environment
  • Weather
  • Location
  • Basic Informations( apversion, pinAssigned, timeZone, ... )
  • Devices (partly)
  • Client
  • Groups

Devices:

  • HMIP-eTRV (Heating-thermostat)
  • HMIP-WTH, HMIP-WTH-2 (Wall Mounted Thermostat Pro)
  • HMIP-SWDO (Shutter Contact)
  • HMIP-SWSD (Smoke Detector)
  • HMIP-FAL230-C6 (Floor Terminal Block)
  • HMIP-PS (Plugable Switch)
  • HMIP-PSM (Plugable Switch Measuring)
  • HMIP-STHD (Temperature and Humidity Sensor with display - indoor)
  • HMIP-WRC2 (Wall-mount Remote Control - 2-button)
  • HMIP-ASIR (Alarm Siren)
  • HMIP-KRCA (Key Ring Remote Control & alarm)
  • HMIP-SMI (Motion Detector with Brightness Sensor - indoor)
  • HMIP-FROLL (Shutter Actuator - flush-mount)

Groups

  • Meta (Rooms)
  • Heating
  • Security
  • Switching
  • Switch Groups
  • INBOX
  • HEATING_TEMPERATURE_LIMITER
  • HEATING_HUMIDITY_LIMITER
  • SECURITY_ZONE
  • ALARM_SWITCHING
  • HEATING_CHANGEOVER
  • LINKED_SWITCHING
  • HEATING_COOLING_DEMAND
  • HEATING_DEHUMIDIFIER
  • HEATING_EXTERNAL_CLOCK
  • HEATING_COOLING_DEMAND_BOILER
  • HEATING_COOLING_DEMAND_PUMP
  • OVER_HEAT_PROTECTION_RULE
  • SMOKE_ALARM_DETECTION_RULE
  • LOCK_OUT_PROTECTION_RULE
  • SHUTTER_WIND_PROTECTION_RULE

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 u"EventType: {} Data: {}".format(event["eventType"], event["data"])

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


Implemented Functions:

General

  • getCurrentState (this reads the base configuration for the whole AP)
  • setZonesActivation (activates the alarm zones (internal and/or external))
  • everything needed for a successfull registration/authentication
  • setLocation
  • setPin
  • deleteGroup
  • getOAuthOTK (Get Token for Alexa)
  • setTimeZone
  • setPowerMeterUnitPrice

Heating

  • setBoost
  • setSetPointTemperature
  • getProfile
  • updateProfile
  • activateAbsenceWithDuration
  • activateAbsenceWithPeriod
  • activateVacation
  • deactivateVacation
  • deactivateAbsence

Security

  • getSecurityJournal
  • setIntrusionAlertThroughSmokeDetectors

Device

  • setClimateControlDisplay
  • setDeviceLabel
  • setSwitchState (turn on/off)
  • setShutterLevel
  • setShutterStop

Alarm

  • testSignalOptical
  • setSignalOptical

homematicip-rest-api's People

Contributors

codenightwriter avatar coregreenberet avatar davidhoffmann avatar jmara avatar uberbruns avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.