conson-xp 1.46.0__py3-none-any.whl → 1.48.0__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.
Files changed (179) hide show
  1. {conson_xp-1.46.0.dist-info → conson_xp-1.48.0.dist-info}/METADATA +1 -1
  2. conson_xp-1.48.0.dist-info/RECORD +210 -0
  3. xp/__init__.py +3 -2
  4. xp/cli/commands/conbus/conbus.py +1 -1
  5. xp/cli/commands/conbus/conbus_actiontable_commands.py +33 -19
  6. xp/cli/commands/conbus/conbus_autoreport_commands.py +8 -4
  7. xp/cli/commands/conbus/conbus_blink_commands.py +20 -10
  8. xp/cli/commands/conbus/conbus_config_commands.py +2 -1
  9. xp/cli/commands/conbus/conbus_custom_commands.py +4 -2
  10. xp/cli/commands/conbus/conbus_datapoint_commands.py +10 -5
  11. xp/cli/commands/conbus/conbus_discover_commands.py +8 -4
  12. xp/cli/commands/conbus/conbus_event_commands.py +8 -4
  13. xp/cli/commands/conbus/conbus_export_commands.py +8 -4
  14. xp/cli/commands/conbus/conbus_lightlevel_commands.py +16 -8
  15. xp/cli/commands/conbus/conbus_linknumber_commands.py +8 -4
  16. xp/cli/commands/conbus/conbus_modulenumber_commands.py +8 -4
  17. xp/cli/commands/conbus/conbus_msactiontable_commands.py +78 -40
  18. xp/cli/commands/conbus/conbus_output_commands.py +16 -8
  19. xp/cli/commands/conbus/conbus_raw_commands.py +6 -3
  20. xp/cli/commands/conbus/conbus_receive_commands.py +6 -3
  21. xp/cli/commands/conbus/conbus_scan_commands.py +6 -3
  22. xp/cli/commands/file_commands.py +6 -3
  23. xp/cli/commands/homekit/homekit.py +4 -2
  24. xp/cli/commands/homekit/homekit_start_commands.py +2 -1
  25. xp/cli/commands/module_commands.py +8 -4
  26. xp/cli/commands/reverse_proxy_commands.py +8 -4
  27. xp/cli/commands/server/server_commands.py +6 -3
  28. xp/cli/commands/telegram/telegram_blink_commands.py +4 -2
  29. xp/cli/commands/telegram/telegram_checksum_commands.py +4 -2
  30. xp/cli/commands/telegram/telegram_discover_commands.py +2 -1
  31. xp/cli/commands/telegram/telegram_linknumber_commands.py +4 -2
  32. xp/cli/commands/telegram/telegram_parse_commands.py +4 -2
  33. xp/cli/commands/telegram/telegram_version_commands.py +2 -1
  34. xp/cli/commands/term/term_commands.py +4 -2
  35. xp/cli/main.py +2 -1
  36. xp/cli/utils/click_tree.py +6 -3
  37. xp/cli/utils/datapoint_type_choice.py +4 -2
  38. xp/cli/utils/decorators.py +42 -21
  39. xp/cli/utils/error_handlers.py +16 -8
  40. xp/cli/utils/formatters.py +22 -11
  41. xp/cli/utils/module_type_choice.py +4 -2
  42. xp/cli/utils/serial_number_type.py +4 -2
  43. xp/cli/utils/system_function_choice.py +4 -2
  44. xp/cli/utils/xp_module_type.py +4 -2
  45. xp/models/actiontable/actiontable.py +8 -8
  46. xp/models/actiontable/actiontable_type.py +20 -0
  47. xp/models/actiontable/msactiontable_xp20.py +8 -4
  48. xp/models/actiontable/msactiontable_xp24.py +12 -6
  49. xp/models/actiontable/msactiontable_xp33.py +20 -10
  50. xp/models/conbus/conbus.py +8 -4
  51. xp/models/conbus/conbus_autoreport.py +4 -2
  52. xp/models/conbus/conbus_blink.py +4 -2
  53. xp/models/conbus/conbus_client_config.py +6 -3
  54. xp/models/conbus/conbus_connection_status.py +4 -2
  55. xp/models/conbus/conbus_custom.py +4 -2
  56. xp/models/conbus/conbus_datapoint.py +4 -2
  57. xp/models/conbus/conbus_discover.py +6 -3
  58. xp/models/conbus/conbus_event_list.py +4 -2
  59. xp/models/conbus/conbus_event_raw.py +4 -2
  60. xp/models/conbus/conbus_export.py +2 -1
  61. xp/models/conbus/conbus_lightlevel.py +4 -2
  62. xp/models/conbus/conbus_linknumber.py +4 -2
  63. xp/models/conbus/conbus_logger_config.py +8 -4
  64. xp/models/conbus/conbus_output.py +4 -2
  65. xp/models/conbus/conbus_raw.py +4 -2
  66. xp/models/conbus/conbus_receive.py +4 -2
  67. xp/models/conbus/conbus_writeconfig.py +4 -2
  68. xp/models/config/conson_module_config.py +8 -4
  69. xp/models/homekit/homekit_accessory.py +4 -2
  70. xp/models/homekit/homekit_config.py +12 -6
  71. xp/models/log_entry.py +16 -8
  72. xp/models/protocol/conbus_protocol.py +36 -18
  73. xp/models/response.py +12 -8
  74. xp/models/telegram/action_type.py +4 -2
  75. xp/models/telegram/datapoint_type.py +4 -2
  76. xp/models/telegram/event_telegram.py +14 -7
  77. xp/models/telegram/event_type.py +2 -1
  78. xp/models/telegram/input_action_type.py +2 -1
  79. xp/models/telegram/input_type.py +2 -1
  80. xp/models/telegram/module_type.py +24 -12
  81. xp/models/telegram/module_type_code.py +2 -1
  82. xp/models/telegram/output_telegram.py +16 -10
  83. xp/models/telegram/reply_telegram.py +24 -13
  84. xp/models/telegram/system_function.py +6 -3
  85. xp/models/telegram/system_telegram.py +10 -6
  86. xp/models/telegram/telegram.py +2 -1
  87. xp/models/telegram/telegram_type.py +2 -1
  88. xp/models/telegram/timeparam_type.py +2 -1
  89. xp/models/term/connection_state.py +4 -2
  90. xp/models/term/module_state.py +2 -1
  91. xp/models/term/protocol_keys_config.py +6 -3
  92. xp/models/term/status_message.py +2 -1
  93. xp/models/term/telegram_display.py +2 -1
  94. xp/models/write_config_type.py +4 -2
  95. xp/services/actiontable/actiontable_serializer.py +34 -41
  96. xp/services/{conbus/actiontable/actiontable_download_state_machine.py → actiontable/download_state_machine.py} +13 -8
  97. xp/services/actiontable/msactiontable_xp20_serializer.py +73 -50
  98. xp/services/actiontable/msactiontable_xp24_serializer.py +73 -54
  99. xp/services/actiontable/msactiontable_xp33_serializer.py +44 -20
  100. xp/services/actiontable/serializer_protocol.py +76 -0
  101. xp/services/conbus/actiontable/actiontable_download_service.py +68 -31
  102. xp/services/conbus/actiontable/actiontable_list_service.py +17 -4
  103. xp/services/conbus/actiontable/actiontable_show_service.py +10 -6
  104. xp/services/conbus/actiontable/actiontable_upload_service.py +17 -9
  105. xp/services/conbus/conbus_blink_all_service.py +16 -8
  106. xp/services/conbus/conbus_blink_service.py +14 -7
  107. xp/services/conbus/conbus_custom_service.py +16 -8
  108. xp/services/conbus/conbus_datapoint_queryall_service.py +18 -9
  109. xp/services/conbus/conbus_datapoint_service.py +18 -9
  110. xp/services/conbus/conbus_discover_service.py +24 -13
  111. xp/services/conbus/conbus_event_list_service.py +11 -7
  112. xp/services/conbus/conbus_event_raw_service.py +18 -10
  113. xp/services/conbus/conbus_export_service.py +28 -14
  114. xp/services/conbus/conbus_output_service.py +18 -10
  115. xp/services/conbus/conbus_raw_service.py +16 -8
  116. xp/services/conbus/conbus_receive_service.py +18 -10
  117. xp/services/conbus/conbus_scan_service.py +18 -10
  118. xp/services/conbus/msactiontable/msactiontable_upload_service.py +18 -10
  119. xp/services/conbus/write_config_service.py +18 -9
  120. xp/services/homekit/homekit_cache_service.py +12 -6
  121. xp/services/homekit/homekit_conbus_service.py +12 -6
  122. xp/services/homekit/homekit_config_validator.py +34 -17
  123. xp/services/homekit/homekit_conson_validator.py +18 -9
  124. xp/services/homekit/homekit_dimminglight.py +14 -7
  125. xp/services/homekit/homekit_dimminglight_service.py +14 -7
  126. xp/services/homekit/homekit_hap_service.py +18 -9
  127. xp/services/homekit/homekit_lightbulb.py +10 -5
  128. xp/services/homekit/homekit_lightbulb_service.py +10 -5
  129. xp/services/homekit/homekit_module_service.py +8 -4
  130. xp/services/homekit/homekit_outlet.py +14 -7
  131. xp/services/homekit/homekit_outlet_service.py +12 -6
  132. xp/services/homekit/homekit_service.py +24 -12
  133. xp/services/log_file_service.py +16 -8
  134. xp/services/module_type_service.py +10 -5
  135. xp/services/protocol/conbus_event_protocol.py +51 -26
  136. xp/services/protocol/conbus_protocol.py +36 -19
  137. xp/services/protocol/protocol_factory.py +12 -6
  138. xp/services/protocol/telegram_protocol.py +12 -6
  139. xp/services/reverse_proxy_service.py +26 -14
  140. xp/services/server/base_server_service.py +42 -23
  141. xp/services/server/client_buffer_manager.py +12 -7
  142. xp/services/server/cp20_server_service.py +10 -7
  143. xp/services/server/device_service_factory.py +12 -8
  144. xp/services/server/server_service.py +18 -11
  145. xp/services/server/xp130_server_service.py +11 -8
  146. xp/services/server/xp20_server_service.py +16 -10
  147. xp/services/server/xp230_server_service.py +10 -7
  148. xp/services/server/xp24_server_service.py +22 -13
  149. xp/services/server/xp33_server_service.py +44 -25
  150. xp/services/telegram/telegram_blink_service.py +14 -8
  151. xp/services/telegram/telegram_checksum_service.py +12 -7
  152. xp/services/telegram/telegram_datapoint_service.py +14 -9
  153. xp/services/telegram/telegram_discover_service.py +28 -15
  154. xp/services/telegram/telegram_link_number_service.py +18 -10
  155. xp/services/telegram/telegram_output_service.py +24 -12
  156. xp/services/telegram/telegram_service.py +22 -11
  157. xp/services/telegram/telegram_version_service.py +14 -8
  158. xp/services/term/protocol_monitor_service.py +30 -16
  159. xp/services/term/state_monitor_service.py +39 -21
  160. xp/term/protocol.py +12 -6
  161. xp/term/state.py +12 -7
  162. xp/term/widgets/help_menu.py +6 -3
  163. xp/term/widgets/modules_list.py +20 -10
  164. xp/term/widgets/protocol_log.py +12 -6
  165. xp/term/widgets/status_footer.py +10 -5
  166. xp/utils/checksum.py +6 -3
  167. xp/utils/dependencies.py +25 -30
  168. xp/utils/event_helper.py +6 -4
  169. xp/utils/logging.py +6 -3
  170. xp/utils/serialization.py +30 -16
  171. xp/utils/state_machine.py +16 -9
  172. xp/utils/time_utils.py +6 -3
  173. conson_xp-1.46.0.dist-info/RECORD +0 -211
  174. xp/services/conbus/msactiontable/msactiontable_download_service.py +0 -275
  175. xp/services/conbus/msactiontable/msactiontable_list_service.py +0 -100
  176. xp/services/conbus/msactiontable/msactiontable_show_service.py +0 -89
  177. {conson_xp-1.46.0.dist-info → conson_xp-1.48.0.dist-info}/WHEEL +0 -0
  178. {conson_xp-1.46.0.dist-info → conson_xp-1.48.0.dist-info}/entry_points.txt +0 -0
  179. {conson_xp-1.46.0.dist-info → conson_xp-1.48.0.dist-info}/licenses/LICENSE +0 -0
