Skip to main content

Homematic interface

Project description

Proof of concept Python 3 Interface to interact with Homematic devices.

This module is aimed to provide easy control of Homematic devices hooked up to a regular CCU or Homegear. It includes a XML-RPC server to receive events emitted by devices. If a callbackfunction is passed to the server-object, it is possible to react to events using this function. Compatibility currently is only given for Python 3, but it should be easy to make it work with Python 2.7 as well. Python 2.6, not so much.

As of now, usage is as follows (with homegear running on the same machine):
>>> import homematic
>>> s = homematic.create_server(autostart=True) # Create server
>>> s.devices['address_of_rollershutter_device'].move_down() # Move rollershutter down
>>> s.devices_all['address_of_doorcontact:1'].getValue("STATE") # True or False, depending on state
>>> s.stop() #Shutdown to finish the server thread and quit

This example connects to the Homegear-server running on the same machine, closes the window shutter using the rollershutter device, queries the state of a door contact, then stops the server because a sample doesn’t need to do more. A more detailed example.py can be found at https://github.com/danielperna84/pyhomematic

Theoretically all Homematic devices will be automatically detected and directly provide the getValue and setValue methods needed to perform any action. Additionally the following devices provide convenince methods to easily perform certain tasks:

  • HM-Sec-SC-2 (Door contact - open/closed sensor)

  • HM-CC-RT-DN (Thermostat)

  • HM-CC-RT-DN-BoM (Thermostat)

  • ZEL STG RM FEP 230V (Rollershutter, by Roto Tronic)

  • HM-LC-Bl1-FM * (Rollershutter, looks exactly like ZEL STG RM FEP 230V, so maybe they’re compatible. Add it to _devices.DEVICETYPES to test it)

More devices might be supported in the future.

Project details


Release history Release notifications | RSS feed

This version

0.0.4

Download files

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

Source Distribution

pyhomematic-0.0.4.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file pyhomematic-0.0.4.tar.gz.

File metadata

File hashes

Hashes for pyhomematic-0.0.4.tar.gz
Algorithm Hash digest
SHA256 72bbe72dc586982485d7cf4b0509c049af6a512c96c5b168d239bb67a2bd1fa9
MD5 8ebb15d1d8e1598c2d3f25098cca9326
BLAKE2b-256 b9b37b863e140ad37b8fac4d77e5b80a3157467afbae6bffd9f3ec2831bb1de7

See more details on using hashes here.

Provenance

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