conson-xp 1.51.1__py3-none-any.whl → 2.0.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.
- {conson_xp-1.51.1.dist-info → conson_xp-2.0.0.dist-info}/METADATA +1 -11
- {conson_xp-1.51.1.dist-info → conson_xp-2.0.0.dist-info}/RECORD +20 -38
- xp/__init__.py +1 -1
- xp/cli/commands/__init__.py +0 -4
- xp/cli/commands/term/term_commands.py +1 -1
- xp/cli/main.py +0 -3
- xp/models/homekit/homekit_config.py +4 -0
- xp/models/protocol/conbus_protocol.py +30 -25
- xp/models/term/accessory_state.py +1 -1
- xp/services/protocol/__init__.py +2 -3
- xp/services/protocol/conbus_event_protocol.py +5 -5
- xp/services/term/homekit_accessory_driver.py +171 -0
- xp/services/term/homekit_service.py +187 -10
- xp/term/homekit.py +146 -14
- xp/term/homekit.tcss +4 -4
- xp/term/widgets/room_list.py +61 -3
- xp/utils/dependencies.py +34 -154
- xp/cli/commands/homekit/__init__.py +0 -3
- xp/cli/commands/homekit/homekit.py +0 -120
- xp/cli/commands/homekit/homekit_start_commands.py +0 -44
- xp/services/homekit/__init__.py +0 -1
- xp/services/homekit/homekit_cache_service.py +0 -313
- xp/services/homekit/homekit_conbus_service.py +0 -99
- xp/services/homekit/homekit_config_validator.py +0 -327
- xp/services/homekit/homekit_conson_validator.py +0 -130
- xp/services/homekit/homekit_dimminglight.py +0 -189
- xp/services/homekit/homekit_dimminglight_service.py +0 -155
- xp/services/homekit/homekit_hap_service.py +0 -351
- xp/services/homekit/homekit_lightbulb.py +0 -125
- xp/services/homekit/homekit_lightbulb_service.py +0 -91
- xp/services/homekit/homekit_module_service.py +0 -60
- xp/services/homekit/homekit_outlet.py +0 -175
- xp/services/homekit/homekit_outlet_service.py +0 -127
- xp/services/homekit/homekit_service.py +0 -371
- xp/services/protocol/protocol_factory.py +0 -84
- xp/services/protocol/telegram_protocol.py +0 -270
- {conson_xp-1.51.1.dist-info → conson_xp-2.0.0.dist-info}/WHEEL +0 -0
- {conson_xp-1.51.1.dist-info → conson_xp-2.0.0.dist-info}/entry_points.txt +0 -0
- {conson_xp-1.51.1.dist-info → conson_xp-2.0.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
HomeKit Light Bulb Service.
|
|
3
|
-
|
|
4
|
-
This module provides service implementation for light bulb accessories.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import logging
|
|
8
|
-
|
|
9
|
-
from bubus import EventBus
|
|
10
|
-
|
|
11
|
-
from xp.models.protocol.conbus_protocol import (
|
|
12
|
-
LightBulbGetOnEvent,
|
|
13
|
-
LightBulbSetOnEvent,
|
|
14
|
-
ReadDatapointEvent,
|
|
15
|
-
SendActionEvent,
|
|
16
|
-
)
|
|
17
|
-
from xp.models.telegram.datapoint_type import DataPointType
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class HomeKitLightbulbService:
|
|
21
|
-
"""
|
|
22
|
-
Lightbulb service for HomeKit.
|
|
23
|
-
|
|
24
|
-
Attributes:
|
|
25
|
-
event_bus: Event bus for inter-service communication.
|
|
26
|
-
logger: Logger instance.
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
event_bus: EventBus
|
|
30
|
-
|
|
31
|
-
def __init__(self, event_bus: EventBus):
|
|
32
|
-
"""
|
|
33
|
-
Initialize the lightbulb service.
|
|
34
|
-
|
|
35
|
-
Args:
|
|
36
|
-
event_bus: Event bus instance.
|
|
37
|
-
"""
|
|
38
|
-
self.event_bus = event_bus
|
|
39
|
-
self.logger = logging.getLogger(__name__)
|
|
40
|
-
|
|
41
|
-
# Register event handlers
|
|
42
|
-
self.event_bus.on(LightBulbGetOnEvent, self.handle_lightbulb_get_on)
|
|
43
|
-
self.event_bus.on(LightBulbSetOnEvent, self.handle_lightbulb_set_on)
|
|
44
|
-
|
|
45
|
-
def handle_lightbulb_get_on(self, event: LightBulbGetOnEvent) -> None:
|
|
46
|
-
"""
|
|
47
|
-
Handle lightbulb get on event.
|
|
48
|
-
|
|
49
|
-
Args:
|
|
50
|
-
event: Lightbulb get on event.
|
|
51
|
-
"""
|
|
52
|
-
self.logger.info(
|
|
53
|
-
f"Getting lightbulb state for serial {event.serial_number}, output {event.output_number}"
|
|
54
|
-
)
|
|
55
|
-
self.logger.debug(f"lightbulb_get_on {event}")
|
|
56
|
-
|
|
57
|
-
datapoint_type = DataPointType.MODULE_OUTPUT_STATE
|
|
58
|
-
read_datapoint = ReadDatapointEvent(
|
|
59
|
-
serial_number=event.serial_number, datapoint_type=datapoint_type
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
self.logger.debug(f"Dispatching ReadDatapointEvent for {event.serial_number}")
|
|
63
|
-
self.event_bus.dispatch(read_datapoint)
|
|
64
|
-
self.logger.debug(f"Dispatched ReadDatapointEvent for {event.serial_number}")
|
|
65
|
-
|
|
66
|
-
def handle_lightbulb_set_on(self, event: LightBulbSetOnEvent) -> None:
|
|
67
|
-
"""
|
|
68
|
-
Handle lightbulb set on event.
|
|
69
|
-
|
|
70
|
-
Args:
|
|
71
|
-
event: Lightbulb set on event.
|
|
72
|
-
"""
|
|
73
|
-
self.logger.info(
|
|
74
|
-
f"Setting lightbulb "
|
|
75
|
-
f"for serial {event.serial_number}, "
|
|
76
|
-
f"output {event.output_number} "
|
|
77
|
-
f"to {'ON' if event.value else 'OFF'}"
|
|
78
|
-
)
|
|
79
|
-
self.logger.debug(f"lightbulb_set_on {event}")
|
|
80
|
-
|
|
81
|
-
send_action = SendActionEvent(
|
|
82
|
-
serial_number=event.serial_number,
|
|
83
|
-
output_number=event.output_number,
|
|
84
|
-
value=event.value,
|
|
85
|
-
on_action=event.accessory.on_action,
|
|
86
|
-
off_action=event.accessory.off_action,
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
self.logger.debug(f"Dispatching SendActionEvent for {event.serial_number}")
|
|
90
|
-
self.event_bus.dispatch(send_action)
|
|
91
|
-
self.logger.debug(f"Dispatched SendActionEvent for {event.serial_number}")
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
HomeKit Module Service.
|
|
3
|
-
|
|
4
|
-
This module provides service implementation for HomeKit module management.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import logging
|
|
8
|
-
from typing import Optional
|
|
9
|
-
|
|
10
|
-
from xp.models.config.conson_module_config import (
|
|
11
|
-
ConsonModuleConfig,
|
|
12
|
-
ConsonModuleListConfig,
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class HomekitModuleService:
|
|
17
|
-
"""
|
|
18
|
-
Service for managing HomeKit module configurations.
|
|
19
|
-
|
|
20
|
-
Attributes:
|
|
21
|
-
logger: Logger instance.
|
|
22
|
-
conson_modules_config: Conson module list configuration.
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
def __init__(
|
|
26
|
-
self,
|
|
27
|
-
conson_modules_config: ConsonModuleListConfig,
|
|
28
|
-
):
|
|
29
|
-
"""
|
|
30
|
-
Initialize the HomeKit module service.
|
|
31
|
-
|
|
32
|
-
Args:
|
|
33
|
-
conson_modules_config: Conson module list configuration.
|
|
34
|
-
"""
|
|
35
|
-
# Set up logging
|
|
36
|
-
self.logger = logging.getLogger(__name__)
|
|
37
|
-
self.conson_modules_config = conson_modules_config
|
|
38
|
-
|
|
39
|
-
def get_module_by_serial(self, serial_number: str) -> Optional[ConsonModuleConfig]:
|
|
40
|
-
"""
|
|
41
|
-
Get a module by its serial number.
|
|
42
|
-
|
|
43
|
-
Args:
|
|
44
|
-
serial_number: Serial number of the module to find.
|
|
45
|
-
|
|
46
|
-
Returns:
|
|
47
|
-
Module configuration if found, None otherwise.
|
|
48
|
-
"""
|
|
49
|
-
module = next(
|
|
50
|
-
(
|
|
51
|
-
module
|
|
52
|
-
for module in self.conson_modules_config.root
|
|
53
|
-
if module.serial_number == serial_number
|
|
54
|
-
),
|
|
55
|
-
None,
|
|
56
|
-
)
|
|
57
|
-
self.logger.debug(
|
|
58
|
-
f"Module search by serial '{serial_number}': {'found' if module else 'not found'}"
|
|
59
|
-
)
|
|
60
|
-
return module
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
HomeKit Outlet Accessory.
|
|
3
|
-
|
|
4
|
-
This module provides an outlet accessory for HomeKit integration.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import logging
|
|
8
|
-
|
|
9
|
-
from bubus import EventBus
|
|
10
|
-
from pyhap.accessory import Accessory
|
|
11
|
-
from pyhap.accessory_driver import AccessoryDriver
|
|
12
|
-
from pyhap.const import CATEGORY_OUTLET
|
|
13
|
-
|
|
14
|
-
from xp.models.config.conson_module_config import ConsonModuleConfig
|
|
15
|
-
from xp.models.homekit.homekit_config import HomekitAccessoryConfig
|
|
16
|
-
from xp.models.protocol.conbus_protocol import (
|
|
17
|
-
OutletGetInUseEvent,
|
|
18
|
-
OutletGetOnEvent,
|
|
19
|
-
OutletSetInUseEvent,
|
|
20
|
-
OutletSetOnEvent,
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class Outlet(Accessory):
|
|
25
|
-
"""
|
|
26
|
-
HomeKit outlet accessory.
|
|
27
|
-
|
|
28
|
-
Attributes:
|
|
29
|
-
category: HomeKit category (CATEGORY_OUTLET).
|
|
30
|
-
event_bus: Event bus for inter-service communication.
|
|
31
|
-
logger: Logger instance.
|
|
32
|
-
identifier: Unique identifier for the accessory.
|
|
33
|
-
accessory: Accessory configuration.
|
|
34
|
-
module: Module configuration.
|
|
35
|
-
is_on: Current on/off state.
|
|
36
|
-
is_in_use: Current in-use state.
|
|
37
|
-
char_on: On characteristic.
|
|
38
|
-
char_outlet_in_use: Outlet in-use characteristic.
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
|
-
category = CATEGORY_OUTLET
|
|
42
|
-
event_bus: EventBus
|
|
43
|
-
|
|
44
|
-
def __init__(
|
|
45
|
-
self,
|
|
46
|
-
driver: AccessoryDriver,
|
|
47
|
-
module: ConsonModuleConfig,
|
|
48
|
-
accessory: HomekitAccessoryConfig,
|
|
49
|
-
event_bus: EventBus,
|
|
50
|
-
):
|
|
51
|
-
"""
|
|
52
|
-
Initialize the outlet accessory.
|
|
53
|
-
|
|
54
|
-
Args:
|
|
55
|
-
driver: HAP accessory driver.
|
|
56
|
-
module: Module configuration.
|
|
57
|
-
accessory: Accessory configuration.
|
|
58
|
-
event_bus: Event bus for inter-service communication.
|
|
59
|
-
"""
|
|
60
|
-
super().__init__(driver=driver, display_name=accessory.description)
|
|
61
|
-
|
|
62
|
-
self.logger = logging.getLogger(__name__)
|
|
63
|
-
|
|
64
|
-
identifier = f"{module.serial_number}.{accessory.output_number:02d}"
|
|
65
|
-
version = accessory.id
|
|
66
|
-
manufacturer = "Conson"
|
|
67
|
-
model = ("XP24_outlet",)
|
|
68
|
-
|
|
69
|
-
self.identifier = identifier
|
|
70
|
-
self.accessory = accessory
|
|
71
|
-
self.module = module
|
|
72
|
-
|
|
73
|
-
self.event_bus = event_bus
|
|
74
|
-
self.logger.info(
|
|
75
|
-
"Creating Outlet { serial_number : %s, output_number: %s }",
|
|
76
|
-
module.serial_number,
|
|
77
|
-
accessory.output_number,
|
|
78
|
-
)
|
|
79
|
-
self.is_on = False
|
|
80
|
-
self.is_in_use = False
|
|
81
|
-
|
|
82
|
-
serv_outlet = self.add_preload_service("Outlet")
|
|
83
|
-
self.set_info_service(version, manufacturer, model, identifier)
|
|
84
|
-
self.char_on = serv_outlet.configure_char(
|
|
85
|
-
"On", setter_callback=self.set_on, getter_callback=self.get_on
|
|
86
|
-
)
|
|
87
|
-
self.char_outlet_in_use = serv_outlet.configure_char(
|
|
88
|
-
"OutletInUse",
|
|
89
|
-
setter_callback=self.set_outlet_in_use,
|
|
90
|
-
getter_callback=self.get_outlet_in_use,
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
def set_outlet_in_use(self, value: bool) -> None:
|
|
94
|
-
"""
|
|
95
|
-
Set the in-use state of the outlet.
|
|
96
|
-
|
|
97
|
-
Args:
|
|
98
|
-
value: True if in use, False otherwise.
|
|
99
|
-
"""
|
|
100
|
-
self.logger.debug(f"set_outlet_in_use {value}")
|
|
101
|
-
|
|
102
|
-
self.is_in_use = value
|
|
103
|
-
self.event_bus.dispatch(
|
|
104
|
-
OutletSetInUseEvent(
|
|
105
|
-
serial_number=self.accessory.serial_number,
|
|
106
|
-
output_number=self.accessory.output_number,
|
|
107
|
-
module=self.module,
|
|
108
|
-
accessory=self.accessory,
|
|
109
|
-
value=value,
|
|
110
|
-
)
|
|
111
|
-
)
|
|
112
|
-
self.logger.debug(f"set_outlet_in_use {value} end")
|
|
113
|
-
|
|
114
|
-
def get_outlet_in_use(self) -> bool:
|
|
115
|
-
"""
|
|
116
|
-
Get the in-use state of the outlet.
|
|
117
|
-
|
|
118
|
-
Returns:
|
|
119
|
-
True if in use, False otherwise.
|
|
120
|
-
"""
|
|
121
|
-
# Emit event and get response
|
|
122
|
-
self.logger.debug("get_outlet_in_use")
|
|
123
|
-
|
|
124
|
-
# Dispatch event from HAP thread (thread-safe)
|
|
125
|
-
self.event_bus.dispatch(
|
|
126
|
-
OutletGetInUseEvent(
|
|
127
|
-
serial_number=self.accessory.serial_number,
|
|
128
|
-
output_number=self.accessory.output_number,
|
|
129
|
-
module=self.module,
|
|
130
|
-
accessory=self.accessory,
|
|
131
|
-
)
|
|
132
|
-
)
|
|
133
|
-
return self.is_in_use
|
|
134
|
-
|
|
135
|
-
def set_on(self, value: bool) -> None:
|
|
136
|
-
"""
|
|
137
|
-
Set the on/off state of the outlet.
|
|
138
|
-
|
|
139
|
-
Args:
|
|
140
|
-
value: True to turn on, False to turn off.
|
|
141
|
-
"""
|
|
142
|
-
# Emit set event
|
|
143
|
-
self.logger.debug(f"set_on {value} {self.is_on}")
|
|
144
|
-
|
|
145
|
-
self.is_on = value
|
|
146
|
-
self.event_bus.dispatch(
|
|
147
|
-
OutletSetOnEvent(
|
|
148
|
-
serial_number=self.accessory.serial_number,
|
|
149
|
-
output_number=self.accessory.output_number,
|
|
150
|
-
module=self.module,
|
|
151
|
-
accessory=self.accessory,
|
|
152
|
-
value=value,
|
|
153
|
-
)
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
def get_on(self) -> bool:
|
|
157
|
-
"""
|
|
158
|
-
Get the on/off state of the outlet.
|
|
159
|
-
|
|
160
|
-
Returns:
|
|
161
|
-
True if on, False if off.
|
|
162
|
-
"""
|
|
163
|
-
# Emit event and get response
|
|
164
|
-
self.logger.debug("get_on")
|
|
165
|
-
|
|
166
|
-
# Dispatch event from HAP thread (thread-safe)
|
|
167
|
-
self.event_bus.dispatch(
|
|
168
|
-
OutletGetOnEvent(
|
|
169
|
-
serial_number=self.accessory.serial_number,
|
|
170
|
-
output_number=self.accessory.output_number,
|
|
171
|
-
module=self.module,
|
|
172
|
-
accessory=self.accessory,
|
|
173
|
-
)
|
|
174
|
-
)
|
|
175
|
-
return self.is_on
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
HomeKit Outlet Service.
|
|
3
|
-
|
|
4
|
-
This module provides service implementation for outlet accessories.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import logging
|
|
8
|
-
|
|
9
|
-
from bubus import EventBus
|
|
10
|
-
|
|
11
|
-
from xp.models.protocol.conbus_protocol import (
|
|
12
|
-
OutletGetInUseEvent,
|
|
13
|
-
OutletGetOnEvent,
|
|
14
|
-
OutletSetOnEvent,
|
|
15
|
-
ReadDatapointEvent,
|
|
16
|
-
SendActionEvent,
|
|
17
|
-
)
|
|
18
|
-
from xp.models.telegram.datapoint_type import DataPointType
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class HomeKitOutletService:
|
|
22
|
-
"""
|
|
23
|
-
Outlet service for HomeKit.
|
|
24
|
-
|
|
25
|
-
Attributes:
|
|
26
|
-
event_bus: Event bus for inter-service communication.
|
|
27
|
-
logger: Logger instance.
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
event_bus: EventBus
|
|
31
|
-
|
|
32
|
-
def __init__(self, event_bus: EventBus):
|
|
33
|
-
"""
|
|
34
|
-
Initialize the outlet service.
|
|
35
|
-
|
|
36
|
-
Args:
|
|
37
|
-
event_bus: Event bus instance.
|
|
38
|
-
"""
|
|
39
|
-
self.event_bus = event_bus
|
|
40
|
-
self.logger = logging.getLogger(__name__)
|
|
41
|
-
|
|
42
|
-
# Register event handlers
|
|
43
|
-
self.event_bus.on(OutletGetOnEvent, self.handle_outlet_get_on)
|
|
44
|
-
self.event_bus.on(OutletSetOnEvent, self.handle_outlet_set_on)
|
|
45
|
-
self.event_bus.on(OutletGetInUseEvent, self.handle_outlet_get_in_use)
|
|
46
|
-
|
|
47
|
-
def handle_outlet_get_on(self, event: OutletGetOnEvent) -> bool:
|
|
48
|
-
"""
|
|
49
|
-
Handle outlet get on event.
|
|
50
|
-
|
|
51
|
-
Args:
|
|
52
|
-
event: Outlet get on event.
|
|
53
|
-
|
|
54
|
-
Returns:
|
|
55
|
-
True if request was dispatched successfully.
|
|
56
|
-
"""
|
|
57
|
-
self.logger.debug(
|
|
58
|
-
f"Getting outlet state for serial {event.serial_number}, output {event.output_number}"
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
datapoint_type = DataPointType.MODULE_OUTPUT_STATE
|
|
62
|
-
read_datapoint = ReadDatapointEvent(
|
|
63
|
-
serial_number=event.serial_number, datapoint_type=datapoint_type
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
self.logger.debug(f"Dispatching ReadDatapointEvent for {event.serial_number}")
|
|
67
|
-
self.event_bus.dispatch(read_datapoint)
|
|
68
|
-
self.logger.debug(f"Dispatched ReadDatapointEvent for {event.serial_number}")
|
|
69
|
-
return True
|
|
70
|
-
|
|
71
|
-
def handle_outlet_set_on(self, event: OutletSetOnEvent) -> bool:
|
|
72
|
-
"""
|
|
73
|
-
Handle outlet set on event.
|
|
74
|
-
|
|
75
|
-
Args:
|
|
76
|
-
event: Outlet set on event.
|
|
77
|
-
|
|
78
|
-
Returns:
|
|
79
|
-
True if command was sent successfully.
|
|
80
|
-
"""
|
|
81
|
-
self.logger.info(
|
|
82
|
-
f"Setting outlet "
|
|
83
|
-
f"for serial {event.serial_number}, "
|
|
84
|
-
f"output {event.output_number} "
|
|
85
|
-
f"to {'ON' if event.value else 'OFF'}"
|
|
86
|
-
)
|
|
87
|
-
self.logger.debug(f"outlet_set_on {event}")
|
|
88
|
-
|
|
89
|
-
send_action = SendActionEvent(
|
|
90
|
-
serial_number=event.serial_number,
|
|
91
|
-
output_number=event.output_number,
|
|
92
|
-
value=event.value,
|
|
93
|
-
on_action=event.accessory.on_action,
|
|
94
|
-
off_action=event.accessory.off_action,
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
self.logger.debug(f"Dispatching SendActionEvent for {event.serial_number}")
|
|
98
|
-
self.event_bus.dispatch(send_action)
|
|
99
|
-
self.logger.info(
|
|
100
|
-
f"Outlet set command sent successfully for {event.serial_number}"
|
|
101
|
-
)
|
|
102
|
-
return True
|
|
103
|
-
|
|
104
|
-
def handle_outlet_get_in_use(self, event: OutletGetInUseEvent) -> bool:
|
|
105
|
-
"""
|
|
106
|
-
Handle outlet get in-use event.
|
|
107
|
-
|
|
108
|
-
Args:
|
|
109
|
-
event: Outlet get in-use event.
|
|
110
|
-
|
|
111
|
-
Returns:
|
|
112
|
-
True if request was dispatched successfully.
|
|
113
|
-
"""
|
|
114
|
-
self.logger.info(
|
|
115
|
-
f"Getting outlet in-use status for serial {event.serial_number}"
|
|
116
|
-
)
|
|
117
|
-
self.logger.debug(f"outlet_get_in_use {event}")
|
|
118
|
-
|
|
119
|
-
datapoint_type = DataPointType.MODULE_STATE
|
|
120
|
-
read_datapoint = ReadDatapointEvent(
|
|
121
|
-
serial_number=event.serial_number, datapoint_type=datapoint_type
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
self.logger.debug(f"Dispatching ReadDatapointEvent for {event.serial_number}")
|
|
125
|
-
self.event_bus.dispatch(read_datapoint)
|
|
126
|
-
self.logger.debug("Dispatching ReadDatapointEvent (timeout: 2s)")
|
|
127
|
-
return True
|