Hub Setup

Deploy a Hub for centralized robot management

Hub Setup

Deploy an OctoMY™ Hub to manage multiple robots from a central location. Hubs provide monitoring, automation, and fleet coordination capabilities.

Pro Tip

For testing and development, run the Hub on your local machine. For production deployments, consider a dedicated Raspberry Pi 4 or a cloud VPS for 24/7 availability and reliability.


What is a Hub?

A Hub is a central node that:

  • Connects to multiple Agents (robots)
  • Provides a dashboard for fleet monitoring
  • Enables automation and scheduling
  • Manages shared resources and data
                         ┌─────────────────┐
                         │     Hub         │
                         │   Dashboard     │
                         └────────┬────────┘
                                  │
           ┌──────────────────────┼──────────────────────┐
           │                      │                      │
    ┌──────┴──────┐        ┌──────┴──────┐        ┌──────┴──────┐
    │   Agent 1   │        │   Agent 2   │        │   Agent 3   │
    │   (Robot)   │        │   (Robot)   │        │   (Robot)   │
    └─────────────┘        └─────────────┘        └─────────────┘

When to use a Hub

Scenario Benefit
Multiple robots Centralized monitoring
Scheduled tasks Automated execution
Data logging Aggregate sensor data
Remote access Access from anywhere
Team coordination Shared control

Step 1: Install Hub software

Linux (Recommended)

# Clone OctoMY repository
git clone --recursive https://github.com/mrdeveloperdude/OctoMY.git
cd OctoMY

# Build Hub application
qbs build -f project.qbs profile:qt6 -p hub

# Run Hub
./default/install-root/usr/local/bin/hub

Docker deployment

# Pull Hub image
docker pull octomy/hub:latest

# Run Hub container
docker run -d \
    --name octomy-hub \
    -p 8126:8126/udp \
    -v octomy-data:/data \
    octomy/hub:latest

Dedicated hardware

For production use:

  • Raspberry Pi 4 (4GB+ RAM)
  • Small x86 server
  • Cloud VPS (DigitalOcean, AWS, etc.)

Did You Know?

The Hub uses the same communication protocol as Agent-Remote connections, but optimized for many-to-one communication patterns. A single Hub can efficiently manage dozens of Agents with minimal resource usage.


Step 2: Initial configuration

Create Hub personality

On first launch:

┌─────────────────────────────────────────────┐
│  Welcome to OctoMY Hub                       │
├─────────────────────────────────────────────┤
│                                              │
│  Create your Hub's identity:                 │
│                                              │
│  Name: [Mission Control___________]          │
│                                              │
│  ┌───────────────────────────────────────┐   │
│  │        ┏━━━┓ ┏━━━┓                    │   │
│  │        ┃ ◉ ┃ ┃ ◉ ┃   Identicon        │   │
│  │        ┗━━━┛ ┗━━━┛   (auto-generated) │   │
│  │           ┏━━━┓                       │   │
│  │           ┃   ┃                       │   │
│  │           ┗━━━┛                       │   │
│  └───────────────────────────────────────┘   │
│                                              │
│  [Create Hub]                                │
│                                              │
└─────────────────────────────────────────────┘

Network configuration

Configure the Hub's network settings:

┌─────────────────────────────────────────────┐
│  Network Settings                            │
├─────────────────────────────────────────────┤
│                                              │
│  Listen Port: [8126___]                      │
│                                              │
│  Bind Address:                               │
│  ● All interfaces (0.0.0.0)                  │
│  ○ Localhost only (127.0.0.1)                │
│  ○ Custom: [____________]                    │
│                                              │
│  Discovery:                                  │
│  [✓] Enable multicast discovery              │
│  [✓] Announce on local network               │
│                                              │
│  [Apply]                                     │
│                                              │
└─────────────────────────────────────────────┘

Step 3: Connect Agents

From the Agent

  1. On the Agent device, go to Pairing
  2. Select Pair with Hub
  3. Enter Hub address or scan QR code

From the Hub

  1. Go to FleetAdd Agent
  2. Wait for discovery or enter Agent address
  3. Complete pairing handshake
