Space Engineers Redis helper utilities
Project description
secontrol
secontrol is a high-level client for interacting with the Space Engineers Redis gateway. The library simplifies obtaining telemetry, sending commands, and implementing automations using persistent subscriptions to key events.
Features
- Connecting to Redis using configuration from
.envor constructor arguments. - Monitoring keys and channels with automatic subscription recovery.
- Utilities for obtaining owner, player, and grid identifiers.
- Examples demonstrating command publishing and state monitoring.
Installation
pip install secontrol
Quick Start
from secontrol.common import prepare_grid
# First player's grid
grid = prepare_grid()
# Devices on the grid
print(", ".join((d.name or f"{d.device_type}:{d.device_id}") for d in grid.devices.values()) or "(no devices)")
Environment Variables
| Variable | Purpose |
|---|---|
REDIS_USERNAME |
Username for authorization. |
REDIS_PASSWORD |
Password for connection. |
Variables can be defined in the .env file in the project or system root.
Variable values must be obtained in the personal account on the page https://www.outenemy.ru/se/
Examples
Ready-made scripts are located in the examples/organized directory, organized by device type and complexity level:
-
basic/- Basic examples for getting startedbasic/- Simple introductory examplesintermediate/- Moderately complex examplesadvanced/- Complex examples with advanced features
-
lamp/- Examples for controlling lamp devicesbasic/- Simple lamp control examplesintermediate/- More complex lamp automationadvanced/- Advanced lamp control with complex logic
-
container/- Examples for managing container devicesbasic/- Simple container operationsintermediate/- Container inventory managementadvanced/- Complex inventory tracking and transfers
-
assembler/- Examples for controlling assembler devicesbasic/- Simple production commandsintermediate/- Queue management and monitoringadvanced/- Complex production workflows
-
rover/- Examples for controlling rover devicesbasic/- Simple rover movementintermediate/- Wheel control and steeringadvanced/- Complex rover automation
-
display/- Examples for controlling display devicesbasic/- Simple display contentintermediate/- Dynamic content updatesadvanced/- Complex graphics and animations
-
grid/- Examples for grid-level operationsbasic/- Grid information and listingsintermediate/- Grid resource managementadvanced/- Grid damage tracking and advanced operations
-
ai/- Examples for AI automationbasic/- Simple AI tasksintermediate/- AI behavior controladvanced/- Complex AI automation
-
refinery/- Examples for controlling refinery devicesbasic/- Simple refinery operationsintermediate/- Priority and queue managementadvanced/- Complex refinement workflows
-
radar/- Examples for radar and detection devicesbasic/- Simple detectionintermediate/- Radar telemetry processingadvanced/- Complex detection and visualization
-
inventory/- Examples for inventory managementbasic/- Simple inventory operationsintermediate/- Inventory trackingadvanced/- Complex inventory automation and transfers
To run an example:
Wiki
https://github.com/rootfabric/secontrol/wiki/home
License
The project is distributed under the MIT license. See the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file secontrol-0.2.2.tar.gz.
File metadata
- Download URL: secontrol-0.2.2.tar.gz
- Upload date:
- Size: 112.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33e2709f09a878d4e9723f7f543ba307eee6dc69ff4c9c803d0fc5917d4ecb71
|
|
| MD5 |
4043f0fe982d9b225ab370fcafb016bf
|
|
| BLAKE2b-256 |
b7c02212d09141a47e61e65b95d336e90a045330736f92c491f5c6f3e0c134dd
|
File details
Details for the file secontrol-0.2.2-py3-none-any.whl.
File metadata
- Download URL: secontrol-0.2.2-py3-none-any.whl
- Upload date:
- Size: 129.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46639a9881c2ed96743d141b44da80ed3c70090d708f691a9f25be4539ad2942
|
|
| MD5 |
db0ecd1a8a8a37976d15d71fbcd7551f
|
|
| BLAKE2b-256 |
9d93dcd6810c145711e8e741f0658cf526cdd026f352eaf8fddeb9251bf91af7
|