# Drayton Wiser Hub API Async v1.5.19
This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.
The API functionality provides the following functionality to control the wiser heating system for 1,2 and 3 channel heat hubs
The API also supports Smart Plugs and initial basic functionality for Shutter and Lights
## Requirements
Requires a minimum of Python v3.10
## Installation
## 1. Find your HeatHub Secret key
Reference [https://it.knightnet.org.uk/kb/nr-qa/drayton-wiser-heating-control/#controlling-the-system](https://it.knightnet.org.uk/kb/nr-qa/drayton-wiser-heating-control/#controlling-the-system)
1. Press the setup button on your HeatHub, the light will start flashing
Look for the Wi-Fi network (SSID) called **‘WiserHeatXXXXXX’** where XXXXXX is last 6 digits of the MAC address
2. Connect to the network from a Windows/Linux/Mac/Android/iPhone machine
3. Execute the secret url :-)
* Open a browser to url `http://192.168.8.1/secret`
This 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.params
4. Press the setup button on the HeatHub again and it will go back to normal operations
5. Copy the secret and save it somewhere.
## 3. Find Your HEATHUB IP
Using your router, or something else, identify the IP address of your HeatHub, it usually identifies itself as the same ID as the ``WiserHeatXXXXXX``
Alternatively see the test_api_discovery.py file for how to use the api to discover your hub
## 4. Add values in you params.py to run tests
Create a file called params.py and place two lines, one with the wiser IP or hostname and the other with the secret key.
e.g.
```code
HOST="192.168.0.22"
KEY="ABCDCDCDCCCDCDC"
```
## 5. Run the sample
To help understand the api simply look at the test sample code ```tests/test_api_properties.py```, ```tests/test_api_methods.py``` or ```tests/test_api_discovery.py``` and the fully commented code.
## 6. Documentation
Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/blob/master/docs/info.md) in the docs directory and within comments in the code
## Changelog
### v1.5.19
* Fixed error when BoilerInterface does not provide DeviceId field
* Fixed not supporting non ascii characters in schedule names
* Added ButtonPanel device support
### v1.5.18
* Better handle client response exeption and fit into retry routing
### v1.5.17
* Fixed error setting opentherm endpoint for fw above 4.32.46
* Added support for CFMT devices
### v1.5.16
* Added support for v2 opentherm endpoint for fw above 4.32.46
### v1.5.15
* Added additonal functions for v2 hub lights, equipments etc
* Added support for WindowDoor sensors
* Added support for Boiler Interface device
### v1.5.14
* Fix presets not using defined boost temp
* Set return value of energy sensors to None if not provided by hub
* Updated headers for hub query
### v1.5.13
* Updates to support v2 hub functions - @LGO44
* Add connection timeout to new retry function
* Increase http timeout from 10s to 20s
### v1.5.12
* Improve performance of hub read and retries
* Fix error is no status endpoint
### v1.5.11
* Improve error management
* Add additional debug logging
### v1.5.10
* Add retry routine to prevent hub response errors
### v1.5.9
* Force schedules endpoint to use http/1.0
### v1.5.8
* Handle chunked encoding if sent by the hub
### v1.5.7
* Fixed issue whereby lower target temp for passive mode was not being set correctly
* Added support for smoke alarm
### v1.5.6
* Added improved error handling for json decode errors
### v1.5.5
* Added addtional v2 hub attributes and switches
### v1.5.4
* Fixed issue whereby json conversion errors due to control characters in string
### v1.5.2
* Revert to aiohttp and fix errors with v3.9.x that caused move to httpx
### v1.5.1
* Fix nuances with httpx
### v1.5.0
* Move to httpx instead of aiohttp
### v1.4.0
* Add PowerTagE support
* Add new v2 hub cloud parameters
* Add new v2 hub capabilities info
* Add v2 hub equipment data to relevant devices
* Add tilt support for shutters
* Fix issue where non ASCII chars removed
### v1.3.9
* Fix for hub firmware bug whereby Away Mode Affects HotWater is turned off when cancelling overrides if no overrides exist.
### v1.3.8
* Correct relative modulation level opentherm parameter magnitude
### v1.3.7
* Amend battery to return None for voltage and percent if battery data not present
### 1.3.6
* Add new status class
* Fix error if passive mode room device offline
### v1.3.5
* Correct async error in extra_config
### v1.3.4
* Current temperature now returns none for room if TRV signal lost.
### v1.3.3
* Fixed issue in passive mode so that it works with 3 channel hub and different rooms on different channels
### v1.3.2
* Fixed issue ot maintaining some parameters after hub update
* Improved handling of extra config json errors
* Amended current_target_temp to use DisplayedSetPoint instead of CurrentSetPoint as this displays incorrectly in Eco mode
### 1.3.1
* Away mode overrides passive mode functions
### 1.3.0
* Rework passive mode functionality (may break previous code if using passive mode)
### 1.2.2
* Improve logic defining is_passive_mode property
### 1.2.1
* Code refactoring
* Added is_passive_mode property
* Corrected bug in passive mode automation to determine target temp
### 1.2.0
* Breaking Change - changes to passive mode from on or off to disabled, passive manual and passive follow schedule
* Support boost in passive mode
* Add additional opentherm parameters
* Fix not clearing overrides when enabling passive mode
### 1.1.1
* Fix issue setting on/off schedule - issue #349
### 1.1.0
* Added room passive mode automation control
### 1.0.2
* Fixed error in boost_all_rooms using old temp validation type (no longer supported)
* Fixed error in validating temps from yaml file
### 1.0.1
* Added endpoint parameter to set_opentherm_parameter
### 1.0.0
* Moved to stable build version
* Amended timeout error text
* Improved error handling for setting schedules
* Added temp sensor support for heating actuator
* Added support for network diagnostics
* Added support for non standard port
* Add boiler parameters to opentherm
* Support setting opentherm parameters
### 0.1.8
* Add url to exception messages
* Fix for unicode decode error
### 0.1.7
* Fixed error intiallising WiserUFHController class
* Made python3.9 compatible
### 0.1.6
* Remove debuggin print lines
* Remove session close on endpoint error
### 0.1.5
* Add ALL as special day option in schedule file for setting schedules from file
### 0.1.4
* Fix incorrect id used for schedule assignment in electrical devices
### 0.1.3
* Fixed issue in schedule.get_by_name
### 0.1.2
* Fixed calling wrong enpoint id for lights and shutters
### 0.1.0
* Initial asyncio release
Raw data
{
"_id": null,
"home_page": "https://github.com/msp1974/aioWiserHeatAPI",
"name": "aioWiserHeatAPI",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": null,
"author": "Mark Parker",
"author_email": "msparker@sky.com",
"download_url": "https://files.pythonhosted.org/packages/99/3c/102c828779e649427e785058adce4ae3f5873c935845c0149e94c048d241/aiowiserheatapi-1.5.19.tar.gz",
"platform": null,
"description": "# Drayton Wiser Hub API Async v1.5.19\n\nThis repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.\n\nThe API functionality provides the following functionality to control the wiser heating system for 1,2 and 3 channel heat hubs\nThe API also supports Smart Plugs and initial basic functionality for Shutter and Lights\n\n## Requirements\n\nRequires a minimum of Python v3.10\n\n## Installation\n\n## 1. Find your HeatHub Secret key\n\nReference [https://it.knightnet.org.uk/kb/nr-qa/drayton-wiser-heating-control/#controlling-the-system](https://it.knightnet.org.uk/kb/nr-qa/drayton-wiser-heating-control/#controlling-the-system)\n\n1. Press the setup button on your HeatHub, the light will start flashing\nLook for the Wi-Fi network (SSID) called **\u2018WiserHeatXXXXXX\u2019** where XXXXXX is last 6 digits of the MAC address\n2. Connect to the network from a Windows/Linux/Mac/Android/iPhone machine\n3. Execute the secret url :-)\n * Open a browser to url `http://192.168.8.1/secret`\n\n This 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.params\n\n4. Press the setup button on the HeatHub again and it will go back to normal operations\n5. Copy the secret and save it somewhere.\n\n## 3. Find Your HEATHUB IP\n\nUsing your router, or something else, identify the IP address of your HeatHub, it usually identifies itself as the same ID as the ``WiserHeatXXXXXX``\n\nAlternatively see the test_api_discovery.py file for how to use the api to discover your hub\n\n## 4. Add values in you params.py to run tests\n\nCreate a file called params.py and place two lines, one with the wiser IP or hostname and the other with the secret key.\ne.g.\n\n```code\nHOST=\"192.168.0.22\"\nKEY=\"ABCDCDCDCCCDCDC\"\n```\n\n## 5. Run the sample\n\nTo help understand the api simply look at the test sample code ```tests/test_api_properties.py```, ```tests/test_api_methods.py``` or ```tests/test_api_discovery.py``` and the fully commented code.\n\n## 6. Documentation\n\nDocumentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/blob/master/docs/info.md) in the docs directory and within comments in the code\n\n## Changelog\n\n### v1.5.19\n* Fixed error when BoilerInterface does not provide DeviceId field\n* Fixed not supporting non ascii characters in schedule names\n* Added ButtonPanel device support\n\n### v1.5.18\n\n* Better handle client response exeption and fit into retry routing\n\n### v1.5.17\n\n* Fixed error setting opentherm endpoint for fw above 4.32.46\n* Added support for CFMT devices\n\n### v1.5.16\n\n* Added support for v2 opentherm endpoint for fw above 4.32.46\n\n### v1.5.15\n\n* Added additonal functions for v2 hub lights, equipments etc\n* Added support for WindowDoor sensors\n* Added support for Boiler Interface device\n\n### v1.5.14\n\n* Fix presets not using defined boost temp\n* Set return value of energy sensors to None if not provided by hub\n* Updated headers for hub query\n\n### v1.5.13\n\n* Updates to support v2 hub functions - @LGO44\n* Add connection timeout to new retry function\n* Increase http timeout from 10s to 20s\n\n### v1.5.12\n\n* Improve performance of hub read and retries\n* Fix error is no status endpoint\n\n### v1.5.11\n\n* Improve error management\n* Add additional debug logging\n\n### v1.5.10\n\n* Add retry routine to prevent hub response errors\n\n### v1.5.9\n\n* Force schedules endpoint to use http/1.0\n\n### v1.5.8\n\n* Handle chunked encoding if sent by the hub\n\n### v1.5.7\n\n* Fixed issue whereby lower target temp for passive mode was not being set correctly\n* Added support for smoke alarm\n\n### v1.5.6\n\n* Added improved error handling for json decode errors\n\n### v1.5.5\n\n* Added addtional v2 hub attributes and switches\n\n### v1.5.4\n\n* Fixed issue whereby json conversion errors due to control characters in string\n\n### v1.5.2\n\n* Revert to aiohttp and fix errors with v3.9.x that caused move to httpx\n\n### v1.5.1\n\n* Fix nuances with httpx\n\n### v1.5.0\n\n* Move to httpx instead of aiohttp\n\n### v1.4.0\n\n* Add PowerTagE support\n* Add new v2 hub cloud parameters\n* Add new v2 hub capabilities info\n* Add v2 hub equipment data to relevant devices\n* Add tilt support for shutters\n* Fix issue where non ASCII chars removed\n\n### v1.3.9\n\n* Fix for hub firmware bug whereby Away Mode Affects HotWater is turned off when cancelling overrides if no overrides exist.\n\n### v1.3.8\n\n* Correct relative modulation level opentherm parameter magnitude\n\n### v1.3.7\n\n* Amend battery to return None for voltage and percent if battery data not present\n\n### 1.3.6\n\n* Add new status class\n* Fix error if passive mode room device offline\n\n### v1.3.5\n\n* Correct async error in extra_config\n\n### v1.3.4\n\n* Current temperature now returns none for room if TRV signal lost.\n\n### v1.3.3\n\n* Fixed issue in passive mode so that it works with 3 channel hub and different rooms on different channels\n\n### v1.3.2\n\n* Fixed issue ot maintaining some parameters after hub update\n* Improved handling of extra config json errors\n* Amended current_target_temp to use DisplayedSetPoint instead of CurrentSetPoint as this displays incorrectly in Eco mode\n\n### 1.3.1\n\n* Away mode overrides passive mode functions\n\n### 1.3.0\n\n* Rework passive mode functionality (may break previous code if using passive mode)\n\n### 1.2.2\n\n* Improve logic defining is_passive_mode property\n\n### 1.2.1\n\n* Code refactoring\n* Added is_passive_mode property\n* Corrected bug in passive mode automation to determine target temp\n\n### 1.2.0\n\n* Breaking Change - changes to passive mode from on or off to disabled, passive manual and passive follow schedule\n* Support boost in passive mode\n* Add additional opentherm parameters\n* Fix not clearing overrides when enabling passive mode\n\n### 1.1.1\n\n* Fix issue setting on/off schedule - issue #349\n\n### 1.1.0\n\n* Added room passive mode automation control\n\n### 1.0.2\n\n* Fixed error in boost_all_rooms using old temp validation type (no longer supported)\n* Fixed error in validating temps from yaml file\n\n### 1.0.1\n\n* Added endpoint parameter to set_opentherm_parameter\n\n### 1.0.0\n\n* Moved to stable build version\n* Amended timeout error text\n* Improved error handling for setting schedules\n* Added temp sensor support for heating actuator\n* Added support for network diagnostics\n* Added support for non standard port\n* Add boiler parameters to opentherm\n* Support setting opentherm parameters\n\n### 0.1.8\n\n* Add url to exception messages\n* Fix for unicode decode error\n\n### 0.1.7\n\n* Fixed error intiallising WiserUFHController class\n* Made python3.9 compatible\n\n### 0.1.6\n\n* Remove debuggin print lines\n* Remove session close on endpoint error\n\n### 0.1.5\n\n* Add ALL as special day option in schedule file for setting schedules from file\n\n### 0.1.4\n\n* Fix incorrect id used for schedule assignment in electrical devices\n\n### 0.1.3\n\n* Fixed issue in schedule.get_by_name\n\n### 0.1.2\n\n* Fixed calling wrong enpoint id for lights and shutters\n\n### 0.1.0\n\n* Initial asyncio release\n",
"bugtrack_url": null,
"license": null,
"summary": "An AsyncIO API for controlling the Drayton Wiser Heating system",
"version": "1.5.19",
"project_urls": {
"Homepage": "https://github.com/msp1974/aioWiserHeatAPI"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5984c1298063de68367b1e90135d1d4b5dca8a0f142ca947feaf9bd5956e64b1",
"md5": "72f41e614fc61808897bd08ad6d445ad",
"sha256": "6a05a4cdc5bafa3ed9de5fd8686fab5f267595f5ebd81803089d0ef38ed99782"
},
"downloads": -1,
"filename": "aioWiserHeatAPI-1.5.19-py3-none-any.whl",
"has_sig": false,
"md5_digest": "72f41e614fc61808897bd08ad6d445ad",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 73472,
"upload_time": "2024-11-13T18:55:27",
"upload_time_iso_8601": "2024-11-13T18:55:27.958827Z",
"url": "https://files.pythonhosted.org/packages/59/84/c1298063de68367b1e90135d1d4b5dca8a0f142ca947feaf9bd5956e64b1/aioWiserHeatAPI-1.5.19-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "993c102c828779e649427e785058adce4ae3f5873c935845c0149e94c048d241",
"md5": "0d8f99f11de85426fef61fc7010d22a7",
"sha256": "5e7d11b261458dcd2b5deaa215b64dcaf17e2f1af0c31ddb7df83360b1610f98"
},
"downloads": -1,
"filename": "aiowiserheatapi-1.5.19.tar.gz",
"has_sig": false,
"md5_digest": "0d8f99f11de85426fef61fc7010d22a7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 58380,
"upload_time": "2024-11-13T18:55:28",
"upload_time_iso_8601": "2024-11-13T18:55:28.932501Z",
"url": "https://files.pythonhosted.org/packages/99/3c/102c828779e649427e785058adce4ae3f5873c935845c0149e94c048d241/aiowiserheatapi-1.5.19.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-13 18:55:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "msp1974",
"github_project": "aioWiserHeatAPI",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "aiowiserheatapi"
}