@@ -13,7 +13,8 @@ from xp.models.telegram.telegram_type import TelegramType
13
13
 
14
14
  @dataclass
15
15
  class EventTelegram(Telegram):
16
- r"""Represent a parsed event telegram from the console bus.
16
+ r"""
17
+ Represent a parsed event telegram from the console bus.
17
18
 
18
19
  Format: <[EO]{module_type}L{link_number}I{input_number}{event_type}{checksum}>
19
20
 
@@ -46,7 +47,8 @@ class EventTelegram(Telegram):
46
47
 
47
48
  @property
48
49
  def module_info(self) -> Optional[ModuleType]:
49
- """Get module type information for this telegram.
50
+ """
51
+ Get module type information for this telegram.
50
52
 
51
53
  Returns:
52
54
  ModuleType instance if found, None otherwise.
@@ -55,7 +57,8 @@ class EventTelegram(Telegram):
55
57
 
56
58
  @property
57
59
  def input_type(self) -> InputType:
58
- """Determines the input type based on input number.
60
+ """
61
+ Determines the input type based on input number.
59
62
 
60
63
  Returns:
61
64
  InputType enum value.
@@ -71,7 +74,8 @@ class EventTelegram(Telegram):
71
74
 
72
75
  @property
73
76
  def is_button_press(self) -> bool:
