All Projects → danielperna84 → pyhomematic

danielperna84 / pyhomematic

Licence: MIT License
Python 3 Interface to interact with Homematic devices

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pyhomematic

Hugo Esp8266
Hugo is a 4-button ESP8266 Wi-Fi Remote, Arduino compatible and simple to use.
Stars: ✭ 77 (-11.49%)
Mutual labels:  home-automation, hass
ioBroker.hm-rpc
Connects HomeMatic Interface-Processes to ioBroker
Stars: ✭ 55 (-36.78%)
Mutual labels:  home-automation, homematic
Homeassistant Config
Configuration for @brianjking & @KinnaT's Home Assistant Installation
Stars: ✭ 80 (-8.05%)
Mutual labels:  home-automation, hass
Home Assistant Config
My Home Assistant configuration
Stars: ✭ 41 (-52.87%)
Mutual labels:  home-automation, hass
homeassistant-elasticsearch
Publish Home-Assistant events to Elasticsearch
Stars: ✭ 97 (+11.49%)
Mutual labels:  home-automation, hass
Hass Yaap
Yet another alarm (control) panel for Home Assistant.
Stars: ✭ 44 (-49.43%)
Mutual labels:  home-automation, hass
Home Panel
A web frontend for controlling the home.
Stars: ✭ 185 (+112.64%)
Mutual labels:  home-automation, hass
hass-pfsense
pfSense integration with Home Assistant
Stars: ✭ 44 (-49.43%)
Mutual labels:  home-automation, hass
Home-AssistantConfig---OLD
AtomicPapa's Amazing Home Assistant Config
Stars: ✭ 15 (-82.76%)
Mutual labels:  home-automation, hass
HB-UNI-RGB-LED-CTRL
HomeMatic compatible RGB Controller for adressable RGB LEDs (WS28xx, Neopixel,...)
Stars: ✭ 19 (-78.16%)
Mutual labels:  home-automation, homematic
Hass Config
Configuration files for Home Assistant
Stars: ✭ 32 (-63.22%)
Mutual labels:  home-automation, hass
works-with-home-assistant
Equipment and software that works with Home Assistant
Stars: ✭ 32 (-63.22%)
Mutual labels:  home-automation, hass
Smarthome
@skalavala 👍 Nothing But Smarthome Stuff! - By Mahasri Kalavala
Stars: ✭ 437 (+402.3%)
Mutual labels:  home-automation, hass
Home Assistant Config
🏠 My Home Assistant configuration, a bit different that others :) Be sure to 🌟 this repository for updates!
Stars: ✭ 1,050 (+1106.9%)
Mutual labels:  home-automation, hass
Homeassistant
Home Assistant Configuration Files and Documentation
Stars: ✭ 395 (+354.02%)
Mutual labels:  home-automation, hass
Entity Controller
Entity and lighting controller for managing devices via timers, scripts, and sun-based time restrictions.
Stars: ✭ 156 (+79.31%)
Mutual labels:  home-automation, hass
ioBroker.hm-rega
Connects HomeMatic CCU "Logic Layer" ("ReGaHSS") to ioBroker
Stars: ✭ 36 (-58.62%)
Mutual labels:  home-automation, homematic
ad-alexatalkingclock
Alexa (or other Smart Speakers) tell you the time without asking every hour. Please ⭐️if you like my app :)
Stars: ✭ 30 (-65.52%)
Mutual labels:  home-automation, hass
ha-config-ataraxis
My Home Assistant Configs. If you like what you see, please ⭐️my repo. It would encourage me a lot 🤘
Stars: ✭ 146 (+67.82%)
Mutual labels:  home-automation, hass
home-assistant-config
Ma configuration Home Assistant commentée en anglais et en français | My Home Assistant config with French and English comments.
Stars: ✭ 29 (-66.67%)
Mutual labels:  home-automation

Deprecation warning

