aioWiserHeatAPI 1.5.15__tar.gz → 1.5.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/PKG-INFO +7 -3
  2. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/README.md +6 -2
  3. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/__init__.py +1 -1
  4. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/const.py +4 -0
  5. aiowiserheatapi-1.5.16/aioWiserHeatAPI/helpers/version.py +67 -0
  6. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/wiserhub.py +17 -2
  7. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI.egg-info/PKG-INFO +7 -3
  8. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI.egg-info/SOURCES.txt +1 -0
  9. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/LICENSE +0 -0
  10. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/automation.py +0 -0
  11. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/binary_sensor.py +0 -0
  12. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/boiler_interface.py +0 -0
  13. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/cli.py +0 -0
  14. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/devices.py +0 -0
  15. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/discovery.py +0 -0
  16. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/exceptions.py +0 -0
  17. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/heating.py +0 -0
  18. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/heating_actuator.py +0 -0
  19. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/__init__.py +0 -0
  20. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/automations.py +0 -0
  21. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/battery.py +0 -0
  22. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/capabilities.py +0 -0
  23. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/cloud.py +0 -0
  24. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/device.py +0 -0
  25. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/equipment.py +0 -0
  26. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/extra_config.py +0 -0
  27. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/firmware.py +0 -0
  28. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/gps.py +0 -0
  29. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/misc.py +0 -0
  30. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/network.py +0 -0
  31. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/opentherm.py +0 -0
  32. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/signal.py +0 -0
  33. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/special_times.py +0 -0
  34. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/status.py +0 -0
  35. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/temp.py +0 -0
  36. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/helpers/zigbee.py +0 -0
  37. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/hot_water.py +0 -0
  38. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/light.py +0 -0
  39. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/moments.py +0 -0
  40. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/pte.py +0 -0
  41. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/rest_controller.py +0 -0
  42. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/room.py +0 -0
  43. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/roomstat.py +0 -0
  44. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/schedule.py +0 -0
  45. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/shutter.py +0 -0
  46. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/smartplug.py +0 -0
  47. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/smartvalve.py +0 -0
  48. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/smokealarm.py +0 -0
  49. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/system.py +0 -0
  50. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI/ufh.py +0 -0
  51. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI.egg-info/dependency_links.txt +0 -0
  52. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI.egg-info/entry_points.txt +0 -0
  53. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI.egg-info/requires.txt +0 -0
  54. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/aioWiserHeatAPI.egg-info/top_level.txt +0 -0
  55. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/setup.cfg +0 -0
  56. {aiowiserheatapi-1.5.15 → aiowiserheatapi-1.5.16}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioWiserHeatAPI
3
- Version: 1.5.15
3
+ Version: 1.5.16
4
4
  Summary: An AsyncIO API for controlling the Drayton Wiser Heating system
5
5
  Home-page: https://github.com/msp1974/aioWiserHeatAPI
6
6
  Author: Mark Parker
@@ -18,7 +18,7 @@ Requires-Dist: aiohttp>=3.9.3
18
18
  Requires-Dist: aiofiles>=23.2.1
19
19
  Requires-Dist: pyyaml>=6.0.1
20
20
 
21
- # Drayton Wiser Hub API Async v1.5.15
21
+ # Drayton Wiser Hub API Async v1.5.16
22
22
 
23
23
  This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.
24
24
 
@@ -72,9 +72,13 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
72
72
 
73
73
  ## Changelog
74
74
 
75
+ ### v1.5.16
76
+
77
+ * Added support for v2 opentherm endpoint for fw above 4.32.46
78
+
75
79
  ### v1.5.15
76
80
 
77
- * Added addiitonal functions for v2 hub lights, equipments etc
81
+ * Added additonal functions for v2 hub lights, equipments etc
78
82
  * Added support for WindowDoor sensors
79
83
  * Added support for Boiler Interface device
80
84
 
@@ -1,4 +1,4 @@
1
- # Drayton Wiser Hub API Async v1.5.15
1
+ # Drayton Wiser Hub API Async v1.5.16
2
2
 
3
3
  This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.
4
4
 
@@ -52,9 +52,13 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
52
52
 