74
- """True if this is a button press event.
77
+ """
78
+ True if this is a button press event.
75
79
 
76
80
  Returns:
77
81
  True if event is a button press, False otherwise.
@@ -80,7 +84,8 @@ class EventTelegram(Telegram):
80
84
 
81
85
  @property
82
86
  def is_button_release(self) -> bool:
83
- """True if this is a button release event.
87
+ """
88
+ True if this is a button release event.
84
89
 
85
90
  Returns:
86
91
  True if event is a button release, False otherwise.
@@ -88,7 +93,8 @@ class EventTelegram(Telegram):
88
93
  return self.event_type == EventType.BUTTON_RELEASE
89
94
 
90
95
  def to_dict(self) -> dict[str, Any]:
91
- """Convert to dictionary for JSON serialization.
96
+ """
97
+ Convert to dictionary for JSON serialization.
92
98
 
93
99
  Returns:
94
100
  Dictionary representation of the event telegram.
@@ -122,7 +128,8 @@ class EventTelegram(Telegram):
122
128
  return result
123
129
 
124
130
  def __str__(self) -> str:
125
- """Human-readable string representation.
131
+ """
132
+ Human-readable string representation.
126
133
 
127
134
  Returns:
128
135
  Formatted string representation.
@@ -4,7 +4,8 @@ from enum import Enum
4
4
 
