All Projects → thomasgermain → pymultiMATIC

thomasgermain / pymultiMATIC

Licence: MIT license
Python interface with Vaillant multiMATIC

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pymultiMATIC

homeassistant-elasticsearch
Publish Home-Assistant events to Elasticsearch
Stars: ✭ 97 (+273.08%)
Mutual labels:  home-automation
node-red-contrib-tasmota
Tasmota devices for NodeRed
Stars: ✭ 16 (-38.46%)
Mutual labels:  home-automation
homely
🏠 - A bunch of mosquittos. IoT wiring and notification framework, with an unix style.
Stars: ✭ 15 (-42.31%)
Mutual labels:  home-automation
netdisco
🔎 Python library to scan local network for services and devices.
Stars: ✭ 252 (+869.23%)
Mutual labels:  home-automation
homeberry
HomeBerry is an Android remote control app for your Raspberry PI
Stars: ✭ 31 (+19.23%)
Mutual labels:  home-automation
smart-home
🏡 My smart home setup built on top of Home Assistant
Stars: ✭ 140 (+438.46%)
Mutual labels:  home-automation
hilo
Hilo integration for Home Assistant
Stars: ✭ 26 (+0%)
Mutual labels:  home-automation
libzwaveip
libzwaveip - Control Z-Wave devices from your IP network
Stars: ✭ 76 (+192.31%)
Mutual labels:  home-automation
home-assistant-homeseer-helpers
Various scripts, customizations, and documentation for working with HomeSeer products in Home Assistant
Stars: ✭ 18 (-30.77%)
Mutual labels:  home-automation
ioBroker.jarvis
jarvis - just another remarkable vis
Stars: ✭ 129 (+396.15%)
Mutual labels:  home-automation
janitor
Availability monitoring and alerting for IOT devices
Stars: ✭ 55 (+111.54%)
Mutual labels:  home-automation
SenseLink
A tool to create virtual smart plugs and inform a Sense Home Energy Monitor about usage in your home
Stars: ✭ 34 (+30.77%)
Mutual labels:  home-automation
bom-weather-card
Custom Animated Weather Card for any weather provider
Stars: ✭ 111 (+326.92%)
Mutual labels:  home-automation
homebridge-wink3
Homebridge plugin for wink.com
Stars: ✭ 53 (+103.85%)
Mutual labels:  home-automation
ha-config-ataraxis
My Home Assistant Configs. If you like what you see, please ⭐️my repo. It would encourage me a lot 🤘
Stars: ✭ 146 (+461.54%)
Mutual labels:  home-automation
zigbee
Database of Zigbee devices compatible with third party gateways: ZHA, deCONZ, Zigbee2MQTT, Tasmota, ZiGate, ioBroker,
Stars: ✭ 117 (+350%)
Mutual labels:  home-automation
OTGW-firmware
A ESP8266 devkit firmware for the Nodoshop version of the Opentherm Gateway (OTGW)
Stars: ✭ 88 (+238.46%)
Mutual labels:  home-automation
python-cozify
Unofficial Cozify Python bindings and helpers
Stars: ✭ 15 (-42.31%)
Mutual labels:  home-automation
PiBuilder
Ideas for building a Raspberry Pi from "bare metal" to ready-to-run IOTstack
Stars: ✭ 26 (+0%)
Mutual labels:  home-automation
works-with-home-assistant
Equipment and software that works with Home Assistant
Stars: ✭ 32 (+23.08%)
Mutual labels:  home-automation

pymultiMATIC

PyPI - License codecov PyPI PyPI - Python Version

Legal Disclaimer

This software is not affiliated with Vaillant and the developers take no legal responsibility for the functionality or security of your vaillant devices.

Install

[sudo] pip3 install pymultimatic 

Tests

You can run tests with

pytest

Usages

Module usage

The project is separated in two layers:

1. ApiConnector

This is the low level connector using the vaillant API and returning raw data directly coming from the API (basically, json formatted responses). The connector is handling the login and session (cookie based). There are 2 helper packages for urls and payload: pymultimatic.api.urls and pymultimatic.api.payloads.

Here is an example on how to use it:

import aiohttp
from pymultimatic.api import Connector, urls, payloads

async with aiohttp.ClientSession() as session:
    connector = Connector('user', 'pass', session)
    # get information about your system
    response = await connector.request('get', urls.system(serial='123'))
    #set the target low heating temperature of a zone to 15 °C
    response = await connector.request('put', urls.zone_heating_setback_temperature(id='1', serial='123'), payload=payloads.zone_temperature_setback(15))

Here is an example of response:

{
    "body": {
        "facilitiesList": [
            {
                "serialNumber": "1234567891234567891234567890",
                "name": "Name",
                "responsibleCountryCode": "BE",
                "supportedBrand": "GREEN_BRAND_COMPATIBLE",
                "capabilities": [
                    "ROOM_BY_ROOM",
                    "SYSTEMCONTROL_MULTIMATIC"
                ],
                "networkInformation": {
                    "macAddressEthernet": "12:34:56:78:9A:BC",
                    "macAddressWifiAccessPoint": "34:56:78:9A:BC:DE",
                    "macAddressWifiClient": "56:78:9A:BC:DE:F0"
                },
                "firmwareVersion": "1.1.1"
            }
        ]
    },
    "meta": {}
}

I would recommend using this layer if you only want to retrieve basic data (outdoor temperature, current temperature of zone, etc.)

2. SystemManager

This layer allows you to interact in a more friendly way with the system and it computes some data for you. The underlying Connector is hidden and raw responses are mapped to more useful objects.

Here is a script example:

#!/usr/bin/env python3

import asyncio
import sys

import aiohttp

from pymultimatic.systemmanager import SystemManager
from pymultimatic.model import System


async def main(user, passw):
    print('Trying to connect with user ' + user)

    async with aiohttp.ClientSession() as session:
        manager = SystemManager(user, passw, session)
        system =  await manager.get_system()
        print(system)


if __name__ == "__main__":
    if not len(sys.argv) == 3:
        print('Usage: python3 dump.py user pass')
        sys.exit(0)
    user = sys.argv[1]
    passw = sys.argv[2]

    asyncio.get_event_loop().run_until_complete(main(user, passw))

Then you can run the script: python3 script.py user passw

The main object to manipulate is pymultimatic.model.System, which is grouping all the information about your system.

In case of error coming from the API, a pymultimtic.api.Error is raised, containing the response and the payload sent to the API.

I would recommend using this layer if you want to do more complex things, e.g: if you want to get the target temperature for a room or a zone, it can become a bit complex since you have to deal with holiday mode, quick mode, quick veto, time program, etc. This layer is hiding you this complexity.


Buy Me A Coffee

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].