53
53
  ## Changelog
54
54
 
55
+ ### v1.5.16
56
+
57
+ * Added support for v2 opentherm endpoint for fw above 4.32.46
58
+
55
59
  ### v1.5.15
56
60
 
57
- * Added addiitonal functions for v2 hub lights, equipments etc
61
+ * Added additonal functions for v2 hub lights, equipments etc
58
62
  * Added support for WindowDoor sensors
59
63
  * Added support for Boiler Interface device
60
64
 
@@ -3,6 +3,6 @@ import logging
3
3
  name = "aioWiserHeatAPI"
4
4
  __all__ = ["wiserAPI", "wiserDiscovery"]
5
5
 
6
- __VERSION__ = "1.5.15"
6
+ __VERSION__ = "1.5.16"
7
7
 
8
8
  _LOGGER = logging.getLogger(__name__)
@@ -1,5 +1,7 @@
1
1
  import enum
2
2
 
3
+ from aioWiserHeatAPI.helpers.version import Version
4
+
3
5
  # Temperature Constants
4
6
  DEFAULT_AWAY_MODE_TEMP = 10.5
5
7
  DEFAULT_DEGRADED_TEMP = 18
@@ -78,6 +80,7 @@ WEEKENDS = ["Saturday", "Sunday"]
78
80
  SPECIAL_DAYS = [TEXT_WEEKDAYS, TEXT_WEEKENDS, TEXT_ALL]
79
81
  SPECIAL_TIMES = {"Sunrise": 3000, "Sunset": 4000}
80
82
 
83
+ OPENTHERMV2_MIN_VERSION = Version("4.32.47")
81
84
 
82
85
  # Wiser Hub Rest Api URL Constants
83
86
  WISERHUBURL = "http://{}:{}/data/v2/"
@@ -85,6 +88,7 @@ WISERHUBDOMAIN = WISERHUBURL + "domain/"
85
88
  WISERHUBNETWORK = WISERHUBURL + "network/"
86
89
  WISERHUBSCHEDULES = WISERHUBURL + "schedules/"
87
90
  WISERHUBOPENTHERM = WISERHUBURL + "opentherm/"
91
+ WISERHUBOPENTHERMV2 = WISERHUBURL + "openTherm/"
88
92
  WISERHUBSTATUS = WISERHUBURL + "status/"
89
93
  WISERSYSTEM = "System"
90
94
  WISERDEVICE = "Device/{}"
@@ -0,0 +1,67 @@
1
+ """Version helpers."""
2
+
3
+ from dataclasses import dataclass
4
+
5
+
6
+ @dataclass
7
+ class Version:
8
+ """Class to handle PEP440 versions."""
9
+
10
+ version: str
11
+
12
+ def __gt__(self, other):
13
+ if isinstance(other, Version):
14
+ return (
15
+ self.major >= other.major
16
+ and self.minor >= other.minor
17
+ and self.micro > other.micro
18
+ )
19
+
20
+ def __ge__(self, other):
21
+ if isinstance(other, Version):
22
+ return self.__eq__(other) or self.__gt__(other)
23
+
24
+ def __lt__(self, other):
25
+ if isinstance(other, Version):
26
+ return (
27
+ self.major <= other.major
28
+ and self.minor <= other.minor
29
+ and self.micro < other.micro
30
+ )
31
+
32
+ def __le__(self, other):
33
+ if isinstance(other, Version):
34
+ return self.__eq__(other) or self.__lt__(other)
35
+
36
+ def __eq__(self, other):
37
+ if isinstance(other, Version):
38
+ return (
39
+ self.major == other.major
40
+ and self.minor == other.minor
41
+ and self.micro == other.micro
42
+ )
43
+
44
+ @property
45
+ def major(self) -> int:
46
+ """Get major version."""
47
+ try:
48
+ return self.version.split(".")[0]
49
+ except IndexError:
50
+ return None
51
+
52
+ @property
53
+ def minor(self) -> int:
54
+ """Get minor version."""
55
+ try:
56
+ return self.version.split(".")[1]
57
+ except IndexError:
58
+ return None
59
+
60
+ @property
61
+ def micro(self) -> int:
62
+ """Get micro version."""
63
+ try:
64
+ full_micro = self.version.split(".")[2]
65
+ return full_micro.split("-")[0]
66
+ except IndexError:
67
+ return None
@@ -16,12 +16,15 @@ import pathlib
16
16
  from datetime import datetime