5
5
 
6
6
  class EventType(Enum):
7
- """Event types for telegraph events.
7
+ """
8
+ Event types for telegraph events.
8
9
 
9
10
  Attributes:
10
11
  BUTTON_PRESS: Button make (press) event.
@@ -4,7 +4,8 @@ from enum import Enum
4
4
 
5
5
 
6
6
  class InputActionType(Enum):
7
- """Input action types for XP24 module (based on Feature-Action-Table.md).
7
+ """
8
+ Input action types for XP24 module (based on Feature-Action-Table.md).
8
9
 
9
10
  Attributes:
10
11
  VOID: No action.
@@ -4,7 +4,8 @@ from enum import Enum
4
4
 
5
5
 
6
6
  class InputType(Enum):
7
- """Input types based on input number ranges.
7
+ """
8
+ Input types based on input number ranges.
8
9
 
9
10
  Attributes:
10
11
  PUSH_BUTTON: Push button input (range 00-09).
@@ -8,7 +8,8 @@ from xp.models.telegram.module_type_code import MODULE_TYPE_REGISTRY
8
8
 
9
9
  @dataclass
10
10
  class ModuleType:
11
- """Represents a module type in the XP system.
11
+ """
12
+ Represents a module type in the XP system.
12
13
 
13
14
  Contains the module code, name, and description.
14
15
 
@@ -30,7 +31,8 @@ class ModuleType:
30
31
 
31
32
  @classmethod
32
33
  def from_code(cls, code: int) -> Optional["ModuleType"]:
33
- """Create ModuleType from a numeric code.
34
+ """
35
+ Create ModuleType from a numeric code.
34
36
 
35
37
  Args:
36
38
  code: The numeric module type code.
@@ -45,7 +47,8 @@ class ModuleType:
45
47
 
46
48
  @classmethod
47
49
  def from_name(cls, name: str) -> Optional["ModuleType"]:
48
- """Create ModuleType from a module name.
50
+ """
51
+ Create ModuleType from a module name.
49
52
 
50
53
  Args:
51
54
  name: The module name (case-insensitive).
@@ -61,7 +64,8 @@ class ModuleType:
61
64
 
62
65
  @property
63
66
  def is_reserved(self) -> bool:
64
- """Check if this module type is reserved.
67
+ """
68
+ Check if this module type is reserved.
65
69
 
66
70
  Returns:
67
71
  True if module type is reserved, False otherwise.
