aiohomematic 2025.11.3__py3-none-any.whl

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.

Potentially problematic release.


This version of aiohomematic might be problematic. Click here for more details.

Files changed (77) hide show
  1. aiohomematic/__init__.py +61 -0
  2. aiohomematic/async_support.py +212 -0
  3. aiohomematic/central/__init__.py +2309 -0
  4. aiohomematic/central/decorators.py +155 -0
  5. aiohomematic/central/rpc_server.py +295 -0
  6. aiohomematic/client/__init__.py +1848 -0
  7. aiohomematic/client/_rpc_errors.py +81 -0
  8. aiohomematic/client/json_rpc.py +1326 -0
  9. aiohomematic/client/rpc_proxy.py +311 -0
  10. aiohomematic/const.py +1127 -0
  11. aiohomematic/context.py +18 -0
  12. aiohomematic/converter.py +108 -0
  13. aiohomematic/decorators.py +302 -0
  14. aiohomematic/exceptions.py +164 -0
  15. aiohomematic/hmcli.py +186 -0
  16. aiohomematic/model/__init__.py +140 -0
  17. aiohomematic/model/calculated/__init__.py +84 -0
  18. aiohomematic/model/calculated/climate.py +290 -0
  19. aiohomematic/model/calculated/data_point.py +327 -0
  20. aiohomematic/model/calculated/operating_voltage_level.py +299 -0
  21. aiohomematic/model/calculated/support.py +234 -0
  22. aiohomematic/model/custom/__init__.py +177 -0
  23. aiohomematic/model/custom/climate.py +1532 -0
  24. aiohomematic/model/custom/cover.py +792 -0
  25. aiohomematic/model/custom/data_point.py +334 -0
  26. aiohomematic/model/custom/definition.py +871 -0
  27. aiohomematic/model/custom/light.py +1128 -0
  28. aiohomematic/model/custom/lock.py +394 -0
  29. aiohomematic/model/custom/siren.py +275 -0
  30. aiohomematic/model/custom/support.py +41 -0
  31. aiohomematic/model/custom/switch.py +175 -0
  32. aiohomematic/model/custom/valve.py +114 -0
  33. aiohomematic/model/data_point.py +1123 -0
  34. aiohomematic/model/device.py +1445 -0
  35. aiohomematic/model/event.py +208 -0
  36. aiohomematic/model/generic/__init__.py +217 -0
  37. aiohomematic/model/generic/action.py +34 -0
  38. aiohomematic/model/generic/binary_sensor.py +30 -0
  39. aiohomematic/model/generic/button.py +27 -0
  40. aiohomematic/model/generic/data_point.py +171 -0
  41. aiohomematic/model/generic/dummy.py +147 -0
  42. aiohomematic/model/generic/number.py +76 -0
  43. aiohomematic/model/generic/select.py +39 -0
  44. aiohomematic/model/generic/sensor.py +74 -0
  45. aiohomematic/model/generic/switch.py +54 -0
  46. aiohomematic/model/generic/text.py +29 -0
  47. aiohomematic/model/hub/__init__.py +333 -0
  48. aiohomematic/model/hub/binary_sensor.py +24 -0
  49. aiohomematic/model/hub/button.py +28 -0
  50. aiohomematic/model/hub/data_point.py +340 -0
  51. aiohomematic/model/hub/number.py +39 -0
  52. aiohomematic/model/hub/select.py +49 -0
  53. aiohomematic/model/hub/sensor.py +37 -0
  54. aiohomematic/model/hub/switch.py +44 -0
  55. aiohomematic/model/hub/text.py +30 -0
  56. aiohomematic/model/support.py +586 -0
  57. aiohomematic/model/update.py +143 -0
  58. aiohomematic/property_decorators.py +496 -0
  59. aiohomematic/py.typed +0 -0
  60. aiohomematic/rega_scripts/fetch_all_device_data.fn +92 -0
  61. aiohomematic/rega_scripts/get_program_descriptions.fn +30 -0
  62. aiohomematic/rega_scripts/get_serial.fn +44 -0
  63. aiohomematic/rega_scripts/get_system_variable_descriptions.fn +30 -0
  64. aiohomematic/rega_scripts/set_program_state.fn +12 -0
  65. aiohomematic/rega_scripts/set_system_variable.fn +15 -0
  66. aiohomematic/store/__init__.py +34 -0
  67. aiohomematic/store/dynamic.py +551 -0
  68. aiohomematic/store/persistent.py +988 -0
  69. aiohomematic/store/visibility.py +812 -0
  70. aiohomematic/support.py +664 -0
  71. aiohomematic/validator.py +112 -0
  72. aiohomematic-2025.11.3.dist-info/METADATA +144 -0
  73. aiohomematic-2025.11.3.dist-info/RECORD +77 -0
  74. aiohomematic-2025.11.3.dist-info/WHEEL +5 -0
  75. aiohomematic-2025.11.3.dist-info/entry_points.txt +2 -0
  76. aiohomematic-2025.11.3.dist-info/licenses/LICENSE +21 -0
  77. aiohomematic-2025.11.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,92 @@