17
17
  from typing import Optional
18
18
 
19
+ from aioWiserHeatAPI.helpers.version import Version
20
+
19
21
  from . import __VERSION__, _LOGGER
20
22
  from .cli import log_response_to_file
21
23
  from .const import (
22
24
  DEFAULT_AWAY_MODE_TEMP,
23
25
  DEFAULT_DEGRADED_TEMP,
24
26
  MAX_BOOST_INCREASE,
27
+ OPENTHERMV2_MIN_VERSION,
25
28
  TEMP_ERROR,
26
29
  TEMP_HW_OFF,
27
30
  TEMP_HW_ON,
@@ -31,6 +34,7 @@ from .const import (
31
34
  WISERHUBDOMAIN,
32
35
  WISERHUBNETWORK,
33
36
  WISERHUBOPENTHERM,
37
+ WISERHUBOPENTHERMV2,
34
38
  WISERHUBSCHEDULES,
35
39
  WISERHUBSTATUS,
36
40
  WiserUnitsEnum,
@@ -152,9 +156,20 @@ class WiserAPI:
152
156
  opentherm = self._domain_data.get("System", {}).get(
153
157
  "OpenThermConnectionStatus", ""
154
158
  )
155
- if opentherm and opentherm == "Connected":
159
+ if opentherm and opentherm == "Connected" or True:
160
+ fw_version = Version(
161
+ self._domain_data.get("System", {}).get(
162
+ "ActiveSystemVersion", "1.0.0"
163
+ )
164
+ )
165
+ hw_version = self._domain_data.get("System", {}).get(
166
+ "HardwareGeneration", 1
167
+ )
156
168
  self._opentherm_data = await self._wiser_rest_controller.get_hub_data(
157
- WISERHUBOPENTHERM, False
169
+ WISERHUBOPENTHERMV2
170
+ if hw_version == 2 and fw_version >= OPENTHERMV2_MIN_VERSION
171
+ else WISERHUBOPENTHERM,
172
+ False,
158
173
  )
159
174
  except (
160
175
  WiserHubConnectionError,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aioWiserHeatAPI
3
- Version: 1.5.15
3
+ Version: 1.5.16
4
4
  Summary: An AsyncIO API for controlling the Drayton Wiser Heating system
5
5
  Home-page: https://github.com/msp1974/aioWiserHeatAPI
6
6
  Author: Mark Parker
@@ -18,7 +18,7 @@ Requires-Dist: aiohttp>=3.9.3
18
18
  Requires-Dist: aiofiles>=23.2.1
19
19
  Requires-Dist: pyyaml>=6.0.1
20
20
 
21
- # Drayton Wiser Hub API Async v1.5.15
21
+ # Drayton Wiser Hub API Async v1.5.16
22
22
 
23
23
  This repository contains a simple API which queries the Drayton Wiser Heating sysystem used in the UK.
24
24
 
@@ -72,9 +72,13 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
72
72
 
73
73
  ## Changelog
74
74
 
75
+ ### v1.5.16
76
+
77
+ * Added support for v2 opentherm endpoint for fw above 4.32.46
78
+
75
79
  ### v1.5.15
76
80
 
77
- * Added addiitonal functions for v2 hub lights, equipments etc
81
+ * Added additonal functions for v2 hub lights, equipments etc
78
82
  * Added support for WindowDoor sensors
79
83
  * Added support for Boiler Interface device
80
84
 
@@ -51,4 +51,5 @@ aioWiserHeatAPI/helpers/signal.py
51
51
  aioWiserHeatAPI/helpers/special_times.py
52
52
  aioWiserHeatAPI/helpers/status.py
53
53
  aioWiserHeatAPI/helpers/temp.py
54
+ aioWiserHeatAPI/helpers/version.py
54
55
  aioWiserHeatAPI/helpers/zigbee.py