Device API Reference
xovis.api.device.client
Xovis SDK - Device Client
This module resides within the State & Topology Plane, providing the primary
entry point for interacting with Xovis edge sensors. It implements the
DeviceClient, a stateful and topology-aware asynchronous manager that
orchestrates authentication, configuration caching, and fleet discovery.
Classes
DeviceClient
Bases: BaseControlPlane
Stateful & Topology-Aware Asynchronous Client for Xovis environments.
Orchestrates the lifecycle of a connection to a Xovis sensor, including automated background configuration caching, multisensor discovery, and graceful resource cleanup.
Source code in src/xovis/api/device/client.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | |
Attributes
active_contexts
property
Returns a flat, iterable list of valid hardware-aware contexts.
For standard sensors (PC/PF-series): Returns [singlesensor] + multisensors. For Spiders: Returns only the multisensor contexts.
Returns:
| Name | Type | Description |
|---|---|---|
list |
list
|
A list containing SinglesensorContext and/or MultisensorContext instances. |
analytics
property
Direct accessor for Analytics management (shortcut to singlesensor.analytics).
Returns:
| Name | Type | Description |
|---|---|---|
AnalyticsManager |
AnalyticsManager
|
The Analytics manager for the physical device. |
Raises:
| Type | Description |
|---|---|
HardwareNotSupportedError
|
If accessed on a lensless Spider NUC. |
datapush
property
Direct accessor for DataPush management (shortcut to singlesensor.datapush).
Returns:
| Name | Type | Description |
|---|---|---|
DataPushManager |
DataPushManager
|
The DataPush manager for the physical device. |
Raises:
| Type | Description |
|---|---|
HardwareNotSupportedError
|
If accessed on a lensless Spider NUC. |
has_analytics
async
property
Checks if the sensor supports and is authorized for analytics.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if analytics logics endpoints are accessible. |
has_bicycle_detection
property
Checks for Bicycle extension license (PIBCL=114).
Returns:
| Type | Description |
|---|---|
Any
|
Awaitable[bool]: True if the license is active. |
has_itxpt
async
property
Checks if the hardware supports ITxPT (Public Transport).
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if ITxPT state endpoints are accessible. |
has_object_detection
property
Checks for core Object Detection license (PIVID=116).
Returns:
| Type | Description |
|---|---|
Any
|
Awaitable[bool]: True if the license is active. |
has_people_attributes
property
Checks for People Attributes license (PIFMD=117).
Returns:
| Type | Description |
|---|---|
Any
|
Awaitable[bool]: True if the license is active. |
has_pram_detection
property
Checks for Pram extension license (PIGES=112).
Returns:
| Type | Description |
|---|---|
Any
|
Awaitable[bool]: True if the license is active. |
has_wheelchair_detection
property
Checks for Wheelchair extension license (PISTE=113).
Returns:
| Type | Description |
|---|---|
Any
|
Awaitable[bool]: True if the license is active. |
has_wifi
async
property
Checks if the hardware supports WiFi/BT monitoring.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if RF privacy endpoints are accessible. |
history
property
Direct accessor for History management (shortcut to singlesensor.history).
Returns:
| Name | Type | Description |
|---|---|---|
HistoryManager |
HistoryManager
|
The History manager for the physical device. |
Raises:
| Type | Description |
|---|---|
HardwareNotSupportedError
|
If accessed on a lensless Spider NUC. |
info
property
Retrieves raw device information fetched during connection.
Returns:
| Type | Description |
|---|---|
Optional[dict[str, Any]]
|
Optional[Dict[str, Any]]: The hardware profile metadata. |
is_spider
property
Checks if the hardware is a lensless Spider NUC.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the device type contains 'Spider' or 'SPIDER', or if the product code indicates a Spider unit. |
itxpt
property
Accesses the ITxPT management manager.
Returns:
| Name | Type | Description |
|---|---|---|
ITxPTManager |
ITxPTManager
|
Manager for public transport protocols. |
multisensors
property
Accesses the Multisensor cluster manager.
Returns:
| Name | Type | Description |
|---|---|---|
MultisensorsManager |
MultisensorsManager
|
Manager for virtual stitched environments (Multisensors). |
network
property
Accesses the Network configuration manager.
Returns:
| Name | Type | Description |
|---|---|---|
NetworkManager |
NetworkManager
|
Manager for IP, DNS, and bridge settings. |
privacy
property
Accesses the Privacy configuration manager.
Returns:
| Name | Type | Description |
|---|---|---|
PrivacyManager |
PrivacyManager
|
Manager for masking and blurring settings. |
scene
property
Direct accessor for Scene management (shortcut to singlesensor.scene).
Returns:
| Name | Type | Description |
|---|---|---|
SceneManager |
SceneManager
|
The Scene manager for the physical device. |
Raises:
| Type | Description |
|---|---|
HardwareNotSupportedError
|
If accessed on a lensless Spider NUC. |
singlesensor
property
Accessor for the physical lens context.
Returns:
| Name | Type | Description |
|---|---|---|
SinglesensorContext |
SinglesensorContext
|
The physical hardware management context. |
system
property
Accesses the System management manager.
Returns:
| Name | Type | Description |
|---|---|---|
SystemManager |
SystemManager
|
Manager for reboot, reset, and license operations. |
time
property
Accesses the Time configuration manager.
Returns:
| Name | Type | Description |
|---|---|---|
TimeManager |
TimeManager
|
Manager for NTP and timezone settings. |
topology
property
Accesses the Topology and Graphing manager.
Returns:
| Name | Type | Description |
|---|---|---|
TopologyManager |
TopologyManager
|
Manager for Multisensor node discovery. |
update
property
Accesses the Firmware Update manager.
Returns:
| Name | Type | Description |
|---|---|---|
UpdateManager |
UpdateManager
|
Manager for OTA and local binary flashing. |
users
property
Accesses the User management manager.
Returns:
| Name | Type | Description |
|---|---|---|
UsersManager |
UsersManager
|
Manager for local sensor accounts. |
Methods:
__aenter__()
async
Enters the asynchronous context and initializes background engines.
Establishes connection pools, fetches hardware profiles, hydrates multisensor contexts, and starts the configuration cache watcher.
Returns:
| Name | Type | Description |
|---|---|---|
DeviceClient |
DeviceClient
|
The active client instance. |
Source code in src/xovis/api/device/client.py
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 | |
__aexit__(exc_type, exc_val, exc_tb)
async
Gracefully shuts down background engines and releases connections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exc_type
|
Any
|
The exception type if an error occurred. |
required |
exc_val
|
Any
|
The exception value. |
required |
exc_tb
|
Any
|
The traceback object. |
required |
Source code in src/xovis/api/device/client.py
651 652 653 654 655 656 657 658 659 660 661 | |
__init__(host, username, password, use_ntlm=False, timeout=15.0, max_retries=5, cache_strategy=CacheStrategy.MANUAL, cache_ttl_seconds=60.0, cache_poll_interval=10.0, **kwargs)
Initializes the DeviceClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
host
|
str
|
IP address or hostname of the sensor. |
required |
username
|
str
|
Authentication username. |
required |
password
|
str
|
Authentication password. |
required |
use_ntlm
|
bool
|
Whether to use NTLM authentication. Defaults to False. |
False
|
timeout
|
float
|
Request timeout in seconds. Defaults to 15.0. |
15.0
|
max_retries
|
int
|
Max retry attempts for transient failures. Defaults to 5. |
5
|
cache_strategy
|
CacheStrategy
|
Config sync strategy. Defaults to MANUAL. |
MANUAL
|
cache_ttl_seconds
|
float
|
TTL for cached entries. Defaults to 60.0. |
60.0
|
cache_poll_interval
|
float
|
Polling frequency for state hash. Defaults to 10.0. |
10.0
|
**kwargs
|
Any
|
Additional keyword arguments passed to the HTTP client. |
{}
|
Source code in src/xovis/api/device/client.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | |
_probe_capability(key, endpoint)
async
Lazy asynchronous probe for hardware capabilities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
The unique capability identifier. |
required |
endpoint
|
str
|
The API endpoint to probe. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the capability is supported and authorized. |
Source code in src/xovis/api/device/client.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | |
_probe_license(feature_id)
async
Probes the device for a specific license feature by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
feature_id
|
int
|
The unique Xovis feature identifier. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the license is active (ENABLED or TEST_ENABLED). |
Source code in src/xovis/api/device/client.py
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | |
_setup_signal_handlers()
Registers signal handlers for graceful shutdown on POSIX systems.
Source code in src/xovis/api/device/client.py
670 671 672 673 674 675 676 677 | |
aclose()
async
Manual graceful shutdown fallback.
Source code in src/xovis/api/device/client.py
663 664 665 666 667 668 | |
get_privacy_state()
async
Retrieves the current privacy mode of the sensor.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The privacy mode identifier (e.g., "0", "1", "2", "3", "4"). |
Source code in src/xovis/api/device/client.py
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | |
has_capability(endpoint)
async
Ad-hoc probe for a specific endpoint capability.
Source code in src/xovis/api/device/client.py
248 249 250 251 252 253 254 255 256 257 258 259 260 | |
SinglesensorContext
Isolated context strictly for the physical device lenses.
Provides access to core resource managers (DataPush, Scene, Analytics) bound to the physical sensor hardware. This context is disabled on lensless hardware profiles like the Spider NUC.
Source code in src/xovis/api/device/client.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
Attributes
analytics
property
Accesses the Analytics management manager.
datapush
property
Accesses the DataPush management manager.
history
property
Accesses the History management manager.
privacy
property
Accesses the Privacy management manager.
Returns:
| Name | Type | Description |
|---|---|---|
PrivacyManager |
PrivacyManager
|
Manager for masking and blurring. |
Raises:
| Type | Description |
|---|---|
HardwareNotSupportedError
|
If accessed on a lensless Spider NUC. |
scene
property
Accesses the Scene management manager.
Methods:
__init__(client)
Initializes the SinglesensorContext.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
DeviceClient
|
The parent device client instance. |
required |
Source code in src/xovis/api/device/client.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
UnifiedDeviceClient
Enterprise-grade hybrid connection router for Xovis devices.
This class provides a hybrid routing strategy across the control and state planes. It supports three connection pathways: MAC-First (resolving MAC addresses with local IP handshake and Cloud HUB fallback), IP-First (local connection with HUB proxy fallback), and Named Resolution (dynamic name lookups with AmbiguousDeviceNameError handling).
Attributes:
| Name | Type | Description |
|---|---|---|
mac_address |
Optional[str]
|
Target MAC address. |
host |
Optional[str]
|
Target IP address or hostname. |
name |
Optional[str]
|
Target device name. |
hub_client |
Optional[Any]
|
HubClient instance for Cloud proxy fallback. |
username |
str
|
Local authentication username. |
password |
str
|
Local authentication password. |
kwargs |
Any
|
Additional options passed to DeviceClient. |
Source code in src/xovis/api/device/client.py
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 | |
Methods:
__aenter__()
async
Establishes connection to the device using the optimal route.
Returns:
| Name | Type | Description |
|---|---|---|
DeviceClient |
DeviceClient
|
An active, authenticated device client instance. |
Raises:
| Type | Description |
|---|---|
AmbiguousDeviceNameError
|
If multiple devices share the same name. |
ConnectionError
|
If all connection attempts and fallbacks fail. |
Source code in src/xovis/api/device/client.py
748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 | |
__aexit__(exc_type, exc_val, exc_tb)
async
Gracefully releases the connected device client resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exc_type
|
Any
|
The exception type if an error occurred. |
required |
exc_val
|
Any
|
The exception value. |
required |
exc_tb
|
Any
|
The traceback object. |
required |
Source code in src/xovis/api/device/client.py
859 860 861 862 863 864 865 866 867 868 869 | |
__init__(identifier=None, mac_address=None, host=None, name=None, hub_client=None, username='admin', password='pass', **kwargs)
Initializes the UnifiedDeviceClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
Optional[str]
|
Optional single positional identifier (MAC, IP, or Name). |
None
|
mac_address
|
Optional[str]
|
Target MAC address. |
None
|
host
|
Optional[str]
|
Target IP address. |
None
|
name
|
Optional[str]
|
Target device name. |
None
|
hub_client
|
Optional[Any]
|
Optional HubClient instance. |
None
|
username
|
str
|
Username for LAN authentication. |
'admin'
|
password
|
str
|
Password for LAN authentication. |
'pass'
|
**kwargs
|
Any
|
Extra connection options. |
{}
|
Source code in src/xovis/api/device/client.py
699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 | |
Functions:
xovis.api.device.cache
Xovis SDK - Device Configuration Cache Manager
This module resides within the State & Topology Plane, providing a stateful,
graph-aware synchronization engine for edge sensor configurations. It implements
the ConfigCacheManager which abstracts complex nested topologies into
convenient, dot-notation accessors for Jupyter/REPL environments.
Classes
BulkDeviceFacade
Dynamic broadcasting facade that executes operations concurrently across child managers.
Source code in src/xovis/api/device/cache.py
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | |
Methods:
__call__(*args, **kwargs)
async
Executes the method concurrently across all clients.
Source code in src/xovis/api/device/cache.py
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | |
__getattr__(name)
Intercepts method calls and builds the attribute chain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The method or attribute name to traverse. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
BulkDeviceFacade |
BulkDeviceFacade
|
A new facade wrapping the updated path. |
Source code in src/xovis/api/device/cache.py
340 341 342 343 344 345 346 347 348 349 | |
__init__(child_clients, path=())
Initializes the BulkDeviceFacade.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
child_clients
|
list[Any]
|
List of child DeviceClient instances. |
required |
path
|
tuple[str, ...]
|
The property path to traverse on each client. |
()
|
Source code in src/xovis/api/device/cache.py
330 331 332 333 334 335 336 337 338 | |
CacheCollection
Bases: list, Generic[T]
Enhanced list subclass exposing REPL accessors.
Wraps standard lists with .by_name and .by_id properties to facilitate
rapid resource discovery in the State & Topology Plane.
Source code in src/xovis/api/device/cache.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
Attributes
by_id
property
Exposes elements via their 'id' attribute for dot-notation access.
Returns:
| Type | Description |
|---|---|
REPLAccessor[T]
|
REPLAccessor[T]: An ID-mapped dynamic accessor facade. |
by_name
property
Exposes elements via their 'name' attribute for dot-notation access.
Returns:
| Type | Description |
|---|---|
REPLAccessor[T]
|
REPLAccessor[T]: A name-mapped dynamic accessor facade. |
Methods:
__init__(items=None)
Initializes the CacheCollection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
items
|
Optional[List[T]]
|
Initial list of elements. Defaults to None. |
None
|
Source code in src/xovis/api/device/cache.py
205 206 207 208 209 210 211 212 213 214 | |
CachePaths
Helper namespace providing autocomplete and auto-suggestions for all local resources.
Source code in src/xovis/api/device/cache.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
Methods:
get_latest_state()
classmethod
Helper to get the most recently modified state cache for quick debugging.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The Path to the most recently modified state cache, falling back to DEVICE_STATE. |
Source code in src/xovis/api/device/cache.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
get_system_cache_dir()
classmethod
Resolves the system-level global cache directory in a platform-independent manner.
Returns:
| Name | Type | Description |
|---|---|---|
Path |
Path
|
The resolved path to the system cache directory. |
Source code in src/xovis/api/device/cache.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
list_available_states()
classmethod
Discovers all available local state files. Highly useful in REPL/Notebooks.
Returns:
| Type | Description |
|---|---|
list[str]
|
list[str]: Filenames of all available local states. |
Source code in src/xovis/api/device/cache.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
CacheResource
Bases: BaseModel
Lightweight Pydantic model for cached resource metadata.
Source code in src/xovis/api/device/cache.py
281 282 283 284 285 286 287 288 289 | |
ChildDevicesAccessor
Bases: BaseControlPlane
Smart accessor bridging individual child lookups with grouped/bulk execution.
Source code in src/xovis/api/device/cache.py
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | |
Attributes
agents
property
Aggregates and flattens agents from all physical child caches.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Combined agent configurations. |
connections
property
Aggregates and flattens connections from all physical child caches.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Combined connection configurations. |
counters
property
Aggregates and flattens counters from all physical child caches.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Combined counter configurations. |
layers
property
Aggregates and flattens layers from all physical child caches.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Combined layer configurations. |
lines
property
Aggregates and flattens scene lines from all physical child caches.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Combined line configurations. |
logics
property
Aggregates and flattens logics from all physical child caches.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Combined logic configurations. |
masks
property
Aggregates and flattens masks from all physical child caches.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Combined mask configurations. |
modifiers
property
Aggregates and flattens modifiers from all physical child caches.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Combined modifier configurations. |
zones
property
Aggregates and flattens scene zones from all physical child caches.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Combined zone configurations. |
Methods:
__dir__()
Provides IDE autocomplete for standard managers.
Source code in src/xovis/api/device/cache.py
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | |
__getattr__(name)
Provides direct access to bulk managers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Attribute name to delegate. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
BulkDeviceFacade wrapping the target manager attribute. |
Raises:
| Type | Description |
|---|---|
AttributeError
|
If the manager is not a standard supported device manager. |
Source code in src/xovis/api/device/cache.py
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | |
__init__(parent_context, child_clients)
Initializes the ChildDevicesAccessor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent_context
|
Any
|
The parent ContextAccessor. |
required |
child_clients
|
list[Any]
|
Mapped physical child clients. |
required |
Source code in src/xovis/api/device/cache.py
377 378 379 380 381 382 383 384 385 386 | |
ConfigCacheManager
Stateful Configuration Synchronizer and Topology Graph Manager.
Coordinates the background polling of edge sensor state hashes and performs concurrent synchronization of the full configuration graph. Implements GC protection for long-running background tasks and partitions state by physical and virtual contexts.
Source code in src/xovis/api/device/cache.py
762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 | |
Attributes
agents
property
Legacy shim mapping to singlesensor.agents.
buckets
property
Unified accessor for all state buckets (physical and virtual).
Returns:
| Type | Description |
|---|---|
REPLAccessor[ContextAccessor]
|
REPLAccessor[ContextAccessor]: All contexts mapped by their ID/name. |
connections
property
Legacy shim mapping to singlesensor.connections.
counters
property
Legacy shim mapping to singlesensor.counters.
geometries
property
Legacy shim combining zones and lines from the singlesensor context.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Combined collection of zones and lines. |
layers
property
Legacy shim mapping to singlesensor.layers.
lines
property
Legacy shim mapping to singlesensor.lines.
logics
property
Legacy shim mapping to singlesensor.logics.
masks
property
Legacy shim mapping to singlesensor.masks.
modifiers
property
Legacy shim mapping to singlesensor.modifiers.
multisensors
property
writable
Dynamic accessor for virtual stitched environments (Multisensors).
Returns:
| Type | Description |
|---|---|
REPLAccessor[ContextAccessor]
|
REPLAccessor[ContextAccessor]: Mapped context IDs to state facades. |
singlesensor
property
Accessor for the physical lens context.
Returns:
| Name | Type | Description |
|---|---|---|
ContextAccessor |
ContextAccessor
|
Facade for the 'singlesensor' state bucket. |
zones
property
Legacy shim mapping to singlesensor.zones.
Methods:
__init__(http_client, strategy, ttl_seconds, poll_interval, auto_persist_path=None, persistence_dir=None, cache_child_devices=False)
Initializes the ConfigCacheManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
http_client
|
XovisHTTPClient
|
The Control Plane HTTP engine. |
required |
strategy
|
CacheStrategy
|
The synchronization strategy (MANUAL, LAZY, or BACKGROUND). |
required |
ttl_seconds
|
float
|
Time-to-live for cached entries. |
required |
poll_interval
|
float
|
Frequency of background state checks. |
required |
auto_persist_path
|
Optional[str]
|
Path to a JSON file for offline-first state persistence. Defaults to None. |
None
|
persistence_dir
|
Optional[str]
|
Path to a directory for automated state persistence. Defaults to None. |
None
|
cache_child_devices
|
bool
|
Whether to recursively cache child devices. Defaults to False. |
False
|
Source code in src/xovis/api/device/cache.py
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 | |
_ensure_directory_or_fallback(path)
Ensures the directory for the given path is writeable or falls back.
Implements the 3-Tier cache folder creation and fallback strategy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
The desired target file path. |
required |
Returns:
| Type | Description |
|---|---|
Optional[Path]
|
Optional[Path]: The writeable target path, or None if falling back to memory-only. |
Source code in src/xovis/api/device/cache.py
1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 | |
_resolve_persist_path()
async
Resolves the final persistence path, dynamically if persistence_dir is used.
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Optional[str]: The absolute path to the state file, or None. |
Source code in src/xovis/api/device/cache.py
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 | |
_watcher_loop()
async
Polls the API config state hash for remote mutations.
Triggered by the BACKGROUND_WATCHER strategy. If a checksum change is detected, initiates a full graph synchronization.
Source code in src/xovis/api/device/cache.py
968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 | |
export_to_file(file_path)
Exports the entire nested state graph to a JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
The destination file path. |
required |
Source code in src/xovis/api/device/cache.py
1166 1167 1168 1169 1170 1171 1172 1173 1174 | |
load_from_disk()
async
Deserializes the HostStateBucket from disk.
Uses asyncio.to_thread to prevent blocking the event loop during file I/O.
Source code in src/xovis/api/device/cache.py
1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 | |
load_from_file(file_path)
Loads a nested state graph from a JSON file into memory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
The source JSON file path. |
required |
Source code in src/xovis/api/device/cache.py
1176 1177 1178 1179 1180 1181 1182 1183 1184 | |
save_to_disk()
async
Safely serializes the HostStateBucket to disk.
Uses asyncio.to_thread to prevent blocking the event loop during file I/O.
Source code in src/xovis/api/device/cache.py
1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 | |
start()
async
Starts the background configuration watcher.
Performs an initial synchronization and spawns a background loop with hard-referenced tasks to prevent mid-execution garbage collection. Also handles auto-loading from disk if persistence is enabled.
Source code in src/xovis/api/device/cache.py
928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 | |
stop()
async
Cleanly halts background synchronization loops.
Ensures all tasks are cancelled and awaited to prevent socket leaks.
Source code in src/xovis/api/device/cache.py
953 954 955 956 957 958 959 960 961 962 963 964 965 966 | |
sync()
async
Pulls the entire topology graph concurrently, isolating each context.
Performs multisensor discovery, builds a concurrent task matrix for all endpoints (DataPush, Scene, Analytics), and populates partitioned state buckets.
Raises:
| Type | Description |
|---|---|
Exception
|
Logged as an error if the synchronization fails. |
Source code in src/xovis/api/device/cache.py
996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 | |
ContextAccessor
Facade providing high-level access to a ContextStateBucket.
Wraps raw state buckets in CacheCollection instances to enable
dot-notation resource discovery (e.g., ctx.agents.by_name.MyAgent).
Source code in src/xovis/api/device/cache.py
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 | |
Attributes
agents
property
writable
Accesses the cached DataPush agents.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Collection of agent metadata. |
child_caches
property
Provides REPL access to the offline-first cache states of those child sensors.
Returns:
| Type | Description |
|---|---|
REPLAccessor[ContextAccessor]
|
REPLAccessor[ContextAccessor]: Facade for child configurations. |
child_devices
property
Provides instant autosuggestion/REPL access to physical child clients.
Returns:
| Name | Type | Description |
|---|---|---|
ChildDevicesAccessor |
ChildDevicesAccessor
|
High-level child client and bulk operations accessor. |
connections
property
writable
Accesses the cached DataPush connections.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Collection of connection metadata. |
counters
property
writable
Accesses the cached analysis counters.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Collection of counter metadata. |
layers
property
Accesses the cached scene layers.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Collection of layer metadata. |
lines
property
writable
Accesses the cached scene lines.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Collection of line metadata. |
logics
property
writable
Accesses the cached analysis logics.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Collection of logic metadata. |
masks
property
writable
Accesses the cached scene masks.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Collection of mask metadata. |
modifiers
property
writable
Accesses the cached analysis modifiers.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Collection of modifier metadata. |
zones
property
writable
Accesses the cached scene zones.
Returns:
| Type | Description |
|---|---|
CacheCollection[CacheResource]
|
CacheCollection[CacheResource]: Collection of zone metadata. |
Methods:
__init__(bucket, name=None, parent_client=None)
Initializes the ContextAccessor for a specific bucket.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bucket
|
ContextStateBucket
|
The raw state bucket to wrap. |
required |
name
|
Optional[str]
|
Descriptive name for the context. |
None
|
parent_client
|
Optional[Any]
|
The host device client instance. |
None
|
Source code in src/xovis/api/device/cache.py
561 562 563 564 565 566 567 568 569 570 571 572 | |
__repr__()
Returns a string representation of the ContextAccessor.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Description of the context. |
Source code in src/xovis/api/device/cache.py
622 623 624 625 626 627 628 629 | |
ContextStateBucket
Bases: BaseModel
Isolated state container for a specific lens context or virtual environment.
Partitions resources (agents, connections, geometries, etc.) by their operational context to prevent configuration leakage between physical sensors ("singlesensor") and virtual stitched environments ("multisensor").
Source code in src/xovis/api/device/cache.py
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | |
HostStateBucket
Bases: BaseModel
Root state container for the entire physical device host.
Aggregates checksum metadata and partitioned context buckets to represent the complete topology of a Xovis sensor or Spider NUC.
Source code in src/xovis/api/device/cache.py
314 315 316 317 318 319 320 321 322 323 324 | |
REPLAccessor
Bases: Generic[T]
Read-only dynamic accessor allowing object discovery via dot-notation.
This utility provides a hyper-optimized developer experience in interactive environments (Jupyter/REPL) by mapping resource names to object attributes using robust regex sanitization.
Source code in src/xovis/api/device/cache.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
Methods:
__dir__()
Enables IDE/REPL auto-completion for mapped resources.
Returns:
| Type | Description |
|---|---|
list[str]
|
List[str]: Combined list of class members and dynamic resource keys. |
Source code in src/xovis/api/device/cache.py
178 179 180 181 182 183 184 185 | |
__getattr__(name)
Retrieves a resource via dot-notation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The sanitized or raw name of the resource. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
T |
T
|
The mapped resource element. |
Raises:
| Type | Description |
|---|---|
AttributeError
|
If the resource name is not found in the accessor. |
Source code in src/xovis/api/device/cache.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
__getitem__(key)
Retrieves a resource via bracket-notation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str
|
The sanitized or raw name of the resource. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
T |
T
|
The mapped resource element. |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the resource name is not found in the accessor. |
Source code in src/xovis/api/device/cache.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
__init__(elements, key_attr='name')
Initializes the REPLAccessor with a list of elements.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
elements
|
List[T]
|
The collection of resources to expose. |
required |
key_attr
|
str
|
The attribute used for mapping (e.g., "name", "id"). Defaults to "name". |
'name'
|
Source code in src/xovis/api/device/cache.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
__repr__()
Returns a string representation of the REPLAccessor.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Description of available resources. |
Source code in src/xovis/api/device/cache.py
187 188 189 190 191 192 193 194 | |
Functions:
_by_name_property(self)
Safely extracts lists from Pydantic V2 Models or RootModels for REPL access.
This helper is monkey-patched onto auto-generated models to provide
the .by_name accessor pattern consistently.
Returns:
| Name | Type | Description |
|---|---|---|
REPLAccessor |
REPLAccessor
|
A dynamic accessor for the identified collection. |
Source code in src/xovis/api/device/cache.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
Resources
xovis.api.device.resources.analytics
Xovis SDK - Analytics Management Resource
Operates within the Control Plane. Provides the implementation for managing complex analytics structures (logics, modifiers, counters, and templates) on local edge sensors. Integrates atomic transactions, capacity limits, and cascading deletes for autonomous agent workflows.
Classes
AnalyticsManager
Manages analytics logics, modifiers, counters, and atomic transactions.
This manager orchestrates the mathematical and spatial rules of the sensor. It supports querying hardware limits to prevent resource exhaustion and allows autonomous agents to execute complex configuration changes atomically.
Source code in src/xovis/api/device/resources/analytics.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 | |
Attributes
models
property
Returns the strictly validated Pydantic models for the current firmware.
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
The collection of auto-generated Pydantic V2 models synchronized with the current device firmware. |
Methods:
__init__(client, target_id=None)
Initializes the AnalyticsManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
DeviceClient
|
The parent device client instance. |
required |
target_id
|
Optional[str]
|
The multisensor target ID, if applicable. |
None
|
Source code in src/xovis/api/device/resources/analytics.py
48 49 50 51 52 53 54 55 56 57 58 | |
_pacing_delay()
async
Implements intra-mutation pacing to prevent sensor configuration OOM or service crashes. Mandatory for FW 5.9.2+ where rapid REST mutations can lead to hardware reboots.
Source code in src/xovis/api/device/resources/analytics.py
190 191 192 193 194 195 | |
_resolve_counter_id(id_or_name)
async
Resolves a counter ID from either an ID or a human-readable name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The integer ID or string name to resolve. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The resolved numeric counter identifier. |
Raises:
| Type | Description |
|---|---|
ResourceNotFoundError
|
If no counter matches the provided name. |
MultipleResourcesFoundError
|
If the name is ambiguous. |
Source code in src/xovis/api/device/resources/analytics.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
_resolve_logic_id(id_or_name)
async
Resolves a logic ID from either an ID or a human-readable name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The integer ID or string name to resolve. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The resolved numeric logic identifier. |
Raises:
| Type | Description |
|---|---|
ResourceNotFoundError
|
If no logic matches the provided name. |
MultipleResourcesFoundError
|
If the name is ambiguous. |
Source code in src/xovis/api/device/resources/analytics.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
_resolve_modifier_id(id_or_name)
async
Resolves a modifier ID from either an ID or a human-readable name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The integer ID or string name to resolve. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The resolved numeric modifier identifier. |
Raises:
| Type | Description |
|---|---|
ResourceNotFoundError
|
If no modifier matches the provided name. |
MultipleResourcesFoundError
|
If the name is ambiguous. |
Source code in src/xovis/api/device/resources/analytics.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
_resolve_path()
Resolves the base API path based on the current isolated context.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The resolved API endpoint path. |
Source code in src/xovis/api/device/resources/analytics.py
71 72 73 74 75 76 77 78 79 80 | |
create_counter(counter, id_mode='SERVER')
async
Creates a new analytics counter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
counter
|
Counter
|
The counter model to create. |
required |
id_mode
|
str
|
ID assignment strategy. |
'SERVER'
|
Returns:
| Name | Type | Description |
|---|---|---|
Counter |
Counter
|
The created analytics counter. |
Source code in src/xovis/api/device/resources/analytics.py
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | |
create_logic(logic, id_mode='SERVER')
async
Creates a new analytics logic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
logic
|
Logic
|
The logic model to create. |
required |
id_mode
|
str
|
ID assignment strategy ("SERVER" or "CLIENT"). |
'SERVER'
|
Returns:
| Name | Type | Description |
|---|---|---|
Logic |
Logic
|
The created analytics logic with its assigned ID. |
Source code in src/xovis/api/device/resources/analytics.py
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | |
create_logic_template(template, id_mode='SERVER')
async
Instantiates a new logic template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template
|
LogicTemplate
|
The template model to instantiate. |
required |
id_mode
|
str
|
ID assignment strategy. |
'SERVER'
|
Returns:
| Name | Type | Description |
|---|---|---|
LogicTemplate |
LogicTemplate
|
The created logic template instance. |
Source code in src/xovis/api/device/resources/analytics.py
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | |
create_modifier(modifier, id_mode='SERVER')
async
Creates a new analytics modifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
modifier
|
Modifier
|
The modifier model to create. |
required |
id_mode
|
str
|
ID assignment strategy. |
'SERVER'
|
Returns:
| Name | Type | Description |
|---|---|---|
Modifier |
Modifier
|
The created analytics modifier. |
Source code in src/xovis/api/device/resources/analytics.py
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | |
delete_all_counters(force=False)
async
Deletes all analytics counters and optionally cascades dependencies.
Source code in src/xovis/api/device/resources/analytics.py
536 537 538 539 540 | |
delete_all_logics(force=False)
async
Deletes all analytics logics and optionally cascades dependencies.
Source code in src/xovis/api/device/resources/analytics.py
303 304 305 306 307 | |
delete_all_modifiers()
async
Deletes all analytics modifiers.
Source code in src/xovis/api/device/resources/analytics.py
446 447 448 449 450 451 | |
delete_counter(id_or_name, force=False)
async
Deletes an analytics counter.
Source code in src/xovis/api/device/resources/analytics.py
527 528 529 530 531 532 533 534 | |
delete_logic(id_or_name, force=False)
async
Deletes an analytics logic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the logic to delete. |
required |
force
|
bool
|
If True, forces deletion even if dependencies exist. |
False
|
Source code in src/xovis/api/device/resources/analytics.py
290 291 292 293 294 295 296 297 298 299 300 301 | |
delete_logic_template(id_or_name)
async
Deletes a specific logic template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the template to delete. |
required |
Source code in src/xovis/api/device/resources/analytics.py
344 345 346 347 348 349 350 351 352 353 | |
delete_modifier(id_or_name)
async
Deletes an analytics modifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the modifier to delete. |
required |
Source code in src/xovis/api/device/resources/analytics.py
435 436 437 438 439 440 441 442 443 444 | |
execute_transaction(transaction, id_mode='SERVER')
async
Executes a bundle of requests as a single atomic transaction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transaction
|
Transaction
|
The transaction model containing a list of configuration mutations to execute atomically. |
required |
id_mode
|
str
|
ID assignment strategy ("SERVER" or "CLIENT"). |
'SERVER'
|
Returns:
| Name | Type | Description |
|---|---|---|
Transaction |
Transaction
|
The executed transaction with updated IDs and statuses. |
Source code in src/xovis/api/device/resources/analytics.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | |
get_all_counters(logic_id=None)
async
Retrieves analytics counters, optionally restricted to a specific logic.
Source code in src/xovis/api/device/resources/analytics.py
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | |
get_all_logic_templates()
async
Retrieves all pre-configured logic templates.
Returns:
| Name | Type | Description |
|---|---|---|
LogicTemplateCollection |
LogicTemplateCollection
|
The collection of available logic templates. |
Source code in src/xovis/api/device/resources/analytics.py
318 319 320 321 322 323 324 325 326 | |
get_all_logics()
async
Retrieves all analytics logics from the sensor.
Returns:
| Name | Type | Description |
|---|---|---|
LogicCollection |
LogicCollection
|
The collection of all configured analytics logics. |
Source code in src/xovis/api/device/resources/analytics.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | |
get_all_modifiers(logic_id=None, counter_id=None)
async
Retrieves analytics modifiers, optionally filtered by parent relationships.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
logic_id
|
Optional[int]
|
Restrict output to modifiers of a specific logic. |
None
|
counter_id
|
Optional[int]
|
Restrict output to modifiers manipulating a specific counter. |
None
|
Source code in src/xovis/api/device/resources/analytics.py
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | |
get_counter(id_or_name)
async
Retrieves a specific analytics counter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the counter to retrieve. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Counter |
Counter
|
The retrieved analytics counter model. |
Source code in src/xovis/api/device/resources/analytics.py
481 482 483 484 485 486 487 488 489 490 491 492 493 | |
get_counter_limits()
async
Retrieves the maximum allowed number of counters for the device.
Source code in src/xovis/api/device/resources/analytics.py
454 455 456 457 | |
get_logic(id_or_name)
async
Retrieves a specific analytics logic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the logic to retrieve. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Logic |
Logic
|
The retrieved analytics logic model. |
Source code in src/xovis/api/device/resources/analytics.py
244 245 246 247 248 249 250 251 252 253 254 255 256 | |
get_logic_limits()
async
Retrieves the maximum allowed number of logics for the device.
Source code in src/xovis/api/device/resources/analytics.py
216 217 218 219 220 221 | |
get_modifier(id_or_name)
async
Retrieves a specific analytics modifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the modifier to retrieve. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Modifier |
Modifier
|
The retrieved analytics modifier model. |
Source code in src/xovis/api/device/resources/analytics.py
389 390 391 392 393 394 395 396 397 398 399 400 401 | |
get_modifier_limits()
async
Retrieves the maximum allowed number of modifiers for the device.
Source code in src/xovis/api/device/resources/analytics.py
356 357 358 359 | |
reset_all_counters()
async
Resets the relative/live values of all counters to zero.
Source code in src/xovis/api/device/resources/analytics.py
549 550 551 552 553 | |
reset_counter(id_or_name)
async
Resets the relative/live value of a specific counter to zero.
Source code in src/xovis/api/device/resources/analytics.py
542 543 544 545 546 547 | |
reset_logic_counters(id_or_name)
async
Resets the relative/live values of all counters associated with this logic to zero. Does not affect the persisted historical database.
Source code in src/xovis/api/device/resources/analytics.py
309 310 311 312 313 314 315 | |
update_counter(id_or_name, counter)
async
Updates an existing analytics counter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the counter to update. |
required |
counter
|
Counter
|
The updated counter model. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Counter |
Counter
|
The updated analytics counter. |
Source code in src/xovis/api/device/resources/analytics.py
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | |
update_logic(id_or_name, logic)
async
Updates an existing analytics logic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the logic to update. |
required |
logic
|
Logic
|
The updated logic model. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Logic |
Logic
|
The updated analytics logic. |
Source code in src/xovis/api/device/resources/analytics.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | |
update_modifier(id_or_name, modifier)
async
Updates an existing analytics modifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the modifier to update. |
required |
modifier
|
Modifier
|
The updated modifier model. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Modifier |
Modifier
|
The updated analytics modifier. |
Source code in src/xovis/api/device/resources/analytics.py
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | |
Functions:
_recursive_none_filter(data)
Recursively removes None values from dictionaries and lists.
Source code in src/xovis/api/device/resources/analytics.py
30 31 32 33 34 35 36 | |
xovis.api.device.resources.datapush
Xovis SDK - DataPush Management Resource
Operates within the Control Plane. Provides the implementation for managing high-frequency telemetry pipelines (DataPush agents and connections) on local edge sensors. Integrates advanced trigger mechanics for autonomous data recovery and fault remediation.
Classes
DataPushManager
Manages DataPush pipelines (Agents and Connections) on a Xovis device.
This manager provisions the telemetry datapush that feed downstream engines. It supports full CRUD operations, connection diagnostics, and crucially, autonomous data recovery triggers to maintain zero-downtime SLAs.
Source code in src/xovis/api/device/resources/datapush.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 | |
Attributes
models
property
Returns the strictly validated Pydantic models for the current firmware.
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
The collection of auto-generated Pydantic V2 models synchronized with the current device firmware. |
Methods:
__init__(client, target_id=None)
Initializes the DataPushManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
DeviceClient
|
The parent device client instance. |
required |
target_id
|
Optional[str]
|
The multisensor target ID, if applicable. If None, defaults to the physical singlesensor context. |
None
|
Source code in src/xovis/api/device/resources/datapush.py
51 52 53 54 55 56 57 58 59 60 61 62 | |
_pacing_delay()
async
Implements intra-mutation pacing to prevent sensor configuration OOM or service crashes.
Mandatory for FW 5.9.2+ where rapid REST mutations can lead to internal service desynchronization and subsequent hardware reboots.
Source code in src/xovis/api/device/resources/datapush.py
175 176 177 178 179 180 181 182 | |
_resolve_agent_id(id_or_name)
async
Resolves an agent ID from either a UUID string, integer, or human-readable name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[str, UUID, int]
|
The ID or name of the agent. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The resolved agent ID string. |
Raises:
| Type | Description |
|---|---|
ResourceNotFoundError
|
If the name cannot be resolved in the cache. |
MultipleResourcesFoundError
|
If the name is ambiguous. |
Source code in src/xovis/api/device/resources/datapush.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
_resolve_connection_id(id_or_name)
async
Resolves a connection ID from either a UUID string, integer, or human-readable name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[str, UUID, int]
|
The ID or name of the connection. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The resolved connection ID string. |
Raises:
| Type | Description |
|---|---|
ResourceNotFoundError
|
If the name cannot be resolved. |
MultipleResourcesFoundError
|
If the name is ambiguous. |
Source code in src/xovis/api/device/resources/datapush.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
_resolve_path()
Resolves the base API path based on the current isolated context.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The resolved API endpoint path. |
Source code in src/xovis/api/device/resources/datapush.py
75 76 77 78 79 80 81 82 83 84 | |
abort_agent_trigger(id_or_name)
async
Aborts a currently running trigger datapush.
Source code in src/xovis/api/device/resources/datapush.py
485 486 487 488 489 | |
create_agent(agent, volatile=False, id_mode='SERVER')
async
Provisions a new DataPush agent telemetry stream.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
DataPushAgent
|
The validated agent configuration to create. |
required |
volatile
|
bool
|
If true, creates a volatile agent in RAM (does not survive reboot). |
False
|
id_mode
|
str
|
The ID assignment mode ('SERVER' or 'CLIENT'). |
'SERVER'
|
Returns:
| Name | Type | Description |
|---|---|---|
DataPushAgent |
DataPushAgent
|
The actively provisioned agent configuration. |
Source code in src/xovis/api/device/resources/datapush.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | |
create_connection(connection, volatile=False, id_mode='SERVER')
async
Provisions a new network target (HTTP, MQTT, TCP, etc.).
Source code in src/xovis/api/device/resources/datapush.py
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 | |
delete_agent(id_or_name)
async
Removes a specific DataPush agent.
Source code in src/xovis/api/device/resources/datapush.py
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
delete_all_agents(volatile=False)
async
Destructively removes all DataPush agents from the context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volatile
|
bool
|
If true, deletes only volatile agents stored in RAM. Defaults to False. |
False
|
Source code in src/xovis/api/device/resources/datapush.py
253 254 255 256 257 258 259 260 261 262 263 | |
delete_all_connections(volatile=False)
async
Destructively removes all connections from the context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volatile
|
bool
|
If true, deletes only volatile connections. Defaults to False. |
False
|
Source code in src/xovis/api/device/resources/datapush.py
534 535 536 537 538 539 540 541 542 543 544 | |
delete_connection(id_or_name)
async
Removes a specific connection.
Source code in src/xovis/api/device/resources/datapush.py
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | |
delete_legacy_config()
async
Deletes legacy conversion settings.
Source code in src/xovis/api/device/resources/datapush.py
643 644 645 646 | |
disable_agent(id_or_name)
async
Disables a specific DataPush agent on a single or multisensor context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[str, UUID, int]
|
The target agent ID or name. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DataPushAgent |
DataPushAgent
|
The updated agent configuration. |
Source code in src/xovis/api/device/resources/datapush.py
353 354 355 356 357 358 359 360 361 362 | |
enable_agent(id_or_name)
async
Enables a specific DataPush agent on a single or multisensor context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[str, UUID, int]
|
The target agent ID or name. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DataPushAgent |
DataPushAgent
|
The updated agent configuration. |
Source code in src/xovis/api/device/resources/datapush.py
342 343 344 345 346 347 348 349 350 351 | |
get_agent(id_or_name)
async
Retrieves the exact configuration of a specific DataPush agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[str, UUID, int]
|
The ID or logical name of the agent. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DataPushAgent |
DataPushAgent
|
The validated agent configuration. |
Source code in src/xovis/api/device/resources/datapush.py
265 266 267 268 269 270 271 272 273 274 275 276 277 | |
get_agent_status(id_or_name)
async
Retrieves the runtime status for a specific DataPush agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[str, UUID, int]
|
The ID or logical name of the target agent. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DataPushStatus |
DataPushStatus
|
The runtime status of the specific agent. |
Source code in src/xovis/api/device/resources/datapush.py
396 397 398 399 400 401 402 403 404 405 406 407 408 409 | |
get_agent_trigger_status(id_or_name)
async
Polls the execution state of an actively running trigger datapush (BUSY or IDLE).
Source code in src/xovis/api/device/resources/datapush.py
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | |
get_agents_status(volatile=False)
async
Retrieves the runtime networking status for all DataPush agents.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volatile
|
bool
|
If true, retrieves status for volatile agents. Defaults to False. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
DataPushStatusCollection |
DataPushStatusCollection
|
Contains transmit speeds, dropped packet counts, and HTTP/MQTT failure codes across the fleet. |
Source code in src/xovis/api/device/resources/datapush.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
get_all_agents(volatile=False)
async
Retrieves all configured DataPush agents from the sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volatile
|
bool
|
If true, returns volatile agents stored in RAM. Defaults to False. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
DataPushAgentCollection |
DataPushAgentCollection
|
A validated collection of agent configurations. |
Source code in src/xovis/api/device/resources/datapush.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
get_all_connections(volatile=False)
async
Retrieves all defined network targets (Connections) for agents.
Source code in src/xovis/api/device/resources/datapush.py
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | |
get_connection(id_or_name)
async
Retrieves a specific connection configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[str, UUID, int]
|
The ID or logical name of the target connection. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DataPushConnection |
DataPushConnection
|
The validated connection configuration. |
Source code in src/xovis/api/device/resources/datapush.py
546 547 548 549 550 551 552 553 554 555 556 557 558 559 | |
get_legacy_config()
async
Retrieves legacy conversion settings for backward-compatible systems.
Source code in src/xovis/api/device/resources/datapush.py
632 633 634 635 | |
patch_agent(id_or_name, updates)
async
Applies a partial update to an existing DataPush agent.
Crucial for autonomous agents modifying specific parameters (e.g., retry logic) without risking overwriting the entire complex payload.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[str, UUID, int]
|
The target agent. |
required |
updates
|
Dict[str, Any]
|
A partial dictionary of modifications. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DataPushAgent |
DataPushAgent
|
The updated agent configuration. |
Source code in src/xovis/api/device/resources/datapush.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
patch_connection(id_or_name, updates)
async
Applies a partial update to an existing connection. Useful for rotating passwords or updating host URIs autonomously.
Source code in src/xovis/api/device/resources/datapush.py
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | |
test_connection(id_or_name)
async
Fires a dummy payload through the connection to verify network egress. Crucial for pre-flight validation by autonomous deployment agents.
Source code in src/xovis/api/device/resources/datapush.py
622 623 624 625 626 627 628 629 | |
trigger_agent_push(id_or_name, trigger_config)
async
Forces the agent to immediately flush or recover data.
Essential for Autonomous Maintenance. If a sensor was offline, an agent can use a 'TIME_RANGE' trigger configuration to datapush the missing edge-cached data up to the downstream processing engine.
NOTE: 'STATUS' and 'RECORDING' agents do not support manual retriggering.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[str, UUID, int]
|
The target agent. |
required |
trigger_config
|
DataPushTriggerConfig
|
Validated Pydantic configuration defining 'ALL', 'LAST_PACKAGE', or 'TIME_RANGE' (with XovisTime) rules. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DataPushTriggerInfo |
DataPushTriggerInfo
|
The active trigger execution status. |
Source code in src/xovis/api/device/resources/datapush.py
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | |
update_agent(id_or_name, agent)
async
Replaces an existing DataPush agent configuration entirely.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[str, UUID, int]
|
The target agent. |
required |
agent
|
DataPushAgent
|
The full updated agent configuration payload. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DataPushAgent |
DataPushAgent
|
The successfully updated agent configuration. |
Source code in src/xovis/api/device/resources/datapush.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | |
update_connection(id_or_name, connection)
async
Replaces an existing connection configuration entirely.
Source code in src/xovis/api/device/resources/datapush.py
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 | |
update_legacy_config(config)
async
Updates legacy conversion settings.
Source code in src/xovis/api/device/resources/datapush.py
637 638 639 640 641 | |
Functions:
_recursive_none_filter(data)
Recursively removes None values from dictionaries and lists.
Source code in src/xovis/api/device/resources/datapush.py
33 34 35 36 37 38 39 | |
xovis.api.device.resources.history
Xovis SDK - History Management Resource
Operates within the Control Plane. Provides the implementation for retrieving historical counting data, start/stop spatial tracking coordinates, and diagnostic memory states from local edge sensors. Critical for Layer 3/4 spatial analytics and Geometry Optimization (Module C).
Attributes
Classes
HistoryManager
Manages historical data retrieval for the single-sensor context.
This manager abstracts the complex time-series databases of the edge sensor. It exposes aggregated logic measurements, start/stop tracking coordinates, spatial heat/height maps, and underlying database diagnostic statuses.
Source code in src/xovis/api/device/resources/history.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
Methods:
__init__(client, target_id=None)
Initializes the HistoryManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
DeviceClient
|
The parent device client instance providing authenticated HTTPX connection pooling. |
required |
target_id
|
Optional[str]
|
The multisensor target ID, if applicable. |
None
|
Source code in src/xovis/api/device/resources/history.py
36 37 38 39 40 41 42 43 44 45 46 47 | |
_resolve_path()
Resolves the base API path based on the current isolated context.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The resolved API endpoint path. |
Source code in src/xovis/api/device/resources/history.py
49 50 51 52 53 54 55 56 57 58 59 | |
clear_sensor_db()
async
Irreversibly deletes all count records and offsets in the sensor database.
CRITICAL: This resets all outputs for logic data. It should only be executed by an agent if explicitly authorized under the CRITICAL safety guardrails.
Returns:
| Type | Description |
|---|---|
None
|
None |
Source code in src/xovis/api/device/resources/history.py
165 166 167 168 169 170 171 172 173 174 175 | |
get_counts(start_time, end_time='now', resolution=0, logic_id=None, time_format=TimeFormat.RFC3339, include_empty=False)
async
Retrieves historical logic counts for a specified time interval.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_time
|
XovisTime
|
Begin of time interval (Unix ms or relative). |
required |
end_time
|
XovisTime
|
End of time interval (Unix ms or relative). Defaults to "now". |
'now'
|
resolution
|
int
|
Aggregation resolution in minutes. Defaults to 0 (AUTO). |
0
|
logic_id
|
Optional[int]
|
If provided, filters the payload to only include data for a specific logic ID, significantly reducing network overhead. |
None
|
time_format
|
TimeFormat
|
The time format for the output data. Defaults to RFC3339. |
RFC3339
|
include_empty
|
bool
|
Whether to include empty bins where data is missing. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
HistoryLogics |
Any
|
Bridge model containing the time-series bins. |
Source code in src/xovis/api/device/resources/history.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
get_heat_map()
async
Retrieves the spatial heat map data array.
Provides the percentage of time each pixel in the tracking area is occupied by an object. Operates on an exponential moving average (24h).
Returns:
| Name | Type | Description |
|---|---|---|
HeatHeightMap |
HeatHeightMap
|
Bridge model containing the 2D floating-point array and mapping metadata. |
Source code in src/xovis/api/device/resources/history.py
137 138 139 140 141 142 143 144 145 146 147 148 149 | |
get_height_map()
async
Retrieves the spatial height map data array.
Provides the average measured height of objects across the tracking area. Highly valuable for diagnosing miscalibrated sensor mounting heights.
Returns:
| Name | Type | Description |
|---|---|---|
HeatHeightMap |
HeatHeightMap
|
Bridge model containing the 2D floating-point array and mapping metadata. |
Source code in src/xovis/api/device/resources/history.py
151 152 153 154 155 156 157 158 159 160 161 162 163 | |
get_start_stop_points(start_time, end_time='now', max_points=1000)
async
Retrieves the 3D coordinates where tracks first appeared and terminated.
Essential for the Geometry Optimization Agent to mathematically detect lines placed too deep or zones missing track intersections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_time
|
XovisTime
|
Begin of time interval (Unix ms or relative). |
required |
end_time
|
XovisTime
|
End of time interval (Unix ms or relative). |
'now'
|
max_points
|
int
|
Maximum number of coordinate points to return. |
1000
|
Returns:
| Name | Type | Description |
|---|---|---|
StartStopPoints |
Any
|
Bridge model containing lists of Start and Stop 3D coordinate vectors. |
Source code in src/xovis/api/device/resources/history.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
get_status()
async
Retrieves the diagnostic status of the historical data storage.
Crucial for Autonomous Maintenance to monitor database capacity, retention times, and ensure the sensor has not stopped persisting data.
Returns:
| Name | Type | Description |
|---|---|---|
HistoryStatus |
HistoryStatus
|
Bridge model containing capacity metrics and stored data limits. |
Source code in src/xovis/api/device/resources/history.py
61 62 63 64 65 66 67 68 69 70 71 72 73 | |
xovis.api.device.resources.scene
Xovis SDK - Scene Management Resource
Operates within the Control Plane. Provides the implementation for managing spatial constraints on local edge sensors, including scene geometries (lines/zones), occlusion masks, layers, objects, and attention areas. Integrates capacity limit queries to prevent autonomous agents from exceeding edge hardware vertex constraints.
Classes
SceneManager
Manages the physical and optical spatial context of a Xovis device.
Orchestrates the creation and modification of Geometries, Masks, Layers, Scene Objects, and Attentions. Exposes hardware vertex and element limits to ensure autonomous generation agents (Module C) remain within safe bounds.
Source code in src/xovis/api/device/resources/scene.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 | |
Attributes
models
property
Returns the strictly validated Pydantic models for the current firmware.
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
The collection of auto-generated Pydantic V2 models synchronized with the current device firmware. |
Methods:
__init__(client, target_id=None)
Initializes the SceneManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
DeviceClient
|
The parent device client instance. |
required |
target_id
|
Optional[str]
|
The multisensor target ID, if applicable. |
None
|
Source code in src/xovis/api/device/resources/scene.py
55 56 57 58 59 60 61 62 63 64 65 | |
_resolve_path()
Resolves the base API path based on the current isolated context.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The resolved API endpoint path. |
Source code in src/xovis/api/device/resources/scene.py
78 79 80 81 82 83 84 85 86 87 | |
_resolve_resource_id(resource_type, id_or_name)
async
Generic resolver for translating human-readable names to integer IDs by inspecting the persistent HostStateBucket cache.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_type
|
str
|
The collection name in the cache (e.g., 'zones', 'masks'). |
required |
id_or_name
|
Union[int, str]
|
The ID or name to resolve. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The resolved exact integer ID. |
Raises:
| Type | Description |
|---|---|
ResourceNotFoundError
|
If the name is missing from the cache. |
MultipleResourcesFoundError
|
If the name is ambiguous. |
Source code in src/xovis/api/device/resources/scene.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
create_attention(attention, id_mode='SERVER')
async
Creates a new Attention area for measuring subject engagement.
Source code in src/xovis/api/device/resources/scene.py
455 456 457 458 459 460 | |
create_geometry(geometry, id_mode='SERVER')
async
Provisions a new physical tracking geometry (line or polygon).
Source code in src/xovis/api/device/resources/scene.py
185 186 187 188 189 | |
create_layer(layer, id_mode='SERVER')
async
Provisions a new logical scene layer.
Source code in src/xovis/api/device/resources/scene.py
317 318 319 320 321 322 | |
create_mask(mask, id_mode='SERVER')
async
Creates a new exclusion or illumination mask.
Source code in src/xovis/api/device/resources/scene.py
250 251 252 253 254 255 | |
create_object(scene_object, id_mode='SERVER')
async
Creates a new Scene Object for physical environment tracking.
Source code in src/xovis/api/device/resources/scene.py
384 385 386 387 388 389 | |
delete_all_attentions()
async
Destructively removes all configured Attention areas.
Source code in src/xovis/api/device/resources/scene.py
488 489 490 | |
delete_all_geometries()
async
Destructively removes all scene geometries.
Source code in src/xovis/api/device/resources/scene.py
216 217 218 | |
delete_all_layers()
async
Destructively removes all scene layers.
Source code in src/xovis/api/device/resources/scene.py
350 351 352 | |
delete_all_masks()
async
Destructively removes all scene masks.
Source code in src/xovis/api/device/resources/scene.py
283 284 285 | |
delete_all_objects()
async
Destructively removes all Scene Objects.
Source code in src/xovis/api/device/resources/scene.py
417 418 419 | |
delete_attention(id_or_name)
async
Deletes a specific Attention area.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the area to delete. |
required |
Source code in src/xovis/api/device/resources/scene.py
478 479 480 481 482 483 484 485 486 | |
delete_geometry(id_or_name)
async
Removes a specific scene geometry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the geometry to delete. |
required |
Source code in src/xovis/api/device/resources/scene.py
206 207 208 209 210 211 212 213 214 | |
delete_layer(id_or_name)
async
Deletes a specific scene layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the layer to delete. |
required |
Source code in src/xovis/api/device/resources/scene.py
340 341 342 343 344 345 346 347 348 | |
delete_mask(id_or_name)
async
Deletes a specific exclusion mask.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the mask to delete. |
required |
Source code in src/xovis/api/device/resources/scene.py
273 274 275 276 277 278 279 280 281 | |
delete_object(id_or_name)
async
Deletes a specific Scene Object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the object to delete. |
required |
Source code in src/xovis/api/device/resources/scene.py
407 408 409 410 411 412 413 414 415 | |
get_all_attentions(layer_id=None)
async
Retrieves all configured Attention areas, optionally filtered by layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layer_id
|
Optional[int]
|
Filter by a specific layer ID. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Attentions |
Attentions
|
A collection of matching attention area configurations. |
Source code in src/xovis/api/device/resources/scene.py
427 428 429 430 431 432 433 434 435 436 437 438 439 | |
get_all_geometries(layer_id=None)
async
Retrieves all active lines and zones, optionally filtered by layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layer_id
|
Optional[int]
|
If provided, only returns geometries associated with this specific layer ID. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
SceneGeometries |
SceneGeometries
|
A collection of all matching lines and zones. |
Source code in src/xovis/api/device/resources/scene.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
get_all_layers()
async
Retrieves all scene layers (virtual sub-contexts).
Returns:
| Name | Type | Description |
|---|---|---|
Layers |
Layers
|
A collection of all defined layers. |
Source code in src/xovis/api/device/resources/scene.py
293 294 295 296 297 298 299 300 301 | |
get_all_masks()
async
Retrieves all exclusion and illumination masks.
Returns:
| Name | Type | Description |
|---|---|---|
AllSceneMasks |
AllSceneMasks
|
A collection of all configured masks. |
Source code in src/xovis/api/device/resources/scene.py
226 227 228 229 230 231 232 233 234 | |
get_all_objects()
async
Retrieves all physical Scene Objects (e.g., tables, barriers).
Returns:
| Name | Type | Description |
|---|---|---|
SceneObjects |
SceneObjects
|
A collection of all configured scene objects. |
Source code in src/xovis/api/device/resources/scene.py
360 361 362 363 364 365 366 367 368 | |
get_attention(id_or_name)
async
Retrieves a specific Attention area.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the target area. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Attention |
Attention
|
The validated attention area configuration. |
Source code in src/xovis/api/device/resources/scene.py
441 442 443 444 445 446 447 448 449 450 451 452 453 | |
get_attention_limits()
async
Retrieves the maximum allowed Attention areas for the device.
Source code in src/xovis/api/device/resources/scene.py
422 423 424 425 | |
get_geometry(id_or_name)
async
Retrieves a specific scene geometry configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or logical name of the geometry. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SceneGeometry |
SceneGeometry
|
The validated scene geometry configuration. |
Source code in src/xovis/api/device/resources/scene.py
171 172 173 174 175 176 177 178 179 180 181 182 183 | |
get_geometry_limits()
async
Retrieves the maximum allowed geometries and total vertices for the device.
Source code in src/xovis/api/device/resources/scene.py
151 152 153 154 | |
get_layer(id_or_name)
async
Retrieves a specific scene layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the target layer. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Layer |
Layer
|
The validated layer configuration. |
Source code in src/xovis/api/device/resources/scene.py
303 304 305 306 307 308 309 310 311 312 313 314 315 | |
get_layer_limits()
async
Retrieves the maximum allowed layers and constraints for the device.
Source code in src/xovis/api/device/resources/scene.py
288 289 290 291 | |
get_mask(id_or_name)
async
Retrieves a specific exclusion mask.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the target mask. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SceneMask |
SceneMask
|
The validated mask configuration. |
Source code in src/xovis/api/device/resources/scene.py
236 237 238 239 240 241 242 243 244 245 246 247 248 | |
get_mask_limits()
async
Retrieves the maximum allowed masks and vertices for the device.
Source code in src/xovis/api/device/resources/scene.py
221 222 223 224 | |
get_object(id_or_name)
async
Retrieves a specific Scene Object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the target object. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SceneObject |
SceneObject
|
The validated scene object configuration. |
Source code in src/xovis/api/device/resources/scene.py
370 371 372 373 374 375 376 377 378 379 380 381 382 | |
get_object_limits()
async
Retrieves the maximum allowed scene objects and vertices for the device.
Source code in src/xovis/api/device/resources/scene.py
355 356 357 358 | |
update_attention(id_or_name, attention)
async
Updates an existing Attention area.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the target area. |
required |
attention
|
Attention
|
The updated attention area configuration. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Attention |
Attention
|
The successfully updated attention area. |
Source code in src/xovis/api/device/resources/scene.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 | |
update_geometry(id_or_name, geometry)
async
Replaces an existing scene geometry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the target geometry. |
required |
geometry
|
SceneGeometry
|
The full updated geometry configuration. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SceneGeometry |
SceneGeometry
|
The successfully updated geometry. |
Source code in src/xovis/api/device/resources/scene.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 | |
update_layer(id_or_name, layer)
async
Updates an existing scene layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the target layer. |
required |
layer
|
Layer
|
The updated layer configuration. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Layer |
Layer
|
The successfully updated layer. |
Source code in src/xovis/api/device/resources/scene.py
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
update_mask(id_or_name, mask)
async
Updates an existing mask.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the target mask. |
required |
mask
|
SceneMask
|
The updated mask configuration. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SceneMask |
SceneMask
|
The successfully updated mask. |
Source code in src/xovis/api/device/resources/scene.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
update_object(id_or_name, scene_object)
async
Updates an existing Scene Object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_or_name
|
Union[int, str]
|
The ID or name of the target object. |
required |
scene_object
|
SceneObject
|
The updated object configuration. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SceneObject |
SceneObject
|
The successfully updated object. |
Source code in src/xovis/api/device/resources/scene.py
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | |
Functions:
_recursive_none_filter(data)
Recursively removes None values from dictionaries and lists.
Source code in src/xovis/api/device/resources/scene.py
37 38 39 40 41 42 43 | |
xovis.api.device.resources.system
Xovis SDK - System Management Resource
Operates within the Control Plane. Provides the implementation for managing device-level system operations, including hardware identification, diagnostic log retrieval, configuration backups, and destructive lifecycle commands. Critical for Autonomous Fleet Maintenance (Module D).
Classes
SystemManager
Manages core system operations, diagnostics, and lifecycle states on a Xovis device.
This manager acts as the primary interface for hardware-level orchestration, enabling agents to pull plaintext logs, manage configuration backups, update physical metadata (Name/Group), and execute critical state resets.
Source code in src/xovis/api/device/resources/system.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | |
Attributes
models
property
Returns the strictly validated Pydantic models for the current firmware.
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
The collection of auto-generated Pydantic V2 models synchronized with the current device firmware. |
Methods:
__init__(http_client, client=None, target_id=None)
Initializes the SystemManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
http_client
|
XovisHTTPClient
|
The resilient HTTP client. |
required |
client
|
Optional[DeviceClient]
|
The parent DeviceClient instance. |
None
|
target_id
|
Optional[str]
|
The multisensor target ID, if applicable. |
None
|
Source code in src/xovis/api/device/resources/system.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
_resolve_singlesensor_path()
Resolves the singlesensor/multisensor status path based on context.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The resolved API path for status and identity operations. |
Source code in src/xovis/api/device/resources/system.py
62 63 64 65 66 67 68 69 70 71 | |
download_backup()
async
Downloads the encrypted backup archive of the sensor configuration.
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The binary archive payload. |
Source code in src/xovis/api/device/resources/system.py
217 218 219 220 221 222 223 224 225 226 | |
format_flash()
async
CRITICAL: Formats the internal flash storage. Deletes data, configs, and parts of the firmware. The sensor will reboot into rescue mode and require a manual firmware reinstall.
Source code in src/xovis/api/device/resources/system.py
299 300 301 302 303 304 305 | |
get_backup_state()
async
Retrieves the state of the current configuration backup process.
Returns:
| Name | Type | Description |
|---|---|---|
DiagBundleState |
Any
|
The current generation state (e.g., IN_PROGRESS, AVAILABLE). |
Source code in src/xovis/api/device/resources/system.py
207 208 209 210 211 212 213 214 215 | |
get_device_identity()
async
Retrieves the configured logical Name and Group of the physical sensor.
Returns:
| Name | Type | Description |
|---|---|---|
DeviceId |
Any
|
The logical identifier metadata of the device. |
Source code in src/xovis/api/device/resources/system.py
153 154 155 156 157 158 159 160 161 | |
get_info()
async
Retrieves static hardware and identity metadata from the sensor.
Returns:
| Name | Type | Description |
|---|---|---|
DeviceInfo |
Any
|
The sensor's hardware, revisions, and firmware details. |
Source code in src/xovis/api/device/resources/system.py
73 74 75 76 77 78 79 80 81 82 83 84 | |
get_led()
async
Retrieves the current physical LED configuration.
Returns:
| Name | Type | Description |
|---|---|---|
DeviceLedMode |
Any
|
The current LED mode indicator. |
Source code in src/xovis/api/device/resources/system.py
243 244 245 246 247 248 249 250 251 252 253 254 | |
get_license()
async
Retrieves the active/expired states of premium features.
Returns:
| Type | Description |
|---|---|
Any
|
Dict[str, Any]: A mapping of feature IDs to their current license state. |
Source code in src/xovis/api/device/resources/system.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
get_license_details()
async
Retrieves the detailed active, expired, and test states of premium features.
Returns:
| Name | Type | Description |
|---|---|---|
LicenseStatusDetailed |
Any
|
The comprehensive license status map. |
Source code in src/xovis/api/device/resources/system.py
188 189 190 191 192 193 194 195 196 | |
get_light_settings()
async
Retrieves the current light frequency and power frequency settings.
Returns:
| Name | Type | Description |
|---|---|---|
LightSettings |
Any
|
The current light settings configuration. |
Source code in src/xovis/api/device/resources/system.py
113 114 115 116 117 118 119 120 121 | |
get_logs()
async
Retrieves the raw device user logfile in plaintext.
Crucial for Autonomous Maintenance agents to parse root-cause failures (e.g., token synchronization errors, connection timeouts).
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The raw plaintext log stream. |
Source code in src/xovis/api/device/resources/system.py
174 175 176 177 178 179 180 181 182 183 184 185 186 | |
get_state()
async
Retrieves the real-time device health, temperatures, and uptime.
Returns:
| Name | Type | Description |
|---|---|---|
DeviceState |
Any
|
The current operational state and thermal metrics. |
Source code in src/xovis/api/device/resources/system.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
get_status()
async
Retrieves the operational status of the sensor (illumination, tilt, etc.).
Returns:
| Name | Type | Description |
|---|---|---|
SinglesensorStatus |
Any
|
The current operational status. |
Source code in src/xovis/api/device/resources/system.py
103 104 105 106 107 108 109 110 111 | |
hard_reset(smk)
async
CRITICAL: Triggers a complete Factory Hard Reset. Deletes all data, configurations, and network settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
smk
|
str
|
The Sensor Master Key required to authorize the wipe. |
required |
Source code in src/xovis/api/device/resources/system.py
288 289 290 291 292 293 294 295 296 297 | |
reboot()
async
Triggers a standard hardware reboot. Causes a temporary gap in counting and API accessibility.
Source code in src/xovis/api/device/resources/system.py
265 266 267 268 269 270 | |
reboot_rescue()
async
CRITICAL: Triggers a reboot into Rescue Mode. Halts the standard API and counting logic entirely. Requires human intervention or rescue-API firmware flashing to recover.
Source code in src/xovis/api/device/resources/system.py
272 273 274 275 276 277 278 | |
reset()
async
CRITICAL: Triggers a Scene and Data Reset. Wipes all geometries, logic configurations, and historical databases. Network and User configurations are preserved. Device will reboot.
Source code in src/xovis/api/device/resources/system.py
280 281 282 283 284 285 286 | |
restore_backup(backup_binary, ip_handling='check')
async
Restores the sensor configuration from a binary backup file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backup_binary
|
bytes
|
The raw binary archive to restore. |
required |
ip_handling
|
str
|
How to handle IP config mismatches. Options: 'check' (fail if mismatch), 'keep' (retain current IP), 'overwrite' (apply IP from backup). Defaults to 'check'. |
'check'
|
Source code in src/xovis/api/device/resources/system.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 | |
trigger_backup()
async
Triggers an asynchronous backup of the sensor configuration.
This is a non-blocking request. The agent must subsequently poll
get_backup_state() to verify completion before downloading.
Source code in src/xovis/api/device/resources/system.py
198 199 200 201 202 203 204 205 | |
update_device_identity(name, group)
async
Updates the logical Name and Group of the physical sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The new human-readable name of the sensor. |
required |
group
|
str
|
The logical group assignment. |
required |
Source code in src/xovis/api/device/resources/system.py
163 164 165 166 167 168 169 170 171 172 | |
update_led(led_mode)
async
Updates the physical LED configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
led_mode
|
DeviceLedMode
|
The new LED configuration payload. |
required |
Source code in src/xovis/api/device/resources/system.py
256 257 258 259 260 261 262 263 | |
update_light_settings(settings)
async
Updates the light frequency and power frequency settings. Essential for fixing horizontal barring when light and power frequencies mismatch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
LightSettings
|
The new light settings payload. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
LightSettings |
Any
|
The updated light settings from the sensor. |
Source code in src/xovis/api/device/resources/system.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
xovis.api.device.resources.network
Xovis SDK - Network Management Resource
Operates within the Control Plane. Provides comprehensive implementation for managing edge sensor networking, including IPv4/IPv6, Remote Tunnels (Cloud Hub), 802.1X (EAPoL) Enterprise Security, X.509 Truststores, and advanced Wireless scanning.
Classes
NetworkManager
Manages physical and logical network configurations on a Xovis device.
Provides deep orchestration capabilities for Autonomous Maintenance (Module D), allowing agents to rebuild dropped Cloud Hub tunnels, rotate expiring X.509 certificates, probe local Wi-Fi environments, and manage 802.1X authentication.
Source code in src/xovis/api/device/resources/network.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | |
Attributes
models
property
Returns the strictly validated Pydantic models for the current firmware.
Methods:
__init__(http_client, client=None)
Initializes the NetworkManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
http_client
|
XovisHTTPClient
|
The resilient HTTP client. |
required |
client
|
Optional[DeviceClient]
|
The parent DeviceClient instance. |
None
|
Source code in src/xovis/api/device/resources/network.py
28 29 30 31 32 33 34 35 36 37 38 | |
create_remote(remote)
async
Creates a new remote connection (e.g., establishing a new Hub Tunnel). Automatically starts the connection upon creation.
Source code in src/xovis/api/device/resources/network.py
113 114 115 116 117 118 119 120 121 122 | |
create_remote_from_config(config)
async
Creates a new remote connection using a base64-encoded configuration payload.
Source code in src/xovis/api/device/resources/network.py
124 125 126 127 128 129 130 | |
create_wireless_network(network)
async
Adds a new wireless network profile.
Source code in src/xovis/api/device/resources/network.py
295 296 297 298 | |
delete_all_wireless_networks()
async
Removes all configured wireless network profiles.
Source code in src/xovis/api/device/resources/network.py
300 301 302 303 | |
delete_eapol_keystore()
async
Removes the X.509 client identity from the EAPoL Supplicant.
Source code in src/xovis/api/device/resources/network.py
230 231 232 | |
delete_remote(remote_id)
async
BLOCKED: Deletes a remote connection, severing the management tunnel.
Source code in src/xovis/api/device/resources/network.py
149 150 151 | |
delete_truststore_cert(fingerprint)
async
Removes a specific X.509 certificate from the truststore.
Source code in src/xovis/api/device/resources/network.py
265 266 267 | |
delete_wireless_network(network_id)
async
Removes a specific wireless network profile.
Source code in src/xovis/api/device/resources/network.py
315 316 317 318 | |
get_all_remotes()
async
Retrieves configurations for all defined remote connections (Cloud Tunnels).
Source code in src/xovis/api/device/resources/network.py
101 102 103 104 105 106 107 108 109 110 111 | |
get_all_remotes_state()
async
Retrieves the connectivity status for all remote tunnels.
Source code in src/xovis/api/device/resources/network.py
153 154 155 156 | |
get_eapol_config()
async
Retrieves the 802.1X EAPoL Supplicant configuration.
Source code in src/xovis/api/device/resources/network.py
194 195 196 197 | |
get_eapol_keystore()
async
Retrieves the configured X.509 client identity for 802.1X.
Source code in src/xovis/api/device/resources/network.py
214 215 216 217 218 219 | |
get_eapol_state()
async
Retrieves the authentication state of the 802.1X Supplicant.
Source code in src/xovis/api/device/resources/network.py
209 210 211 212 | |
get_gigabit()
async
Retrieves the Gigabit Ethernet enablement capability.
Source code in src/xovis/api/device/resources/network.py
64 65 66 67 | |
get_hostname()
async
Retrieves the current hostname configuration.
Source code in src/xovis/api/device/resources/network.py
51 52 53 54 | |
get_ipv4()
async
Retrieves the current IPv4 network configuration (Static/DHCP).
Source code in src/xovis/api/device/resources/network.py
74 75 76 77 | |
get_ipv6()
async
Retrieves the current IPv6 network configuration.
Source code in src/xovis/api/device/resources/network.py
87 88 89 90 | |
get_mdns_config()
async
Retrieves the mDNS (Multicast DNS) configuration.
Source code in src/xovis/api/device/resources/network.py
352 353 354 355 | |
get_mdns_state()
async
Retrieves the currently discovered mDNS services in the local network.
Source code in src/xovis/api/device/resources/network.py
361 362 363 364 | |
get_pip_config()
async
Retrieves the Xovis PIP (Product Improvement Program) configuration.
Source code in src/xovis/api/device/resources/network.py
367 368 369 370 | |
get_pip_state()
async
Retrieves the state and quota usage of the Xovis PIP service.
Source code in src/xovis/api/device/resources/network.py
376 377 378 379 | |
get_proxy()
async
Retrieves the current network proxy configuration.
Source code in src/xovis/api/device/resources/network.py
339 340 341 342 | |
get_remote(remote_id)
async
Retrieves a specific remote connection configuration.
Source code in src/xovis/api/device/resources/network.py
132 133 134 135 136 137 138 | |
get_remote_services_config()
async
Retrieves the overarching configuration for Xovis Remote Services (IoT).
Source code in src/xovis/api/device/resources/network.py
174 175 176 177 | |
get_remote_services_state()
async
Retrieves the connectivity status of Xovis Remote Services.
Source code in src/xovis/api/device/resources/network.py
188 189 190 191 | |
get_remote_state(remote_id)
async
Retrieves the connectivity status of a specific remote tunnel.
Source code in src/xovis/api/device/resources/network.py
158 159 160 161 | |
get_state()
async
Retrieves the comprehensive operational state of all network interfaces.
Source code in src/xovis/api/device/resources/network.py
46 47 48 49 | |
get_truststore_cert(fingerprint)
async
Retrieves details of a specific X.509 certificate by its SHA-1 fingerprint.
Source code in src/xovis/api/device/resources/network.py
260 261 262 263 | |
get_truststore_certs()
async
Retrieves all installed X.509 certificates in the truststore.
Source code in src/xovis/api/device/resources/network.py
235 236 237 238 | |
get_truststore_config()
async
Retrieves the truststore configuration (e.g., use defaults).
Source code in src/xovis/api/device/resources/network.py
250 251 252 253 | |
get_wireless()
async
Retrieves the global wireless networking configuration.
Source code in src/xovis/api/device/resources/network.py
270 271 272 273 | |
get_wireless_network(network_id)
async
Retrieves a specific wireless network profile.
Source code in src/xovis/api/device/resources/network.py
305 306 307 308 | |
get_wireless_networks()
async
Retrieves all configured wireless network profiles.
Source code in src/xovis/api/device/resources/network.py
290 291 292 293 | |
get_wireless_scan_results()
async
Retrieves the results of the latest wireless network scan.
Source code in src/xovis/api/device/resources/network.py
333 334 335 336 | |
get_wireless_state()
async
Retrieves the current state and connection metrics of wireless networking.
Source code in src/xovis/api/device/resources/network.py
285 286 287 288 | |
get_wireless_test_result(network_id)
async
Retrieves the result of a wireless connection test.
Source code in src/xovis/api/device/resources/network.py
324 325 326 327 | |
get_xovis_support_state()
async
Retrieves the state of the Xovis Tier 3 Support Remote Connection.
Source code in src/xovis/api/device/resources/network.py
164 165 166 167 | |
install_truststore_cert(cert_binary)
async
Installs a new X.509 certificate to the truststore.
Source code in src/xovis/api/device/resources/network.py
240 241 242 243 244 | |
reset_eapol_config()
async
CRITICAL: Resets 802.1X configuration to factory defaults.
Source code in src/xovis/api/device/resources/network.py
204 205 206 207 | |
reset_hostname()
async
Resets the hostname to the factory default (XS-SENSOR-[MAC]).
Source code in src/xovis/api/device/resources/network.py
60 61 62 | |
reset_ipv4()
async
CRITICAL: Resets IPv4 to factory defaults (DHCP enabled).
Source code in src/xovis/api/device/resources/network.py
83 84 85 | |
reset_ipv6()
async
CRITICAL: Resets IPv6 to factory defaults (Disabled).
Source code in src/xovis/api/device/resources/network.py
96 97 98 | |
reset_pip_quota()
async
Resets the monthly used PIP quota.
Source code in src/xovis/api/device/resources/network.py
381 382 383 | |
reset_proxy()
async
Deletes the current proxy configuration.
Source code in src/xovis/api/device/resources/network.py
348 349 350 | |
reset_remote_services_config()
async
Resets the Xovis Remote Services configuration.
Source code in src/xovis/api/device/resources/network.py
184 185 186 | |
reset_truststore()
async
Resets the truststore to factory default certificates.
Source code in src/xovis/api/device/resources/network.py
246 247 248 | |
reset_wireless()
async
Resets global wireless networking configuration to factory defaults.
Source code in src/xovis/api/device/resources/network.py
280 281 282 283 | |
test_wireless_network(network_id)
async
Triggers a connection test for a specific wireless profile.
Source code in src/xovis/api/device/resources/network.py
320 321 322 | |
trigger_wireless_scan()
async
Triggers an active scan for nearby IEEE 802.11 Access Points.
Source code in src/xovis/api/device/resources/network.py
329 330 331 | |
update_eapol_config(config)
async
CRITICAL: Updates 802.1X configuration. May cause network drops.
Source code in src/xovis/api/device/resources/network.py
199 200 201 202 | |
update_eapol_keystore(pem_binary)
async
Uploads a new X.509 client identity (Certificate + RSA Key). Must be formatted as PEM. Uses strict binary streaming.
Source code in src/xovis/api/device/resources/network.py
221 222 223 224 225 226 227 228 | |
update_gigabit(gigabit)
async
Enables or disables Gigabit Ethernet capability.
Source code in src/xovis/api/device/resources/network.py
69 70 71 | |
update_hostname(hostname)
async
Updates the sensor's logical hostname.
Source code in src/xovis/api/device/resources/network.py
56 57 58 | |
update_ipv4(settings)
async
CRITICAL: Updates IPv4 configuration. May sever active connections.
Source code in src/xovis/api/device/resources/network.py
79 80 81 | |
update_ipv6(settings)
async
CRITICAL: Updates IPv6 configuration.
Source code in src/xovis/api/device/resources/network.py
92 93 94 | |
update_mdns_config(config)
async
Updates the mDNS configuration.
Source code in src/xovis/api/device/resources/network.py
357 358 359 | |
update_pip_config(settings)
async
Updates the Xovis PIP configuration.
Source code in src/xovis/api/device/resources/network.py
372 373 374 | |
update_proxy(proxy)
async
Updates the network proxy configuration.
Source code in src/xovis/api/device/resources/network.py
344 345 346 | |
update_remote(remote_id, remote)
async
Updates an existing remote connection.
Source code in src/xovis/api/device/resources/network.py
140 141 142 143 144 145 146 147 | |
update_remote_services_config(settings)
async
Updates the Xovis Remote Services configuration.
Source code in src/xovis/api/device/resources/network.py
179 180 181 182 | |
update_truststore_config(config)
async
Updates the truststore configuration.
Source code in src/xovis/api/device/resources/network.py
255 256 257 258 | |
update_wireless(settings)
async
Updates the global wireless networking configuration.
Source code in src/xovis/api/device/resources/network.py
275 276 277 278 | |
update_wireless_network(network_id, network)
async
Updates a specific wireless network profile.
Source code in src/xovis/api/device/resources/network.py
310 311 312 313 | |
update_xovis_support(ctrl)
async
Controls the enablement of the Xovis Support Remote Connection.
Source code in src/xovis/api/device/resources/network.py
169 170 171 172 | |
xovis.api.device.resources.privacy
Xovis SDK - Privacy Management Resource
Provides the implementation for managing logical privacy modes and RF-based (Wi-Fi/Bluetooth) monitoring configurations on local edge sensors. Operates within the Control Plane.
Classes
PrivacyManager
Manages privacy modes and RF monitoring settings on a Xovis device.
This manager provides control over the sensor's privacy levels (e.g., blurring, counting only) and the anonymization of detected Wi-Fi/Bluetooth devices.
Source code in src/xovis/api/device/resources/privacy.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
Attributes
models
property
Returns the appropriate Pydantic models for the current device firmware.
Methods:
__init__(http_client, client=None, target_id=None)
Initializes the PrivacyManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
http_client
|
XovisHTTPClient
|
The resilient HTTP client. |
required |
client
|
DeviceClient
|
The parent DeviceClient instance. |
None
|
target_id
|
Optional[str]
|
The multisensor target ID, if applicable. |
None
|
Source code in src/xovis/api/device/resources/privacy.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
_resolve_mode_path()
Resolves the base API path for privacy modes.
Source code in src/xovis/api/device/resources/privacy.py
50 51 52 53 54 | |
_resolve_rf_path()
Resolves the base API path for RF privacy.
Source code in src/xovis/api/device/resources/privacy.py
56 57 58 59 60 | |
get_bluetooth()
async
Retrieves the current Bluetooth monitoring configuration.
Returns:
| Name | Type | Description |
|---|---|---|
BluetoothSettings |
Any
|
The current Bluetooth settings. |
Source code in src/xovis/api/device/resources/privacy.py
159 160 161 162 163 164 165 166 167 | |
get_devices()
async
Retrieves the list of devices detected in the last 5 seconds.
Returns:
| Name | Type | Description |
|---|---|---|
DeviceIdList |
Any
|
A list of detected device identifiers. |
Source code in src/xovis/api/device/resources/privacy.py
227 228 229 230 231 232 233 234 235 | |
get_devices_summary()
async
Retrieves a human-readable summary of devices detected in the last 5 seconds.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
A formatted list of detected devices. |
Source code in src/xovis/api/device/resources/privacy.py
237 238 239 240 241 242 243 244 245 | |
get_privacy_mode()
async
Retrieves the current logical privacy mode.
Returns:
| Name | Type | Description |
|---|---|---|
PrivacyMode |
Any
|
The current privacy mode settings. |
Source code in src/xovis/api/device/resources/privacy.py
63 64 65 66 67 68 69 70 71 72 | |
get_rf_privacy()
async
Retrieves the current RF privacy (hashing/anonymization) configuration.
Returns:
| Name | Type | Description |
|---|---|---|
PrivacySettings |
Any
|
The current RF privacy settings. |
Source code in src/xovis/api/device/resources/privacy.py
92 93 94 95 96 97 98 99 100 | |
get_rf_salt()
async
Retrieves the current hashing salt used for RF anonymization.
Returns:
| Name | Type | Description |
|---|---|---|
PrivacySaltSettings |
Any
|
The current hashing salt. |
Source code in src/xovis/api/device/resources/privacy.py
125 126 127 128 129 130 131 132 133 | |
get_wifi()
async
Retrieves the current Wi-Fi monitoring configuration.
Returns:
| Name | Type | Description |
|---|---|---|
WifiSettings |
Any
|
The current Wi-Fi settings. |
Source code in src/xovis/api/device/resources/privacy.py
193 194 195 196 197 198 199 200 201 | |
reset_bluetooth()
async
Resets the Bluetooth monitoring configuration to factory defaults.
Returns:
| Name | Type | Description |
|---|---|---|
BluetoothSettings |
Any
|
The default Bluetooth settings. |
Source code in src/xovis/api/device/resources/privacy.py
182 183 184 185 186 187 188 189 190 | |
reset_privacy_mode()
async
Resets the privacy mode to factory defaults.
Source code in src/xovis/api/device/resources/privacy.py
87 88 89 | |
reset_rf_privacy()
async
Resets the RF privacy configuration to factory defaults.
Returns:
| Name | Type | Description |
|---|---|---|
PrivacySettings |
Any
|
The default RF privacy settings. |
Source code in src/xovis/api/device/resources/privacy.py
115 116 117 118 119 120 121 122 123 | |
reset_rf_salt()
async
Resets the RF salt, triggering the generation of a new random salt.
Returns:
| Name | Type | Description |
|---|---|---|
PrivacySaltSettings |
Any
|
The newly generated salt settings. |
Source code in src/xovis/api/device/resources/privacy.py
148 149 150 151 152 153 154 155 156 | |
reset_wifi()
async
Resets the Wi-Fi monitoring configuration to factory defaults.
Returns:
| Name | Type | Description |
|---|---|---|
WifiSettings |
Any
|
The default Wi-Fi settings. |
Source code in src/xovis/api/device/resources/privacy.py
216 217 218 219 220 221 222 223 224 | |
update_bluetooth(settings)
async
Updates the Bluetooth monitoring configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
BluetoothSettings
|
The new Bluetooth configuration. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
BluetoothSettings |
Any
|
The updated Bluetooth settings. |
Source code in src/xovis/api/device/resources/privacy.py
169 170 171 172 173 174 175 176 177 178 179 180 | |
update_privacy_mode(mode)
async
Updates the sensor's privacy mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
PrivacyMode
|
The new privacy mode configuration. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PrivacyMode |
Any
|
The updated privacy mode settings. |
Source code in src/xovis/api/device/resources/privacy.py
74 75 76 77 78 79 80 81 82 83 84 85 | |
update_rf_privacy(settings)
async
Updates the RF privacy configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
PrivacySettings
|
The new RF privacy settings. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PrivacySettings |
Any
|
The updated RF privacy settings. |
Source code in src/xovis/api/device/resources/privacy.py
102 103 104 105 106 107 108 109 110 111 112 113 | |
update_rf_salt(settings)
async
Updates the hashing salt for RF anonymization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
PrivacySaltSettings
|
The new hashing salt. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PrivacySaltSettings |
Any
|
The updated hashing salt. |
Source code in src/xovis/api/device/resources/privacy.py
135 136 137 138 139 140 141 142 143 144 145 146 | |
update_wifi(settings)
async
Updates the Wi-Fi monitoring configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
WifiSettings
|
The new Wi-Fi configuration. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
WifiSettings |
Any
|
The updated Wi-Fi settings. |
Source code in src/xovis/api/device/resources/privacy.py
203 204 205 206 207 208 209 210 211 212 213 214 | |
xovis.api.device.resources.itxpt
Xovis SDK - ITxPT Management Resource
Operates within the Control Plane. Provides comprehensive implementation for managing Information Technology for Public Transport (ITxPT) configurations. Orchestrates Automatic Passenger Counting (APC) doors, Time Discovery (SNTP), mDNS TXT broadcasts, and extracts raw inventory/APC telemetry directly from the edge sensor.
Classes
ITxPTManager
Manages ITxPT configurations, networking discovery, and APC doors.
This manager orchestrates public transport services on the sensor. It allows autonomous agents to diagnose vehicle time synchronization (SNTP), configure mDNS broadcasts, and fetch real-time passenger counts directly from the ITxPT service endpoints.
Source code in src/xovis/api/device/resources/itxpt.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
Attributes
models
property
Returns the strictly validated Pydantic models for the current firmware.
Methods:
__init__(http_client, client=None)
Initializes the ITxPTManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
http_client
|
XovisHTTPClient
|
The resilient HTTP client. |
required |
client
|
DeviceClient
|
The parent DeviceClient instance. |
None
|
Source code in src/xovis/api/device/resources/itxpt.py
30 31 32 33 34 35 36 37 38 39 40 | |
create_door(door)
async
Creates a new ITxPT APC door configuration.
Source code in src/xovis/api/device/resources/itxpt.py
135 136 137 138 | |
delete_all_doors()
async
Deletes all existing ITxPT APC door configurations.
Source code in src/xovis/api/device/resources/itxpt.py
140 141 142 | |
delete_door(door_id)
async
Deletes a specific APC door configuration.
Source code in src/xovis/api/device/resources/itxpt.py
154 155 156 | |
get_all_doors()
async
Retrieves all defined ITxPT APC door configurations.
Source code in src/xovis/api/device/resources/itxpt.py
130 131 132 133 | |
get_apc_data()
async
Retrieves the raw PassengerDoorCountDelivery telemetry directly from the ITxPT APC service endpoint.
Note: The return format is XML/dictated by ITxPT standards. Pydantic validation relies on the translated JSON schema.
Source code in src/xovis/api/device/resources/itxpt.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
get_config()
async
Retrieves the global ITxPT configuration (e.g., protocol version, vehicle ID source).
Source code in src/xovis/api/device/resources/itxpt.py
48 49 50 51 52 53 | |
get_custom_configurations()
async
Retrieves custom free text configurations specific to ITxPT deployments.
Source code in src/xovis/api/device/resources/itxpt.py
116 117 118 119 120 121 | |
get_door(door_id)
async
Retrieves a specific APC door configuration.
Source code in src/xovis/api/device/resources/itxpt.py
144 145 146 147 | |
get_inventory_info()
async
Retrieves the raw ModuleDelivery inventory telemetry (Hardware/Services info) directly from the ITxPT inventory service endpoint.
Source code in src/xovis/api/device/resources/itxpt.py
177 178 179 180 181 182 183 184 185 186 187 | |
get_services_state()
async
Retrieves the runtime networking state of all ITxPT sub-services, including current consumers subscribed to the APC feed.
Source code in src/xovis/api/device/resources/itxpt.py
69 70 71 72 73 74 75 | |
get_state()
async
Retrieves the current ITxPT operational state and resolved Vehicle ID.
Source code in src/xovis/api/device/resources/itxpt.py
62 63 64 65 66 67 | |
get_time_config()
async
Retrieves the ITxPT time discovery configuration (SNTP enable toggle).
Source code in src/xovis/api/device/resources/itxpt.py
78 79 80 81 82 83 | |
get_time_status()
async
Retrieves the runtime status of the vehicle time discovery. Crucial for agents to verify if the sensor has found an SNTP server.
Source code in src/xovis/api/device/resources/itxpt.py
92 93 94 95 96 97 98 | |
get_txt_records()
async
Retrieves the extra TXT records published in the ITxPT mDNS broadcast.
Source code in src/xovis/api/device/resources/itxpt.py
101 102 103 104 105 106 | |
update_config(config)
async
Updates the global ITxPT configuration.
Source code in src/xovis/api/device/resources/itxpt.py
55 56 57 58 59 60 | |
update_custom_configurations(custom_configs)
async
Updates the custom free text configurations blob.
Source code in src/xovis/api/device/resources/itxpt.py
123 124 125 126 127 | |
update_door(door_id, door)
async
Updates an existing APC door configuration.
Source code in src/xovis/api/device/resources/itxpt.py
149 150 151 152 | |
update_time_config(config)
async
Updates the ITxPT time discovery configuration.
Source code in src/xovis/api/device/resources/itxpt.py
85 86 87 88 89 90 | |
update_txt_records(txt_records)
async
Updates the extra TXT records for the mDNS broadcast.
Source code in src/xovis/api/device/resources/itxpt.py
108 109 110 111 112 113 | |
xovis.api.device.resources.update
Xovis SDK - Firmware Update Resource
Operates within the Control Plane. Provides comprehensive implementation for managing the firmware update lifecycle on local edge sensors. This includes OTA (Over-The-Air) cloud downloads, local binary flashing, installation scheduling, and autonomous update diagnostics.
Classes
UpdateManager
Manages firmware update operations, schedulers, and diagnostics on a Xovis device.
This manager orchestrates the entire firmware maintenance lifecycle. It allows agents to query cloud availability, stream raw firmware binaries, schedule off-hours installations, and parse plaintext installation logs for autonomous failure remediation.
Source code in src/xovis/api/device/resources/update.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
Attributes
models
property
Returns the strictly validated Pydantic models for the current firmware.
Methods:
__init__(client, target_id=None)
Initializes the UpdateManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
DeviceClient
|
The parent device client instance providing authenticated HTTPX connection pooling. |
required |
target_id
|
Optional[str]
|
The multisensor target ID, if applicable. |
None
|
Source code in src/xovis/api/device/resources/update.py
29 30 31 32 33 34 35 36 37 38 39 40 41 | |
_resolve_path()
Resolves the base API path for updates.
Source code in src/xovis/api/device/resources/update.py
48 49 50 51 52 53 | |
cancel_cloud_download()
async
Aborts any currently active firmware download from the Xovis Cloud.
Source code in src/xovis/api/device/resources/update.py
275 276 277 | |
delete_all_packages(force=False)
async
Deletes all firmware packages cached on the sensor's internal storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
force
|
bool
|
If True, also deletes any pending scheduled updates. |
False
|
Source code in src/xovis/api/device/resources/update.py
118 119 120 121 122 123 124 125 126 | |
delete_config()
async
Resets the automated cloud download configuration to factory defaults.
Source code in src/xovis/api/device/resources/update.py
237 238 239 | |
delete_package(version, force=False)
async
Deletes a specific firmware package from the sensor's storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
version
|
str
|
The exact version identifier of the package. |
required |
force
|
bool
|
If True, also deletes if it is currently scheduled. |
False
|
Source code in src/xovis/api/device/resources/update.py
128 129 130 131 132 133 134 135 136 137 | |
delete_schedule()
async
Cancels any pending automated firmware installation.
Source code in src/xovis/api/device/resources/update.py
210 211 212 | |
get_available_updates()
async
Queries the Xovis Cloud for applicable firmware upgrades.
Returns:
| Name | Type | Description |
|---|---|---|
UpdatesAvailable |
Any
|
List of compatible firmware metadata. |
Source code in src/xovis/api/device/resources/update.py
241 242 243 244 245 246 247 248 249 | |
get_config()
async
Retrieves the automated cloud download configuration.
Returns:
| Name | Type | Description |
|---|---|---|
DownloadConfig |
Any
|
The current automation toggles for minor updates. |
Source code in src/xovis/api/device/resources/update.py
214 215 216 217 218 219 220 221 222 | |
get_download_state()
async
Retrieves the real-time progression of an active cloud firmware download.
Returns:
| Name | Type | Description |
|---|---|---|
DownloadState |
Any
|
The current percentage and error states of the download. |
Source code in src/xovis/api/device/resources/update.py
255 256 257 258 259 260 261 262 263 | |
get_history(include_fails=True)
async
Retrieves the chronological history of firmware installations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
include_fails
|
bool
|
Whether to include failed installation attempts in the diagnostic ledger. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
UpdateHistory |
Any
|
Validated Pydantic model containing the installation ledger. |
Source code in src/xovis/api/device/resources/update.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
get_info()
async
Retrieves static minimal update information.
Returns:
| Name | Type | Description |
|---|---|---|
UpdateInfo |
Any
|
The minimal software version and current version data. |
Source code in src/xovis/api/device/resources/update.py
55 56 57 58 59 60 61 62 63 | |
get_log(offset=0)
async
Retrieves the raw plaintext installation log.
Crucial for autonomous agents to parse why an installation failed (e.g., hardware incompatibility or checksum errors).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offset
|
int
|
Number of bytes to skip, allowing for polled streaming. |
0
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The raw plaintext log output. |
Source code in src/xovis/api/device/resources/update.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
get_packages()
async
Retrieves the list of firmware packages currently stored on the sensor's flash.
Returns:
| Name | Type | Description |
|---|---|---|
UpdatePackages |
Any
|
A list of version identifiers currently cached. |
Source code in src/xovis/api/device/resources/update.py
108 109 110 111 112 113 114 115 116 | |
get_schedule()
async
Retrieves the current automated firmware installation schedule.
Returns:
| Name | Type | Description |
|---|---|---|
UpdateSchedule |
Any
|
The configured execution time and target version. |
Source code in src/xovis/api/device/resources/update.py
186 187 188 189 190 191 192 193 194 | |
get_state()
async
Retrieves the real-time installation and execution state of the update engine.
Returns:
| Name | Type | Description |
|---|---|---|
UpdateState |
Any
|
Current update state (e.g., OK, INSTALLING, REBOOTING). |
Source code in src/xovis/api/device/resources/update.py
65 66 67 68 69 70 71 72 73 | |
install_package(version, force=False)
async
Triggers the installation of a firmware package already cached on the sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
version
|
str
|
The exact version identifier to install. |
required |
force
|
bool
|
CRITICAL: If True, forces the installation even if it results in a configuration-breaking downgrade. |
False
|
Source code in src/xovis/api/device/resources/update.py
157 158 159 160 161 162 163 164 165 166 167 | |
refresh_available_updates()
async
Forces the sensor to immediately re-poll the Xovis Cloud for upgrades.
Source code in src/xovis/api/device/resources/update.py
251 252 253 | |
set_config(config)
async
Modifies the automated cloud download configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
DownloadConfig
|
The updated Pydantic configuration model. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DownloadConfig |
Any
|
The successfully applied configuration. |
Source code in src/xovis/api/device/resources/update.py
224 225 226 227 228 229 230 231 232 233 234 235 | |
set_schedule(schedule)
async
Configures an automated future firmware installation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schedule
|
UpdateSchedule
|
The validated Pydantic schedule payload containing the target version and XovisTime. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UpdateSchedule |
Any
|
The confirmed active schedule. |
Source code in src/xovis/api/device/resources/update.py
196 197 198 199 200 201 202 203 204 205 206 207 208 | |
start_cloud_download(version)
async
Commands the sensor to begin downloading a specific firmware version from the Xovis Cloud.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
version
|
str
|
The exact version string to fetch. |
required |
Source code in src/xovis/api/device/resources/update.py
265 266 267 268 269 270 271 272 273 | |
upload_and_install(file_path, force=False)
async
Simultaneously datapush and executes a firmware binary installation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
The local filesystem path to the .xup binary. |
required |
force
|
bool
|
CRITICAL: If True, forces the installation. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
UpdateVersion |
Any
|
The parsed version identifier of the installed package. |
Source code in src/xovis/api/device/resources/update.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
upload_firmware(file_path)
async
Uploads a firmware update package (.xup) to the sensor's flash memory.
Bypasses multipart/form-data to stream the raw binary directly, satisfying the strict application/octet-stream OpenAPI requirement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
The local filesystem path to the .xup binary. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UpdateVersion |
Any
|
The parsed version identifier of the uploaded package. |
Source code in src/xovis/api/device/resources/update.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | |
xovis.api.device.resources.time_config
Xovis SDK - Time Configuration Resource
Operates within the Control Plane. Provides comprehensive implementation for managing time synchronization, NTP clock drift diagnostics, timezones, and manual overrides.
Classes
TimeManager
Manages time configuration and synchronization state on a Xovis device.
This manager orchestrates NTP synchronization, timezone management, and exposes raw chronological diagnostics to ensure telemetry timestamps remain perfectly aligned with downstream enterprise systems.
Source code in src/xovis/api/device/resources/time_config.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
Attributes
models
property
Returns the strictly validated Pydantic models for the current firmware.
Methods:
__init__(http_client, client=None)
Initializes the TimeManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
http_client
|
XovisHTTPClient
|
The resilient HTTP client. |
required |
client
|
Optional[DeviceClient]
|
The parent DeviceClient instance. |
None
|
Source code in src/xovis/api/device/resources/time_config.py
27 28 29 30 31 32 33 34 35 36 37 | |
get_settings()
async
Retrieves the current global time configuration.
Provides insight into whether the device is acting as an NTP client, an NTP server, or both, alongside its configured upstream peers.
Returns:
| Name | Type | Description |
|---|---|---|
TimeSettings |
Any
|
The validated time and NTP configuration model. |
Source code in src/xovis/api/device/resources/time_config.py
55 56 57 58 59 60 61 62 63 64 65 66 | |
get_stamp()
async
Retrieves a raw UNIX timestamp directly from the OS-level clock.
This is an undocumented diagnostic endpoint useful for latency-sensitive ping tests between the Hub and the Edge to calculate transit delay.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The raw plaintext timestamp string. |
Source code in src/xovis/api/device/resources/time_config.py
117 118 119 120 121 122 123 124 125 126 127 128 | |
get_state()
async
Retrieves the highly detailed operational state of the time service.
Crucial for Autonomous Maintenance (Module D). Agents can poll this
endpoint to monitor ntp_rms_offset, ntp_root_delay, and identify
peers marked as FALSETICKER or UNREACHABLE.
Returns:
| Name | Type | Description |
|---|---|---|
TimeState |
Any
|
The runtime time synchronization status and source health. |
Source code in src/xovis/api/device/resources/time_config.py
103 104 105 106 107 108 109 110 111 112 113 114 115 | |
get_verbose_diagnostics()
async
Retrieves raw, verbose NTP daemon logs directly from the Edge OS.
This is an undocumented diagnostic endpoint providing deep Chrony/NTPd output, allowing LLM agents to perform advanced root-cause analysis on time synchronization failures.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The raw plaintext verbose diagnostic output. |
Source code in src/xovis/api/device/resources/time_config.py
130 131 132 133 134 135 136 137 138 139 140 141 142 | |
get_zones()
async
Retrieves the list of available timezones supported by the device.
Returns:
| Name | Type | Description |
|---|---|---|
Timezones |
Any
|
A collection of supported timezone identifiers (e.g., 'UTC', 'America/New_York'). |
Source code in src/xovis/api/device/resources/time_config.py
44 45 46 47 48 49 50 51 52 53 | |
reset_settings()
async
Resets the time configuration to factory defaults.
Default state falls back to UTC with 'pool.ntp.org' as the primary upstream peer and NTP server capabilities disabled.
Source code in src/xovis/api/device/resources/time_config.py
80 81 82 83 84 85 86 87 | |
set_manual_time(time_settings)
async
Manually forces the current device time.
CRITICAL: This endpoint will fail with a 412 Precondition Failed error
if the device currently has NTP enabled. Agents must first disable NTP
via update_settings before invoking this method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_settings
|
TimeManualSettings
|
The manual time details containing
either |
required |
Source code in src/xovis/api/device/resources/time_config.py
89 90 91 92 93 94 95 96 97 98 99 100 101 | |
update_settings(settings)
async
Updates the global time configuration.
Allows agents to dynamically inject new NTP peers or change the timezone if the device is relocated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings
|
TimeSettings
|
The updated time configuration model. |
required |
Source code in src/xovis/api/device/resources/time_config.py
68 69 70 71 72 73 74 75 76 77 78 | |
xovis.api.device.resources.users
Xovis SDK - User Management Resource
Provides the implementation for managing user accounts, passwords, sessions, and activation states on local edge sensors. Operates within the Control Plane.
Classes
UsersManager
Manages user accounts and security settings on a Xovis device.
This manager handles the full user lifecycle, including session management, password updates, account activation, and factory reset authorization (SMK).
Source code in src/xovis/api/device/resources/users.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
Attributes
models
property
Returns the appropriate Pydantic models for the current device firmware.
Methods:
__init__(http_client, client=None)
Initializes the UsersManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
http_client
|
XovisHTTPClient
|
The resilient HTTP client. |
required |
client
|
DeviceClient
|
The parent DeviceClient instance. |
None
|
Source code in src/xovis/api/device/resources/users.py
25 26 27 28 29 30 31 32 33 34 35 | |
apply_factory_defaults()
async
Applies factory default user configurations.
Source code in src/xovis/api/device/resources/users.py
52 53 54 | |
get_all()
async
Retrieves the list of all configured user accounts.
Returns:
| Name | Type | Description |
|---|---|---|
UserDetails |
Any
|
A collection of user account details. |
Source code in src/xovis/api/device/resources/users.py
42 43 44 45 46 47 48 49 50 | |
get_current()
async
Retrieves details for the currently authenticated user.
Returns:
| Name | Type | Description |
|---|---|---|
UserDetail |
Any
|
The active user's account details. |
Source code in src/xovis/api/device/resources/users.py
56 57 58 59 60 61 62 63 64 | |
get_user(user_id)
async
Retrieves details for a specific user account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
str
|
The identifier of the user. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UserDetail |
Any
|
The requested user's account details. |
Source code in src/xovis/api/device/resources/users.py
98 99 100 101 102 103 104 105 106 107 108 109 | |
login()
async
Authenticates the user and creates a new session.
Returns:
| Name | Type | Description |
|---|---|---|
UserSession |
Any
|
The details of the newly created session. |
Source code in src/xovis/api/device/resources/users.py
75 76 77 78 79 80 81 82 83 | |
logout()
async
Terminates the current user session.
Source code in src/xovis/api/device/resources/users.py
85 86 87 | |
reset(smk)
async
Applies factory defaults using a Secure Management Key (SMK).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
smk
|
UserSmk
|
The SMK authorization payload. |
required |
Source code in src/xovis/api/device/resources/users.py
89 90 91 92 93 94 95 96 | |
reset_password(user_id)
async
Resets a user's password to the factory default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
str
|
The identifier of the user. |
required |
Source code in src/xovis/api/device/resources/users.py
125 126 127 128 129 130 131 132 | |
update_activation(user_id, activation)
async
Updates the activation state of a specific user account.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
str
|
The identifier of the user. |
required |
activation
|
UserActivation
|
The new activation state. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UserActivation |
Any
|
The updated activation state. |
Source code in src/xovis/api/device/resources/users.py
111 112 113 114 115 116 117 118 119 120 121 122 123 | |
update_current_password(credentials)
async
Updates the password for the current user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
credentials
|
UserCredentials
|
The new password details. |
required |
Source code in src/xovis/api/device/resources/users.py
66 67 68 69 70 71 72 73 | |
xovis.api.device.resources.images
Xovis SDK - Image Management Resource
Provides the implementation for retrieving background, raw lens, stereo, and depth images from local edge sensors.
Classes
ImagesManager
Manages image retrieval for the single-sensor context.
Source code in src/xovis/api/device/resources/images.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
Methods:
__init__(client, target_id=None)
Initializes the ImagesManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
DeviceClient
|
The parent device client instance. |
required |
target_id
|
Optional[str]
|
The multisensor target ID, if applicable. |
None
|
Source code in src/xovis/api/device/resources/images.py
20 21 22 23 24 25 26 27 28 29 30 | |
_resolve_path(perspective='scene')
Resolves the base path for images.
Source code in src/xovis/api/device/resources/images.py
32 33 34 35 36 | |
get_background(perspective='scene')
async
Fetches the static background image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
perspective
|
str
|
The coordinate projection to use ("scene" or "view"). Defaults to "scene". |
'scene'
|
Returns:
| Type | Description |
|---|---|
tuple[bytes, dict[str, Any]]
|
Tuple[bytes, Dict[str, Any]]: A tuple containing the JPEG binary data and a dictionary of the parsed image metadata. |
Source code in src/xovis/api/device/resources/images.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
get_background_tarball(perspective='scene', json_int64_workaround=False, tracked_objects=True, events=True)
async
Fetches the static background image and metadata as a raw tarball.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
perspective
|
str
|
The coordinate projection to use ("scene" or "view"). Defaults to "scene". |
'scene'
|
json_int64_workaround
|
bool
|
Include workaround for 64-bit JSON ints. Defaults to False. |
False
|
tracked_objects
|
bool
|
Include tracked objects overlay data. Defaults to True. |
True
|
events
|
bool
|
Include events overlay data. Defaults to True. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The raw tarball binary data containing 'image.jpg' and 'X-Image-Metadata.json'. |
Source code in src/xovis/api/device/resources/images.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
get_depth_map(colored=False)
async
Fetches the depth map image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
colored
|
bool
|
If True, requests the colored depth map. Defaults to False. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The depth map PNG binary data. |
Source code in src/xovis/api/device/resources/images.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
get_live(perspective='scene')
async
Fetches the live image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
perspective
|
str
|
The coordinate projection to use ("scene" or "view"). Defaults to "scene". |
'scene'
|
Returns:
| Type | Description |
|---|---|
tuple[bytes, dict[str, Any]]
|
Tuple[bytes, Dict[str, Any]]: A tuple containing the JPEG binary data and a dictionary of the parsed image metadata. |
Source code in src/xovis/api/device/resources/images.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
get_raw_left()
async
Fetches the raw left lens image.
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The raw JPEG image binary data. |
Source code in src/xovis/api/device/resources/images.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |
get_raw_right()
async
Fetches the raw right lens image.
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The raw JPEG image binary data. |
Source code in src/xovis/api/device/resources/images.py
53 54 55 56 57 58 59 60 61 | |
get_stereo()
async
Fetches the stereo image.
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
The PNG image binary data. |
Source code in src/xovis/api/device/resources/images.py
63 64 65 66 67 68 69 70 71 | |
reset_background(perspective='scene')
async
Resets the background image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
perspective
|
str
|
The projection context to reset. Defaults to "scene". |
'scene'
|
Source code in src/xovis/api/device/resources/images.py
150 151 152 153 154 155 156 157 | |
update_settings_image()
async
Updates the settings image used for configuration.
Source code in src/xovis/api/device/resources/images.py
159 160 161 162 163 | |