┌─────────────────────────────────────────────┐
│  Discovered Agents                           │
├─────────────────────────────────────────────┤
│                                              │
│  ┌────────────────────────────────────┐     │
│  │ 🤖 Gentle Badger                   │     │
│  │    192.168.1.105:8124              │     │
│  │    Status: Online                  │     │
│  │    [Pair]                          │     │
│  ├────────────────────────────────────┤     │
│  │ 🤖 Thundering Walrus               │     │
│  │    192.168.1.112:8124              │     │
│  │    Status: Online                  │     │
│  │    [Pair]                          │     │
│  └────────────────────────────────────┘     │
│                                              │
│  [Refresh] [Manual Entry]                    │
│                                              │
└─────────────────────────────────────────────┘

Trust configuration

After pairing, set trust levels:

┌─────────────────────────────────────────────┐
│  Configure Agent: Gentle Badger              │
├─────────────────────────────────────────────┤
│                                              │
│  Trust Level:                                │
│  ○ Handshake  - View status only             │
│  ● Trust      - Full control access          │
│  ○ Depend     - Autonomous operation         │
│                                              │
│  Permissions:                                │
│  [✓] View sensors                            │
│  [✓] Control actuators                       │
│  [✓] Deploy plans                            │
│  [✓] Access logs                             │
│  [ ] Configure hardware                      │
│                                              │
│  [Save]                                      │
│                                              │
└─────────────────────────────────────────────┘

Step 4: Hub dashboard

Fleet overview

View all connected Agents at a glance:

┌─────────────────────────────────────────────────────────────┐
│  Fleet Dashboard                                Mission Control │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│  Agents: 3 online, 1 offline                                 │
│                                                              │
│  ┌─────────────┬─────────────┬─────────────┬─────────────┐  │
│  │ Gentle      │ Thundering  │ Silent      │ Happy       │  │
│  │ Badger      │ Walrus      │ Owl         │ Penguin     │  │
│  │ ● Online    │ ● Online    │ ● Online    │ ○ Offline   │  │
│  │             │             │             │             │  │
│  │ Battery: 78%│ Battery: 45%│ Battery: 92%│ Last: 2h ago│  │
│  │ Plan: Idle  │ Plan: Patrol│ Plan: Guard │             │  │
│  └─────────────┴─────────────┴─────────────┴─────────────┘  │
│                                                              │
│  [All] [Online] [Active] [Offline]    [Grid View] [List View]│
│                                                              │
└─────────────────────────────────────────────────────────────┘

Agent details

Click an Agent for detailed view:

┌─────────────────────────────────────────────┐
│  Agent: Gentle Badger                        │
├─────────────────────────────────────────────┤
│                                              │
│  Status: ● Online (connected 2h 15m)         │
│  Battery: ████████░░ 78%                     │
│                                              │
│  Current Plan: Idle                          │
│  Location: Warehouse A                       │
│                                              │
│  Sensors:                                    │
│  ├── Distance Front: 145 cm                  │
│  ├── Distance Left: 89 cm                    │
│  ├── Temperature: 24.5°C                     │
│  └── Battery Voltage: 11.8V                  │
│                                              │
│  [Control] [Plans] [Logs] [Settings]         │
│                                              │
└─────────────────────────────────────────────┘

Step 5: Automation

Scheduled tasks

Create automated schedules:

┌─────────────────────────────────────────────┐
│  Schedule: Daily Patrol                      │
├─────────────────────────────────────────────┤
│                                              │
│  Target Agent: Thundering Walrus             │
│                                              │
│  Schedule:                                   │
│  ● Recurring  ○ One-time                     │
│                                              │
│  Time: [09:00___]                            │
│  Days: [✓] Mon [✓] Tue [✓] Wed [✓] Thu [✓] Fri  │
│        [ ] Sat [ ] Sun                       │
│                                              │
│  Action:                                     │
│  Plan: [Patrol Route A ▼]                    │
│  Duration: [30___] minutes                   │
│                                              │
│  On completion:                              │
│  [✓] Return to home position                 │
│  [ ] Notify via email                        │
│                                              │
│  [Save Schedule]                             │
│                                              │
└─────────────────────────────────────────────┘

Automation rules

Create event-driven automation:

