Package: wiser-heating-api
Drayton Wiser Hub API v 1.0.10This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.The API functionality provides the following functionalityAbility to query all roomsAbility to query all thermostats and room statsAbility to set temperature of room and TRV thermostatsAbility to query various data about the system (like heating status)Ability to query and set and copy schedulesAbility to query and set smartplugs (modes and states)The project is closely associated with the Wiser HomeAssitant component availabe herehttps://github.com/asantaga/wiserHomeAssistantPlatformInstallation1. Find your HeatHub Secret keyReferencehttps://it.knightnet.org.uk/kb/nr-qa/drayton-wiser-heating-control/#controlling-the-systemPress the setup button on your HeatHub, the light will start flashing
Look for the Wi-Fi network (SSID) called‘WiserHeatXXX’where XXX is randomConnect to the network from a Windows/Linux/Mac machineExecute the secret url :-)For Windows useInvoke-RestMethod -Method Get -UseBasicParsing -Uri http://192.168.8.1/secret/For Linux (or Windows WSL) usecurl http://192.168.8.1/secretThis will return a string which is your system secret, store this somewhere. If you are running the test script simply put this value , with the ip address of the hub, in your wiserkeys.paramsPress the setup button on the HeatHub again and it will go back to normal operationsCopy the secret and save it somewhere.3. Find Your HEATHUB IPUsing your router, or something else, identify the IP address of your HeatHub, it usually identifies itself as the same ID as theWiserHeatXXXXXX4. Add values in you wiserkeys.paramsCreate a file called wiserkeys.params and place two lines, one with the wiser IP and the other with the key it self.
e.g.wiserkey=ABCDCDCDCCCDCDC
wiserhubip=192.168.0.225. Run the sampleTo help understand the api simply look at the sample codewiserapitest.pyand the fully commented code.6. DocumentationDocumentation available indocsdirectory and within comments in the codeAdditionally @steversig has also created a repository with some nice examples which be of use, seehttps://github.com/steversig/wiserheatingapi-examplesChangelog1.0.2.1Added ability to turn trvs off and then back on by using setRoomModeFixed bug in setRoomTemperature that wasnt checking the ranges properly1.0.2.2Changed temperature variables to be the real variable, and internally *101.0.3Mergedpull7: Timeout and other improvements.Fix forissue 1Error when having zero TRVsFix forissue 4Setting boost sometimes errorsMergedpull5:  Ability to turn hotwater on/off/auto1.0.4Mergedhttps://github.com/asantaga/wiserheatingapi/pull/9: Schedule export/import1.0.5.2Added support for smartplugs, both mode and state1.0.6Added support for network data
1.0.7Mergedpull17, Enhancement to detect invalid JSON from the hub, thanks @TobyLL!  fixed bug in getSmartplug state not working correctly
1.0.8Merged [pull20(https://github.com/asantaga/wiserheatingapi/pull/20 ) Fix for TRVs not keeping off setting
1.0.9Ability to get,set and copy schedules for all devices1.0.10Added PR#23: Added setRoomScheduleAvance and other APIs from @stevesig (thank you!)