This project is being deprecated in favour of the new integration (https://github.com/danielperna84/custom_homematic) based on hahomematic (https://github.com/danielperna84/hahomematic).

If you are a user of the RaspberryMatic add-on, please follow these very detailed instructions to install the new integration as a custom component: https://github.com/jens-maus/RaspberryMatic/wiki/HomeAssistant-Integration

Less detailed instructions also suitable for other installation types: https://github.com/danielperna84/custom_homematic/wiki/Installation

Essentially the process is the same. When using a real CCU or RaspberryMatic Home Assistants auto-discovery may already detect your hub-device and you only have to provide credentials.

If you encounter problems with the new integration, please report them in the hahomematic repository.

If you add a new device to your CCU and don't see the name you have set reflected in Home Assistant, please follow these instructions: https://github.com/danielperna84/hahomematic/wiki/Howto's

Other interesting information can be found here: https://github.com/danielperna84/hahomematic/tree/devel/docs

pyhomematic

https://travis-ci.org/danielperna84/pyhomematic.svg?branch=master

Python 3 Interface to interact with Homematic devices.

Important: This project will be deprecated in favor of https://github.com/danielperna84/hahomematic at some point in the future. A custom component to work with hahomematic can be found here: https://github.com/danielperna84/custom_homematic. Feel free to contribute!

This library provides easy (bi-directional) control of Homematic devices hooked up to a regular CCU or Homegear. The focus is to be able to receive events. If you are only interested in actively controlling devices, you can use the Python-built-in xmlrpc.client.ServerProxy (Python 3). See pyhomematic._server.ServerThread.connect on how to connect to a CCU / Homegear as a client.

Included is a XML-RPC server to receive events emitted by devices. Multiple callback functions can be set for devices to handle events. You can choose to bequeath callbacks from devices to their channels or not. Channels can not bequeath to their parent devices. You can also pass a callback funtion when creating the server, which then will (additionally) receive all events emitted by any paired device.

You may specify a devicefile (JSON) to store known devices. This might speed up startup a bit. If you don't, paired devices will always be propagated upon startup. If devices get paired while the server is running, they should be automatically detected and usable. To get notified about such events, it is possible to pass a systemcallback(source, *args)-function while creating the server.

Compatibility currently is only given for Python 3, since this library is primarily intended to add Homematic to https://home-assistant.io/, wich is written in Python 3.

As of now, usage is as follows (you could leave away the listening and remote addresses when everything is running on one machine):
>>> def syscb(src, *args):
>>>     print(src)
>>>     for arg in args:
>>>         print(arg)
>>> def cb1(address, interface_id, key, value):
>>>     print("CALLBACK WITH CHANNELS: %s, %s, %s, %s" % (address, interface_id, key, value))
>>> def cb2(address, interface_id, key, value):
>>>     print("CALLBACK WITHOUT CHANNELS: %s, %s, %s, %s" % (address, interface_id, key, value))
>>> from pyhomematic import HMConnection
>>> pyhomematic = HMConnection(local="192.168.1.12", localport=7080, remote="192.168.1.23", remoteport=2001, systemcallback=syscb) # Create server thread
>>> pyhomematic.start() # Start server thread, connect to homegear, initialize to receive events
>>> pyhomematic.devices['address_of_rollershutter_device'].move_down() # Move rollershutter down
>>> pyhomematic.devices_all['address_of_doorcontact:1'].getValue("STATE") # True or False, depending on state
>>> pyhomematic.devices['address_of_doorcontact'].setEventCallback(cb1) # Add first callback
>>> pyhomematic.devices['address_of_doorcontact'].setEventCallback(cb2, bequeath=False) # Add second callback
>>> pyhomematic.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, adds callbacks for the door contact, then stops the server thread because a sample doesn't need to do more. The server has to be stopped because otherwise Python might hang. An 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, implemented devices provide convenience-properties and methods to perform certain tasks.

For more information visit the Wiki: https://github.com/danielperna84/pyhomematic/wiki

If pyhomematic doesn't seem to be what you need to interact with your CCU, then https://github.com/LarsMichelsen/pmatic might be (if Homegear support is not required).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].