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
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
- homematicip_cli.py list devices,groups,securityJournal; set label, turn switches on/off
- generate authentication token
- Read current state of the Environment
- Weather
- Location
- Basic Informations( apversion, pinAssigned, timeZone, ... )
- Devices (partly)
- Client
- Groups
- 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)
- 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
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()
- 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
- setBoost
- setSetPointTemperature
- getProfile
- updateProfile
- activateAbsenceWithDuration
- activateAbsenceWithPeriod
- activateVacation
- deactivateVacation
- deactivateAbsence
- getSecurityJournal
- setIntrusionAlertThroughSmokeDetectors
- setClimateControlDisplay
- setDeviceLabel
- setSwitchState (turn on/off)
- testSignalOptical
- setSignalOptical