1
+ !# fetch_all_device_data.fn v2.2
2
+ !# This script fetches all device data required to initialize the entities without affecting the duty cycle.
3
+ !#
4
+ !# Original script: https://github.com/ioBroker/ioBroker.hm-rega/blob/master/regascripts/datapoints.fn
5
+ !# datapoints.fn 1.9
6
+ !# 3'2013-9'2014 hobbyquaker https://github.com/hobbyquaker
7
+ !#
8
+ !# Dieses Homematic-Script gibt eine Liste aller Datenpunkte, die zur Laufzeit einen validen Zeitstempel haben, als JSON String aus.
9
+ !#
10
+ !# modified by: SukramJ https://github.com/SukramJ && Baxxy13 https://github.com/Baxxy13
11
+ !# v2.2 - 09/2023
12
+ !#
13
+ !# Das Interface wird durch die Integration an 'sUse_Interface' übergeben.
14
+ !# Nutzbare Interfaces: BidCos-RF, BidCos-Wired, HmIP-RF, VirtualDevices
15
+ !# Zum Testen direkt auf der Homematic-Zentrale muss das Interface wie folgt eingetragen werden: sUse_Interface = "HmIP-RF";
16
+
17
+ string sUse_Interface = "##interface##";
18
+ string sDevId;
19
+ string sChnId;
20
+ string sDPId;
21
+ var vDPValue;
22
+ boolean bDPFirst = true;
23
+ object oInterface = interfaces.Get(sUse_Interface);
24
+
25
+ Write('{');
26
+ if (oInterface) {
27
+ integer iInterface_ID = interfaces.Get(sUse_Interface).ID();
28
+ string sAllDevices = dom.GetObject(ID_DEVICES).EnumUsedIDs();
29
+ foreach (sDevId, sAllDevices) {
30
+ object oDevice = dom.GetObject(sDevId);
31
+ if ((oDevice) && (oDevice.ReadyConfig()) && (oDevice.Interface() == iInterface_ID)) {
32
+ foreach (sChnId, oDevice.Channels()) {
33
+ object oChannel = dom.GetObject(sChnId);
34
+ if (oChannel) {
35
+ var oDPs = oChannel.DPs();
36
+ if (oDPs) {
37
+ foreach(sDPId, oDPs.EnumUsedIDs()) {
38
+ object oDP = dom.GetObject(sDPId);
39
+ if (oDP && oDP.Timestamp()) {
40
+ if (oDP.TypeName() != "VARDP") {
41
+ integer sValueType = oDP.ValueType();
42
+ boolean bHasValue = false;
43
+ string sValue;
44
+ string sID = oDP.Name().UriEncode();
45
+ if (sValueType == 20) {
46
+ sValue = oDP.Value().UriEncode();
47
+ bHasValue = true;
48
+ } else {
49
+ vDPValue = oDP.Value();
50
+ if (sValueType == 2) {
51
+ if (vDPValue) {
52
+ sValue = "true";
53
+ } else {
54
+ sValue = "false";
55
+ }
56
+ bHasValue = true;
57
+ } else {
58
+ if (vDPValue == "") {
59
+ sValue = "0";
60
+ } else {
61
+ sValue = vDPValue;
62
+ }
63
+ bHasValue = true;
64
+ }
65
+ }
66
+ if (bHasValue) {
67
+ if (bDPFirst) {
68
+ bDPFirst = false;
69
+ } else {
70
+ WriteLine(',');
71
+ }
72
+ Write('"');
73
+ Write(sID);
74
+ Write('":');
75
+ if (sValueType == 20) {
76
+ Write('"');
77
+ Write(sValue);
78
+ Write('"');
79
+ } else {
80
+ Write(sValue);
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ Write('}');
@@ -0,0 +1,30 @@
1
+ !# get_program_descriptions.fn
2
+ !# Erstellt in Ergänzung zu https://github.com/eq-3/occu/blob/45b38865f6b60f16f825b75f0bdc8a9738831ee0/WebUI/www/api/methods/sysvar/getall.tcl
3
+ !# Erweitert das Script um "description"
4
+ !#
5
+
6
+ string id;
7
+ boolean dpFirst = true;
8
+ Write("[");
9
+ foreach(id, dom.GetObject(ID_PROGRAMS).EnumIDs()) {
10
+ object prg = dom.GetObject(id);
11
+ string description = "";
12
+ if (prg) {
13
+ ! use UriEncode() to ensure special characters " and \
14
+ ! and others are properly encoded using URI/URL percentage
15
+ ! encoding
16
+ description = prg.PrgInfo().UriEncode();
17
+
18
+ if (dpFirst) {
19
+ dpFirst = false;
20
+ } else {
21
+ WriteLine(',');
22
+ }
23
+
24
+ Write("{");
25
+ Write("\"id\": \"" # id # "\",");
26
+ Write("\"description\": \"" # description # "\"");
27
+ Write("}");
28
+ }
29
+ }
30
+ Write("]");
@@ -0,0 +1,44 @@
1
+ !# get_serial
2
+ !#
3
+ !# Erstellt durch @baxxy13 2022-04-09
4
+ !#
5
+ !# Dieses Script liefert die Seriennummer des Funkmoduls in folgender Priorisierung zurück:
6
+ !# 1. /var/board_sgtin
7
+ !# 2. /var/board_serial
8
+ !# 3. /sys/module/plat_eq3ccu2/parameters/board_serial
9
+ !#
10
+ !# Dieses Script wird als Ersatz für JsonRPC CCU.getSerial verwendet.
11
+ !#
12
+
13
+ string serial;
14
+ boolean find = false;
15
+ string cmd_a = "/bin/sh -c 'cat /var/board_sgtin'";
16
+ string cmd_b = "/bin/sh -c 'cat /var/board_serial'";
17
+ string cmd_c = "/bin/sh -c 'cat /sys/module/plat_eq3ccu2/parameters/board_serial'";
18
+
19
+ !# Try uses /var/board_sgtin
20
+ system.Exec(cmd_a, &serial, &error);
21
+ if (serial) {
22
+ serial = serial.Trim();
23
+ find = true;
24
+ }
25
+ !# Try uses /var/board_serial
26
+ if (!find) {
27
+ system.Exec(cmd_b, &serial, &error);
28
+ if (serial) {
29
+ serial = serial.Trim();
30
+ find = true;
31
+ }
32
+ }
33
+ !# Try uses /sys/module/plat_eq3ccu2/parameters/board_serial
34
+ if (!find) {
35
+ system.Exec(cmd_c, &serial, &error);
36
+ if (serial) {
37
+ serial = serial.Trim();
38
+ }
39
+ }
40
+
41
+ if (!serial) {
42
+ serial = "unknown";
43
+ }
44
+ WriteLine('{"serial": "'# serial #'"}');
@@ -0,0 +1,30 @@
1
+ !# get_system_variable_descriptions.fn
2
+ !# Erstellt in Ergänzung zu https://github.com/eq-3/occu/blob/45b38865f6b60f16f825b75f0bdc8a9738831ee0/WebUI/www/api/methods/sysvar/getall.tcl
3
+ !# Erweitert das Script um "description"
4
+ !#
5
+
6
+ string id;
7
+ boolean dpFirst = true;
8
+ Write("[");
9
+ foreach(id, dom.GetObject(ID_SYSTEM_VARIABLES).EnumIDs()) {
10
+ object sv = dom.GetObject(id);
11
+ string description = "";
12
+ if (sv) {
13
+ ! use UriEncode() to ensure special characters " and \
14
+ ! and others are properly encoded using URI/URL percentage
15
+ ! encoding
16
+ description = sv.DPInfo().UriEncode();
17
+
18
+ if (dpFirst) {
19
+ dpFirst = false;
20
+ } else {
21
+ WriteLine(',');
22
+ }
23
+
24
+ Write("{");
25
+ Write("\"id\": \"" # id # "\",");
26
+ Write("\"description\": \"" # description # "\"");
27
+ Write("}");
28
+ }
29
+ }
30
+ Write("]");
@@ -0,0 +1,12 @@
1
+ !# set_program_state.fn
2
+ !#
3
+ !# Dieses Script setzt den Zustand eines Programmes auf der CCU.
4
+ !#
5
+ string p_id = "##id##";
6
+ integer p_state = ##state##;
7
+
8
+ object program = dom.GetObject(ID_PROGRAMS).Get(p_id);
9
+ if (program) {
10
+ program.Active(p_state);
11
+ Write(program.Active())
12
+ }
@@ -0,0 +1,15 @@
1
+ !# set_system_variable
2
+ !#
3
+ !# Erstellt durch @baxxy13 2022-04-11
4
+ !#
5
+ !# Dieses Script schreibt eine Systemvariable vom Typ Zeichenkette.
6
+ !#
7
+
8
+ string sv_name = "##name##";
9
+ string sv_value = "##value##";
10
+ object target_sv = dom.GetObject(ID_SYSTEM_VARIABLES).Get(sv_name);
11
+ if (target_sv) {
12
+ if (target_sv.ValueTypeStr() == "String") {
13
+ Write(target_sv.State(sv_value));
14
+ }
15
+ }
@@ -0,0 +1,34 @@
1
+ # SPDX-License-Identifier: MIT
2
+ # Copyright (c) 2021-2025
3
+ """
4
+ Store packages for AioHomematic.
5
+
6
+ This package groups store implementations used throughout the library:
7
+ - persistent: Long-lived on-disk store for device and paramset descriptions.
8
+ - dynamic: Short-lived in-memory store for runtime values and connection health.
9
+ - visibility: Parameter visibility rules to decide which parameters are relevant.
10
+ """
11
+
12
+ from __future__ import annotations
13
+
14
+ from aiohomematic.store.dynamic import CentralDataCache, CommandCache, DeviceDetailsCache, PingPongCache
15
+ from aiohomematic.store.persistent import (
16
+ DeviceDescriptionCache,
17
+ ParamsetDescriptionCache,
18
+ SessionRecorder,
19
+ cleanup_files,
20
+ )
21
+ from aiohomematic.store.visibility import ParameterVisibilityCache, check_ignore_parameters_is_clean
22
+
23
+ __all__ = [
24
+ "CentralDataCache",
25
+ "CommandCache",
26
+ "DeviceDescriptionCache",
27
+ "DeviceDetailsCache",
28
+ "ParameterVisibilityCache",
29
+ "ParamsetDescriptionCache",
30
+ "PingPongCache",
31
+ "SessionRecorder",
32
+ "cleanup_files",
33
+ "check_ignore_parameters_is_clean",
34
+ ]