Skip to main content

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 .env or 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 started

    • basic/ - Simple introductory examples
    • intermediate/ - Moderately complex examples
    • advanced/ - Complex examples with advanced features
  • lamp/ - Examples for controlling lamp devices

    • basic/ - Simple lamp control examples
    • intermediate/ - More complex lamp automation
    • advanced/ - Advanced lamp control with complex logic
  • container/ - Examples for managing container devices

    • basic/ - Simple container operations
    • intermediate/ - Container inventory management
    • advanced/ - Complex inventory tracking and transfers
  • assembler/ - Examples for controlling assembler devices

    • basic/ - Simple production commands
    • intermediate/ - Queue management and monitoring
    • advanced/ - Complex production workflows
  • rover/ - Examples for controlling rover devices

    • basic/ - Simple rover movement
    • intermediate/ - Wheel control and steering
    • advanced/ - Complex rover automation
  • display/ - Examples for controlling display devices

    • basic/ - Simple display content
    • intermediate/ - Dynamic content updates
    • advanced/ - Complex graphics and animations
  • grid/ - Examples for grid-level operations

    • basic/ - Grid information and listings
    • intermediate/ - Grid resource management
    • advanced/ - Grid damage tracking and advanced operations
  • ai/ - Examples for AI automation

    • basic/ - Simple AI tasks
    • intermediate/ - AI behavior control
    • advanced/ - Complex AI automation
  • refinery/ - Examples for controlling refinery devices

    • basic/ - Simple refinery operations
    • intermediate/ - Priority and queue management
    • advanced/ - Complex refinement workflows
  • radar/ - Examples for radar and detection devices

    • basic/ - Simple detection
    • intermediate/ - Radar telemetry processing
    • advanced/ - Complex detection and visualization
  • inventory/ - Examples for inventory management

    • basic/ - Simple inventory operations
    • intermediate/ - Inventory tracking
    • advanced/ - 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secontrol-0.2.1.tar.gz (112.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secontrol-0.2.1-py3-none-any.whl (130.1 kB view details)

Uploaded Python 3

File details

Details for the file secontrol-0.2.1.tar.gz.

File metadata

  • Download URL: secontrol-0.2.1.tar.gz
  • Upload date:
  • Size: 112.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for secontrol-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5512799b1e4fc69ec34c2a0d18d74802cee3b565f8ac050fd8463fc307e6fd83
MD5 6a40d012a51fc48408b7d521933f7a2d
BLAKE2b-256 d54972655f79762ef8f7c119f25ef5acd53a535cbf948b64c7d5ba32bf377877

See more details on using hashes here.

File details

Details for the file secontrol-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: secontrol-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 130.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for secontrol-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 93ac3eed80dfd4fedc7e006e29f5409ebf18208b237464f94933ebac5dd48bdc
MD5 8617773cda4f491a707b88f8f8227b67
BLAKE2b-256 1a491e5b415e0ed2fa5ca499cb91d4966b5a010b4ddcb2f0de38913ee93da8a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page