Package: vr900-connector
vr900-connectorPlease note that the project is still in beta state, it means  I may do some (un)intentional breaking changesLegal DisclaimerThis software is not affiliated with Vaillant and the developers take no legal responsibility for the functionality or security of your vaillant devicesInstall[sudo]pipinstallvr900-connectorTestsYou can run tests withpytestUsagesCommand line usagepython3vaillant.pyusernamepasswordmethodcommand[commandparameters]List of commands are the name of functions in api.urls module.Example:python3vaillant.pyusernamepasswordGETroom0Output:{"body":{"roomIndex":0,"configuration":{"name":"Room name","temperatureSetpoint":17.5,"operationMode":"AUTO","currentTemperature":19.4,"childLock":false,"isWindowOpen":false,"devices":[{"name":"Device name","sgtin":"000000000000000000000000","deviceType":"VALVE","isBatteryLow":false,"isRadioOutOfReach":false}],"iconId":"BEDROOM"},"timeprogram":{"monday":[{"startTime":"00:00","temperatureSetpoint":17.5}],"tuesday":[{"startTime":"00:00","temperatureSetpoint":17.5}],"wednesday":[{"startTime":"00:00","temperatureSetpoint":17.5}],"thursday":[{"startTime":"00:00","temperatureSetpoint":17.5}],"friday":[{"startTime":"00:00","temperatureSetpoint":17.5}],"saturday":[{"startTime":"00:00","temperatureSetpoint":17.5}],"sunday":[{"startTime":"00:00","temperatureSetpoint":17.5}]}},"meta":{"resourceState":[{"state":"SYNCED","timestamp":1551383333000,"link":{"rel":"child","resourceLink":"/facilities/1234567891234567891234567890/rbr/v1/rooms/0/configuration"}},{"state":"SYNCED","timestamp":1549054971000,"link":{"rel":"child","resourceLink":"/facilities/1234567891234567891234567890/rbr/v1/rooms/0/timeprogram"}}]}}Module usageThe connector is separate in two layers:1. ApiConnectorThis is the low level connector using the vaillant API and returning raw data directly coming from the API. The connector is handling the login and session.
The connector able to reuse an already existing session (cookies). Two files are saved (cookies and serial number of your installation) on the file system. Default location is:tempfile.gettempdir()+"/.vaillant_vr900_files"but it can be overridden. Files are named .vr900-vaillant.cookies and .vr900-vaillant.serial.Here is an example how to use it:fromvr900connector.apiimportApiConnector,Urlsconnector=ApiConnector('user','pass')connector.get(Urls.facilities_list())to get some information about your installation, this returns the raw response, something like this:{"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":{}}Basically, you can usefromvr900connector.apiimportApiConnectorconnector=ApiConnector('user','pass')connector.get('')with urls fromvr900connector.api.urlsI recommend using this layer if you only want to retrieve basic data (outdoor temperature, current temperature, etc.)2. SystemManagerThis layer allows you to interact in a more friendly way with the system.
The underlying connector is hidden and raw responses are mapped to more useful object.For now, the only function is:fromvr900connector.systemmanagerimportSystemManagermanager=SystemManager('user','pass')system=manager.get_system()The main object to manipulate isvr900connector.model.systemWhich is grouping all the information about the system.I 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