@@ -70,7 +74,8 @@ class ModuleType:
70
74
 
71
75
  @property
72
76
  def is_push_button_panel(self) -> bool:
73
- """Check if this module type is a push button panel.
77
+ """
78
+ Check if this module type is a push button panel.
74
79
 
75
80
  Returns:
76
81
  True if module is a push button panel, False otherwise.
@@ -87,7 +92,8 @@ class ModuleType:
87
92
 
88
93
  @property
89
94
  def is_ir_capable(self) -> bool:
90
- """Check if this module type has IR capabilities.
95
+ """
96
+ Check if this module type has IR capabilities.
91
97
 
92
98
  Returns:
93
99
  True if module has IR capabilities, False otherwise.
@@ -106,7 +112,8 @@ class ModuleType:
106
112
 
107
113
  @property
108
114
  def category(self) -> str:
109
- """Get the module category based on its type.
115
+ """
116
+ Get the module category based on its type.
110
117
 
111
118
  Returns:
112
119
  Module category string.
@@ -122,7 +129,8 @@ class ModuleType:
122
129
  return "Unknown"
123
130
 
124
131
  def to_dict(self) -> Dict:
125
- """Convert to dictionary for JSON serialization.
132
+ """
133
+ Convert to dictionary for JSON serialization.
126
134
 
127
135
  Returns:
128
136
  Dictionary representation of the module type.
@@ -138,7 +146,8 @@ class ModuleType:
138
146
  }
139
147
 
140
148
  def __str__(self) -> str:
141
- """Return human-readable string representation.
149
+ """
150
+ Return human-readable string representation.
142
151
 
143
152
  Returns:
144
153
  Formatted string representation.
@@ -147,7 +156,8 @@ class ModuleType:
147
156
 
148
157
 
149
158
  def get_all_module_types() -> List[ModuleType]:
150
- """Get all available module types.
159
+ """
160
+ Get all available module types.
151
161
 
152
162
  Returns:
153
163
  List of all ModuleType instances.
@@ -162,7 +172,8 @@ def get_all_module_types() -> List[ModuleType]:
162
172
 
163
173
 
164
174
  def get_module_types_by_category() -> Dict[str, List[ModuleType]]:
165
- """Get module types grouped by category.
175
+ """
176
+ Get module types grouped by category.
166
177
 
167
178
  Returns:
168
179
  Dictionary mapping category names to lists of ModuleType instances.
@@ -177,7 +188,8 @@ def get_module_types_by_category() -> Dict[str, List[ModuleType]]:
177
188
 
178
189
 
179
190
  def is_valid_module_code(code: int) -> bool:
180
- """Check if a module code is valid.
191
+ """
192
+ Check if a module code is valid.
181
193
 
182
194
  Args:
183
195
  code: Module code to validate.
@@ -5,7 +5,8 @@ from typing import Dict
5
5
 
6
6
 
7
7
  class ModuleTypeCode(Enum):
8
- """Enum representing all XP system module type codes.
8
+ """
9
+ Enum representing all XP system module type codes.
9
10
 
10
11
  Attributes:
11
12
  NOMOD: No module (code 0).
@@ -1,9 +1,10 @@
1
- """XP output telegram model for console bus communication.
1
+ """
2
+ XP output telegram model for console bus communication.
2
3
 
