Giter VIP home page Giter VIP logo

pyvicare's Introduction

PyViCare

Implements an object to interact with the Viessmann ViCare API. The OAuth2 authentication token can optionally be stored in a file to be reused. Tokens are automatically renewed.

A few nice feature removed from the app are available though the API (Comfort and Eco modes).

Version 0.1.0

Note that the version 0.1.0 DOES BREAK a few things. ViCareSession is deprecated (but you can still import it using f"rom PyViCare.PyViCare import ViCareSession"). You can now use the following objects:

from PyViCare.PyViCareDevice import Device # generic device
from PyViCare.PyViCareGazBoiler import GazBoiler # gaz boiler
from PyViCare.PyViCareHeatPump import HeatPump # heat pump

Basic usage

Simple example:

import sys
import logging
sys.path.insert(0, 'PyViCare')
from PyViCare.PyViCareDevice import Device
from PyViCare.PyViCareGazBoiler import GazBoiler
from PyViCare.PyViCareService import ViCareService
from PyViCare.PyViCare import ViCareSession

t=GazBoiler("email@domain","password","token.save")
print(t.getDomesticHotWaterConfiguredTemperature()) 
print(t.getDomesticHotWaterStorageTemperature())
print(t.getOutsideTemperature())
print(t.getRoomTemperature())
print(t.getSupplyTemperature())
print(t.getOutsideTemperature()) 
print(t.getHeatingCurveShift()) 
print(t.getHeatingCurveSlope()) 
print(t.getBoilerTemperature())
print(t.getActiveProgram())
print(t.getPrograms())

print(t.getCurrentDesiredTemperature())
print(t.getMonthSinceLastService())
print(t.getLastServiceDate())

print(t.getDesiredTemperatureForProgram("comfort"))
print(t.getActiveMode())

print(t.getDesiredTemperatureForProgram("comfort"))
print(t.setProgramTemperature("comfort",21))
print(t.activateProgram("comfort"))
print(t.setDomesticHotWaterTemperature(59))
print(t.activateProgram("comfort"))
print(t.deactivateComfort())

Postman example

Follow these steps to access the API in Postman:

  1. Create an access token in the Authorization tab with type OAuth 2.0 and following inputs:

    A login popup will open. Enter your ViCare username and password.

  2. Use this URL to access your installationId and gatewaySerial:

    https://api.viessmann-platform.io/general-management/installations

    • installationId is entities[0].properties.id
    • gatewaySerial is entities[0].entities[0].properties.serial
  3. Use above data to replace {installationId} and {gatewaySerial} in this URL to investigate the Viessmann API:

    https://api.viessmann-platform.io/operational-data/v1/installations/{installationId}/gateways/{gatewaySerial}/devices/0/features

Types of heatings

  • Use ViCareSession for gas heatings
  • Use ViCareHeatPumpSession for heat pumps

pyvicare's People

Contributors

somm15 avatar crazyfx1 avatar oischinger avatar o00batman00o avatar eldios avatar vandenberghev avatar stefanwi87 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.