Setup Guide
Prerequisites
Section titled “Prerequisites”- A running bilbycast-manager instance (v0.4.5+)
- Network access from the gateway host to both the manager and the Appear X unit
- An Appear X unit with JSON-RPC API enabled (HTTPS)
Step 1: Register the Node in Manager
Section titled “Step 1: Register the Node in Manager”- Log into the bilbycast-manager web UI as an Admin
- Navigate to Managed Nodes (
/admin/nodes) - Click Add Node
- Fill in:
- Name: descriptive name (e.g., “Appear X - Studio A”)
- Device Type: select
appear_x(Appear X Encoder/Gateway) - Description: optional
- Expiry: optional
- Click Create — a registration token is displayed
- Copy the registration token
Step 2: Configure the Gateway
Section titled “Step 2: Configure the Gateway”- Copy
config/example.tomlto your working directory asconfig.toml - Edit the configuration:
[manager]url = "wss://your-manager-host:8443/ws/node"registration_token = "paste-your-token-here"credentials_file = "credentials.json"
# For self-signed manager certs (dev/testing only):# accept_self_signed_cert = true# Requires: export BILBYCAST_ALLOW_INSECURE=1
# For production with cert pinning:# cert_fingerprint = "ab:cd:ef:..."
[appear_x]address = "192.168.1.100"username = "admin"password = "your-password"accept_self_signed_cert = true
[polling]alarms_interval_secs = 10chassis_interval_secs = 30inputs_interval_secs = 15outputs_interval_secs = 15services_interval_secs = 30
[[polling.boards]]slot = 1interface = "ipGateway"api_version = "1.15"- Add additional
[[polling.boards]]entries for each board slot you want to monitor
Step 3: Run the Gateway
Section titled “Step 3: Run the Gateway”# Debug modecargo run -- --config config.toml
# Or with release buildcargo build --release./target/release/bilbycast-appear-x-api-gateway --config config.tomlOn first run, the gateway will:
- Connect to the manager via WebSocket
- Send the registration token
- Receive node_id + node_secret credentials
- Save credentials to
credentials.json - Authenticate with the Appear X unit
- Begin polling
On subsequent runs, it uses the saved credentials for reconnection (no token needed).
Step 4: Verify in Manager
Section titled “Step 4: Verify in Manager”- The node should appear as online on the manager dashboard
- Stats (inputs, outputs, alarms) should populate within the configured polling intervals
- Open the AI Assistant and select the Appear X node to ask questions or configure inputs/outputs
Logging
Section titled “Logging”Control log verbosity with RUST_LOG:
# Default (info level)RUST_LOG=info cargo run -- --config config.toml
# Debug output for the gatewayRUST_LOG=info,bilbycast_appear_x_api_gateway=debug cargo run -- --config config.toml
# Trace-level for debugging JSON-RPC callsRUST_LOG=info,bilbycast_appear_x_api_gateway=trace cargo run -- --config config.tomlSecurity Notes
Section titled “Security Notes”- The gateway enforces
wss://for manager connections (no plaintext) - Self-signed cert acceptance requires the explicit
BILBYCAST_ALLOW_INSECURE=1env var - For production, use certificate pinning (
cert_fingerprint) instead ofaccept_self_signed_cert - Credentials file is written with 0600 permissions (owner read/write only)
- The Appear X connection uses HTTPS; self-signed cert acceptance for the Appear X unit is independent of manager TLS settings
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely Cause | Fix |
|---|---|---|
| ”Manager URL must use wss://“ | Config has ws:// URL | Change to wss:// |
| ”BILBYCAST_ALLOW_INSECURE=1 is not set” | Self-signed cert enabled without env var | export BILBYCAST_ALLOW_INSECURE=1 |
| ”Authentication failed” | Wrong token/credentials | Check registration token or re-register |
| ”BeginSession failed” | Wrong Appear X credentials | Verify username/password in config |
| Node shows offline in manager | Network/firewall issue | Check connectivity to manager wss:// port |
| No stats appearing | Polling misconfigured | Check board slot numbers and API version |