3
- XP output telegrams are used for controlling relay inputs on XP modules.
4
- Each XP24 module has 4 inputs (0-3) that can be pressed or released.
5
- Each XP33 module has 3 inputs (0-2) that can be pressed or released.
6
- Each XP31 module has 1 inputs (0-0) that can be pressed or released.
4
+ XP output telegrams are used for controlling relay inputs on XP modules. Each XP24
5
+ module has 4 inputs (0-3) that can be pressed or released. Each XP33 module has 3 inputs
6
+ (0-2) that can be pressed or released. Each XP31 module has 1 inputs (0-0) that can be
7
+ pressed or released.
7
8
  """
8
9
 
9
10
  from dataclasses import dataclass
@@ -17,7 +18,8 @@ from xp.models.telegram.telegram import Telegram
17
18
 
18
19
  @dataclass
19
20
  class OutputTelegram(Telegram):
20
- """Represent a parsed XP output telegram from the console bus.
21
+ """
22
+ Represent a parsed XP output telegram from the console bus.
21
23
 
22
24
  Format: <S{serial_number}F27D{input:02d}{action}{checksum}>
23
25
  Examples: <S0012345008F27D00AAFN>
@@ -45,7 +47,8 @@ class OutputTelegram(Telegram):
45
47
 
46
48
  @property
47
49
  def action_description(self) -> str:
48
- """Get human-readable action description.
50
+ """
51
+ Get human-readable action description.
49
52
 
50
53
  Returns:
51
54
  Human-readable description of the action.
@@ -62,7 +65,8 @@ class OutputTelegram(Telegram):
62
65
 
63
66
  @property
64
67
  def input_description(self) -> str:
65
- """Get human-readable input description.
68
+ """
69
+ Get human-readable input description.
66
70
 
67
71
  Returns:
68
72
  Description of the input/output number.
@@ -70,7 +74,8 @@ class OutputTelegram(Telegram):
70
74
  return f"Input {self.output_number}"
71
75
 
72
76
  def to_dict(self) -> dict:
73
- """Convert to dictionary for JSON serialization.
77
+ """
78
+ Convert to dictionary for JSON serialization.
74
79
 
75
80
  Returns:
76
81
  Dictionary representation of the output telegram.
@@ -91,7 +96,8 @@ class OutputTelegram(Telegram):
91
96
  }
92
97
 
93
98
  def __str__(self) -> str:
94
- """Return human-readable string representation.
99
+ """
100
+ Return human-readable string representation.
95
101
 
96
102
  Returns:
97
103
  Formatted string representation.
@@ -1,7 +1,8 @@
1
- """Reply telegram model for console bus communication.
1
+ """
2
+ Reply telegram model for console bus communication.
2
3
 
3
- Reply telegrams are responses to system telegrams, containing the requested data
4
- like temperature readings, status information, etc.
4
+ Reply telegrams are responses to system telegrams, containing the requested data like
5
+ temperature readings, status information, etc.
5
6
  """
6
7
 
7
8
  from dataclasses import dataclass
@@ -16,7 +17,8 @@ from xp.models.telegram.telegram_type import TelegramType
16
17
 
17
18
  @dataclass
18
19
  class ReplyTelegram(Telegram):
19
- """Represents a parsed reply telegram from the console bus.
20
+ """
21
+ Represents a parsed reply telegram from the console bus.
20
22
 
21
23
  Format: <R{serial_number}F{function_code}D{data}{checksum}>
22
24
  Format: <R{serial_number}F{function_code}D{datapoint_type}{data_value}{checksum}>
@@ -54,7 +56,8 @@ class ReplyTelegram(Telegram):
54
56
 
55
57
  @property
56
58
  def parse_datapoint_value(self) -> dict[str, Any]:
57
- """Parse the data value based on data point type.
59
+ """
60
+ Parse the data value based on data point type.
58
61
 
59
62
  Returns:
60
63
  Dictionary containing parsed value and metadata.
@@ -74,7 +77,8 @@ class ReplyTelegram(Telegram):
74
77
  return {"raw_value": self.data_value, "parsed": False}
75
78
 
76
79
  def _parse_temperature_value(self) -> dict:
77
- """Parse temperature value like '+26,0§C'.
80
+ """
81
+ Parse temperature value like '+26,0§C'.
78
82
 
79
83
  Returns:
80
84
  Dictionary containing parsed temperature value and metadata.
@@ -101,7 +105,8 @@ class ReplyTelegram(Telegram):
101
105
  }
102
106
 
103
107
  def _parse_humidity_value(self) -> dict:
104
- """Parse humidity value like '+65,5§H'.
108
+ """
109
+ Parse humidity value like '+65,5§H'.
105
110
 
106
111
  Returns:
107
112
  Dictionary containing parsed humidity value and metadata.
@@ -128,7 +133,8 @@ class ReplyTelegram(Telegram):
128
133
  }
129
134
 
130
135
  def _parse_voltage_value(self) -> dict:
131
- """Parse voltage value like '+12,5§V'.
136
+ """
137
+ Parse voltage value like '+12,5§V'.
132
138
 
133
139
  Returns:
134
140
  Dictionary containing parsed voltage value and metadata.
@@ -155,7 +161,8 @@ class ReplyTelegram(Telegram):
155
161
  }
156
162
 
157
163
  def _parse_current_value(self) -> dict:
158
- """Parse current value like '+0,25§A'.
164
+ """
165
+ Parse current value like '+0,25§A'.
159
166
 
160
167
  Returns:
161
168
  Dictionary containing parsed current value and metadata.
@@ -182,7 +189,8 @@ class ReplyTelegram(Telegram):
182
189
  }