┌─────────────────────────────────────────────┐
│  Automation Rule: Low Battery Alert          │
├─────────────────────────────────────────────┤
│                                              │
│  When:                                       │
│  Agent: [Any Agent ▼]                        │
│  Condition: Battery < [20___] %              │
│                                              │
│  Then:                                       │
│  ● Send notification                         │
│  ● Run plan: Return to Base                  │
│  [ ] Disable agent                           │
│                                              │
│  Notification:                               │
│  [✓] Dashboard alert                         │
│  [ ] Email                                   │
│  [ ] Webhook                                 │
│                                              │
│  [Save Rule]                                 │
│                                              │
└─────────────────────────────────────────────┘

Step 6: Data logging

Sensor logging

Configure data collection:

┌─────────────────────────────────────────────┐
│  Logging Configuration                       │
├─────────────────────────────────────────────┤
│                                              │
│  Agent: All Agents                           │
│                                              │
│  Log sensors:                                │
│  [✓] distance.*                              │
│  [✓] battery.voltage                         │
│  [✓] imu.heading                             │
│  [ ] temperature                             │
│                                              │
│  Interval: [1___] seconds                    │
│                                              │
│  Storage:                                    │
│  Location: /data/logs/                       │
│  Retention: [30___] days                     │
│  Format: [CSV ▼]                             │
│                                              │
│  [Apply]                                     │
│                                              │
└─────────────────────────────────────────────┘

View logs

┌─────────────────────────────────────────────┐
│  Sensor History: Gentle Badger               │
├─────────────────────────────────────────────┤
│                                              │
│  Sensor: [Battery Voltage ▼]                 │
│  Period: [Last 24 hours ▼]                   │
│                                              │
│  12V ┤                                       │
│      │    ╭──╮                               │
│  11V ┤───╯  ╰───╮      ╭──────               │
│      │          ╰──────╯                     │
│  10V ┤                                       │
│      └─────┬─────┬─────┬─────┬─────          │
│          00:00  06:00  12:00  18:00          │
│                                              │
│  [Export CSV] [Export JSON]                  │
│                                              │
└─────────────────────────────────────────────┘

Step 7: Remote access

Web interface

Access Hub from a browser:

# Hub runs web interface on port 8080
http://hub-address:8080/

# Or with HTTPS (recommended)
https://hub-address:8443/

API access

Hub provides a REST API:

# Get fleet status
curl http://hub-address:8080/api/fleet

# Get agent details
curl http://hub-address:8080/api/agent/gentle-badger

# Send command
curl -X POST http://hub-address:8080/api/agent/gentle-badger/plan \
    -d '{"plan": "patrol"}'

Secure remote access

For internet access:

  1. VPN - Connect via Tailscale, WireGuard, etc.
  2. Reverse Proxy - Use nginx with SSL
  3. SSH Tunnel - ssh -L 8080:localhost:8080 hub-server

Security Consideration

Never expose your Hub directly to the internet without authentication and encryption. Use HTTPS with strong passwords, or better yet, connect through a VPN. A compromised Hub could control your entire robot fleet.


Troubleshooting

Hub won't start

Issue Solution
Port in use Change port or stop conflicting service
Permission denied Run with appropriate permissions
Missing dependencies Install Qt and build requirements

Agents not connecting

Issue Solution
Firewall blocking Open port 8126/UDP
Wrong address Verify Hub IP address
Discovery not working Enable multicast, check network

Dashboard slow

Issue Solution
Many agents Reduce update frequency
Large logs Enable log rotation
Network latency Check network connection

Production deployment

Security checklist

  • [ ] Enable HTTPS for web interface
  • [ ] Use strong passwords
  • [ ] Configure firewall rules
  • [ ] Enable authentication
  • [ ] Regular backups of /data
  • [ ] Monitor disk space

High availability

For critical deployments:

  • Run multiple Hub instances
  • Use load balancer
  • Configure database replication

Next steps

  1. Add more robots - Multi-Agent Setup
  2. Custom processing - Custom Lobes
  3. Hub reference - Hub Node Reference

In this section
Topics
tutorial advanced hub deployment server fleet-management automation monitoring Docker Linux
See also