Brinkhaus-Tools
Python helper framework for connecting your own applications to FleetManagement.
Installation
pip install brinkhaustools Create an App
The App class is the central entry point. It automatically initializes settings, logging, self-diagnosis, status reporting, and the fleet connection.
from brinkhaustools.common import App
app = App("MyApplication", "1.0.0")
app.start()
# ... application logic ...
app.wait() # Blocks until shutdown signal Self-Diagnosis
Use the SelfDiagnosisEngine to report errors and resolve them. Messages appear in the FleetManager dashboard as traffic-light status.
from brinkhaustools.common import App
app = App("MyApplication", "1.0.0")
diag = app.self_diagnosis
MQTT_ERROR_CODE = 1001
try:
mqtt_client.connect(host, port)
diag.clear(MQTT_ERROR_CODE)
except Exception as e:
diag.notify(MQTT_ERROR_CODE, f"MQTT connection failed: {e}",
critical=True) notify() sets a diagnostic message,
clear() resolves it.
While a critical message is active, the traffic light shows red.
Status Reporting
Register custom StatusSource objects to send runtime information to the FleetManager.
from brinkhaustools.common import App
from brinkhaustools.common.status import StatusSource
class MqttStatus(StatusSource):
def get_status(self):
return {
"MQTT-Host": f"{self.host}:{self.port}",
"Connected": self.connected,
}
app = App("MyApplication", "1.0.0")
app.status_engine.register_source(MqttStatus()) The StatusEngine periodically collects all registered sources and sends the snapshot to FleetManager.
Configure Fleet Connection
Create a configuration file at fleetManagementData/config.json:
{
"base_url": "https://fleet.brinkhaus-gmbh.de",
"token": "fmt_YOUR_TOKEN",
"customer_name": "your-customer",
"machine": "your-server",
"heartbeat_interval_sec": 60
} The App automatically detects this configuration and starts sending heartbeats, diagnostic messages, and status snapshots to FleetManager.
Changelog
0.3.0 2026-03-11
Added
- FleetMonitorClient: Receive agent commands via ingest response body (piggyback)
- FleetMonitorClient: Register callback for incoming commands
- FleetMonitorClient: Acknowledge executed commands to FleetManager
0.2.5 2026-03-07
Fixed
- Settings: Atomic writes now crash-safe — fsync on file and directory
- Settings: Second backup generation prevents data loss on two consecutive crashes
0.2.4 2026-03-06
Added
- CHANGELOG.md and RELEASING.md for unified release process
0.2.2 2026-03-01
Added
- Config retry and client reconfiguration for late fleet config availability
- Tests for send_snapshot and StatusSource ABC compliance
0.2.1 2026-03-01
Added
- Full status snapshot reporting to Fleet Management
0.2.0 2026-03-01
Changed
- StatusSource implementations now inherit from ABC
0.1.1 2026-02-28
Added
- Fleet Management documentation: config format, tokens, endpoints
Changed
- MQTT references replaced with HTTPS
Start for free — 5 devices included
Fleet monitoring and security compliance in under 10 minutes. No credit card required.