183
190
 
184
191
  def _parse_module_type_value(self) -> dict:
185
- """Parse status value.
192
+ """
193
+ Parse status value.
186
194
 
187
195
  Returns:
188
196
  Dictionary containing parsed module type value.
@@ -195,7 +203,8 @@ class ReplyTelegram(Telegram):
195
203
  }
196
204
 
197
205
  def _parse_sw_version_value(self) -> dict:
198
- """Parse version value like 'XP230_V1.00.04'.
206
+ """
207
+ Parse version value like 'XP230_V1.00.04'.
199
208
 
200
209
  Returns:
201
210
  Dictionary containing parsed version information.
@@ -235,7 +244,8 @@ class ReplyTelegram(Telegram):
235
244
  }
236
245
 
237
246
  def to_dict(self) -> dict[str, Any]:
238
- """Convert to dictionary for JSON serialization.
247
+ """
248
+ Convert to dictionary for JSON serialization.
239
249
 
240
250
  Returns:
241
251
  Dictionary representation of the reply telegram.
@@ -275,7 +285,8 @@ class ReplyTelegram(Telegram):
275
285
  }
276
286
 
277
287
  def __str__(self) -> str:
278
- """Human-readable string representation.
288
+ """
289
+ Human-readable string representation.
279
290
 
280
291
  Returns:
281
292
  Formatted string representation.
@@ -5,7 +5,8 @@ from typing import Optional
5
5
 
6
6
 
7
7
  class SystemFunction(str, Enum):
8
- """System function codes for system telegrams.
8
+ """
9
+ System function codes for system telegrams.
9
10
 
10
11
  Attributes:
11
12
  NONE: Undefined function.
@@ -76,7 +77,8 @@ class SystemFunction(str, Enum):
76
77
  ACTION = "27" # F27D Action function
77
78
 
78
79
  def get_description(self) -> str:
79
- """Get the description of the SystemFunction.
80
+ """
81
+ Get the description of the SystemFunction.
80
82
 
81
83
  Returns:
82
84
  Human-readable description of the function.
@@ -102,7 +104,8 @@ class SystemFunction(str, Enum):
102
104
 
103
105
  @classmethod
104
106
  def from_code(cls, code: str) -> Optional["SystemFunction"]:
105
- """Get SystemFunction from code string.
107
+ """
108
+ Get SystemFunction from code string.
106
109
 
107
110
  Args:
108
111
  code: Function code string.
@@ -1,7 +1,8 @@
1
- """System telegram model for console bus communication.
1
+ """
2
+ System telegram model for console bus communication.
2
3
 
