You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
max_actions=20, # auto-flush when this count is reached
69
+
settings=OverkizClientSettings(
70
+
action_queue=ActionQueueSettings(
71
+
delay=0.5, # seconds to wait before auto-flush
72
+
max_actions=20, # auto-flush when this count is reached
73
+
),
69
74
),
70
75
)
71
76
```
@@ -75,18 +80,21 @@ client = OverkizClient(
75
80
Normally, queued actions are sent after the delay window or when `max_actions` is reached. Call `flush_action_queue()` to force the queue to execute immediately, which is useful when you want to send any pending actions without waiting for the delay timer to expire.
76
81
77
82
```python
78
-
from pyoverkiz.action_queue import ActionQueueSettings
79
83
import asyncio
80
84
85
+
from pyoverkiz.action_queue import ActionQueueSettings
81
86
from pyoverkiz.client import OverkizClient
87
+
from pyoverkiz.client import OverkizClientSettings
82
88
from pyoverkiz.auth import UsernamePasswordCredentials
83
89
from pyoverkiz.enums import OverkizCommand, Server
action_queue=ActionQueueSettings(delay=10.0), # long delay
95
+
settings=OverkizClientSettings(
96
+
action_queue=ActionQueueSettings(delay=10.0), # long delay
97
+
),
90
98
)
91
99
92
100
action = Action(
@@ -115,15 +123,17 @@ Why this matters:
115
123
`get_pending_actions_count()` returns a snapshot of how many actions are currently queued. Because the queue can change concurrently (and the method does not acquire the queue lock), the value is approximate. Use it for logging, diagnostics, or UI hints—not for critical control flow.
116
124
117
125
```python
126
+
from pyoverkiz.action_queue import ActionQueueSettings
118
127
from pyoverkiz.client import OverkizClient
128
+
from pyoverkiz.client import OverkizClientSettings
119
129
from pyoverkiz.auth import UsernamePasswordCredentials
120
130
from pyoverkiz.enums import OverkizCommand, Server
RTS devices have a default execution duration of 30 seconds, which blocks consecutive commands until the duration expires. To avoid this, you can configure `rts_command_duration` in `OverkizClientSettings`. The client will automatically inject the configured duration into RTS commands that support it, based on the command definition (`nparams`).
297
+
298
+
```python
299
+
from pyoverkiz.auth.credentials import UsernamePasswordCredentials
300
+
from pyoverkiz.client import OverkizClient
301
+
from pyoverkiz.client import OverkizClientSettings
With `rts_command_duration=0`, the execution duration is set to 0 seconds for supported commands, allowing consecutive commands to be sent without delay. Commands that don't accept a duration parameter (like `identify` or `test`) are left unchanged.
312
+
281
313
## Limitations and rate limits
282
314
283
315
Gateways impose limits on how many executions can run or be queued simultaneously. If the execution queue is full, the API will raise an `ExecutionQueueFullError`. Most gateways allow up to 10 concurrent executions.
Copy file name to clipboardExpand all lines: docs/migration-v2.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -291,7 +291,10 @@ Several enum members have been renamed for consistent `UPPER_SNAKE_CASE` or to f
291
291
292
292
These are not breaking, but worth knowing about when migrating:
293
293
294
+
-**Client settings** — behavioral configuration is now grouped in `OverkizClientSettings`, passed via the `settings` parameter. This replaces standalone constructor parameters like `action_queue`.
294
295
-**Action queue** — batch device executions automatically. See the [action queue guide](action-queue.md).
296
+
-**RTS command duration** — automatically inject execution duration into RTS commands to prevent the default 30-second blocking behavior. See [RTS command duration](device-control.md#rts-command-duration).
297
+
-**Device helpers** — `Device.get_command_definition()` for looking up command metadata.
295
298
-**Reference endpoints** — query server metadata: `get_reference_ui_classes()`, `get_reference_ui_widgets()`, `get_reference_ui_profile()`, `get_reference_controllable_types()`, etc.
0 commit comments