3
- System telegrams are used for system-related information like updating firmware
4
- and reading temperature from modules.
4
+ System telegrams are used for system-related information like updating firmware and
5
+ reading temperature from modules.
5
6
  """
6
7
 
7
8
  from dataclasses import dataclass
@@ -16,7 +17,8 @@ from xp.models.telegram.telegram_type import TelegramType
16
17
 
17
18
  @dataclass
18
19
  class SystemTelegram(Telegram):
19
- """Represents a parsed system telegram from the console bus.
20
+ """
21
+ Represents a parsed system telegram from the console bus.
20
22
 
21
23
  Format: <S{serial_number}F{function_code}D{datapoint_type}{checksum}>
22
24
  Examples: <S0020012521F02D18FN>
@@ -40,7 +42,8 @@ class SystemTelegram(Telegram):
40
42
  self.telegram_type = TelegramType.SYSTEM
41
43
 
42
44
  def to_dict(self) -> dict[str, Any]:
43
- """Convert to dictionary for JSON serialization.
45
+ """
46
+ Convert to dictionary for JSON serialization.
44
47
 
45
48
  Returns:
46
49
  Dictionary representation of the system telegram.
@@ -77,7 +80,8 @@ class SystemTelegram(Telegram):
77
80
  }
78
81
 
79
82
  def __str__(self) -> str:
80
- """Human-readable string representation.
83
+ """
84
+ Human-readable string representation.
81
85
 
82
86
  Returns:
83
87
  Formatted string representation.
@@ -9,7 +9,8 @@ from xp.models.telegram.telegram_type import TelegramType
9
9
 
10
10
  @dataclass
11
11
  class Telegram:
12
- """Represents an abstract telegram from the console bus.
12
+ """
13
+ Represents an abstract telegram from the console bus.
13
14
 
14
15
  Can be an EventTelegram, SystemTelegram or ReplyTelegram.
15
16
 
@@ -4,7 +4,8 @@ from enum import Enum
4
4
 
5
5
 
6
6
  class TelegramType(str, Enum):
7
- """Enumeration of telegram types in the console bus system.
7
+ """
8
+ Enumeration of telegram types in the console bus system.
8
9
 
9
10
  Attributes:
10
11
  EVENT: Event telegram (E).
@@ -4,7 +4,8 @@ from enum import IntEnum
4
4
 
5
5
 
6
6
  class TimeParam(IntEnum):
7
- """Time parameter values for action timing.
7
+ """
8
+ Time parameter values for action timing.
8
9
 
9
10
  Attributes:
10
11
  NONE: No time parameter.
@@ -6,7 +6,8 @@ from xp.utils.state_machine import StateMachine
6
6
 
7
7
 
8
8
  class ConnectionState(str, Enum):
9
- """Connection state enumeration.
9
+ """
10
+ Connection state enumeration.
10
11
 
11
12
  Attributes:
12
13
  DISCONNECTING: Disconnecting to server.
@@ -24,7 +25,8 @@ class ConnectionState(str, Enum):
24
25
 
25
26
  @staticmethod
26
27
  def create_state_machine() -> StateMachine:
27
- """Create and configure state machine for connection management.
28
+ """
29
+ Create and configure state machine for connection management.
28
30
 
29
31
  Returns:
30
32
  Configured StateMachine with connection state transitions.
@@ -7,7 +7,8 @@ from typing import Optional
7
7
 
8
8
  @dataclass
9
9
  class ModuleState:
10
- """State of a Conson module for TUI display.
10
+ """
11
+ State of a Conson module for TUI display.
11
12
 
12
13
  Attributes:
13
14
  name: Module name/identifier (e.g., A01, A02).
@@ -8,7 +8,8 @@ from pydantic import BaseModel, Field
8
8
 
9
9
 
10
10
  class ProtocolKeyConfig(BaseModel):
11
- """Configuration for a single protocol key.
11
+ """
12
+ Configuration for a single protocol key.
12
13
 
13
14
  Attributes:
14
15
  name: Human-readable command name.
@@ -20,7 +21,8 @@ class ProtocolKeyConfig(BaseModel):
20
21
 
21
22
 
22
23
  class ProtocolKeysConfig(BaseModel):
23
- """Protocol keys configuration.
24
+ """
25
+ Protocol keys configuration.
24
26
 
25
27
  Attributes:
26
28
  protocol: Dictionary mapping key to protocol configuration.
@@ -32,7 +34,8 @@ class ProtocolKeysConfig(BaseModel):
32
34
 
33
35
  @classmethod
34
36
  def from_yaml(cls, config_path: Path) -> "ProtocolKeysConfig":
35
- """Load protocol keys from YAML file.
37
+ """
38
+ Load protocol keys from YAML file.
36
39
 
37
40
  Args:
38
41
  config_path: Path to YAML configuration file.
@@ -7,7 +7,8 @@ class StatusMessageChanged(Message):
7
7
  """Message posted when status message changes."""
8
8
 
9
9
  def __init__(self, message: str) -> None:
10
- """Initialize the message.
10
+ """
11
+ Initialize the message.
11
12
 
12
13
  Args:
13
14
  message: The status message to display.
@@ -6,7 +6,8 @@ from typing import Literal, Optional
6
6
 
7
7
  @dataclass
8
8
  class TelegramDisplayEvent:
9
- """Event containing telegram data for display in TUI.
9
+ """
10
+ Event containing telegram data for display in TUI.
10
11
 
11
12
  Attributes:
12
13
  direction: Direction of telegram ("RX" for received, "TX" for transmitted).
@@ -5,7 +5,8 @@ from typing import Optional
5
5
 
6
6
 
7
7
  class WriteConfigType(str, Enum):
8
- """Write Config types for system telegrams.
8
+ """
9
+ Write Config types for system telegrams.
9
10
 
10
11
  Attributes:
11
12
  LINK_NUMBER: Link number configuration (code 04).
@@ -19,7 +20,8 @@ class WriteConfigType(str, Enum):
19
20
 
20
21
  @classmethod
21
22
  def from_code(cls, code: str) -> Optional["WriteConfigType"]:
22
- """Get WriteConfigType from code string.
23
+ """
24
+ Get WriteConfigType from code string.
23
25
 
24
26
  Args:
25
27
  code: Configuration type code string.