Documentation
RotomNG
Migrating from Rotom OG

Migrating from Rotom OG

RotomNG is the Go rewrite of the original Node.js Rotom ("Rotom OG"). Devices and Dragonite talk to it exactly as before — same websocket protocol, same default ports — so the migration is mostly about the config file. The HTTP API and the Prometheus metrics changed too, which matters if you built tooling or dashboards against them.

The full, field by field guide lives in the repo: RotomNG-Vs-OG.md (opens in a new tab).

Steps

  1. Stop Rotom OG.

  2. Install RotomNG. See Docker Setup or Standard Setup.

  3. Convert your old config. The repo ships a conversion script that reads your old config/local.json and writes the new TOML file:

    python3 configs/rotom-og-to-ng.py /path/to/Rotom/config/local.json configs/rotom-ng.toml

    Review the result against the configuration reference.

  4. Copy your job files (if you used jobs) into the jobs directory and set jobs.enable = true.

  5. Start RotomNG and reconnect your devices.

ℹ️

Dragonite needs no changes. Its [rotom] section still points at the controller listener (ws://HOST:7071) and the secret key still maps to controller_listener.secret.

Configuration

The config format changed from JSON (config/local.json) to TOML (configs/rotom-ng.toml). Some highlights:

Rotom OGRotomNG
deviceListener.portdevice_listener.address (":7070")
controllerListener.portcontroller_listener.address (":7071")
client.port / client.hosthttp_listener.address (":7072")
(n/a)http_listener.secret — optional API authentication
(n/a)prometheus.enable — metrics are now opt-in

HTTP API

  • Authentication — OG had none. NG supports an optional X-Rotom-Secret header on all /api endpoints, configured with http_listener.secret.
  • Methods — device actions and job execution moved from POST to PUT.
  • MetricsGET /metrics moved to GET /api/metrics and must be enabled with prometheus.enable = true.
  • Field names — all JSON fields are now snake_case (OG used camelCase), and GET /api/status nests workers under their device.
  • RemovedGET /api/getPublicIp (public IP is now on the device object) and POST /api/ptcLogin.
  • JobsGET /api/job/list became GET /api/job, job execution became PUT /api/job/:jobId/run with device IDs in the JSON body, and GET /api/job/status became GET /api/job-instance.

The complete endpoint list is in RotomNG-API.md (opens in a new tab).

Prometheus metrics

All metrics moved to the rotom_ng namespace (configurable via prometheus.namespace), and the Node.js runtime metrics (nodejs_*, process_*) were replaced by Go runtime metrics (rotom_ng_go_*, rotom_ng_process_*). Renamed metrics:

Rotom OGRotomNG
rotom_devices_aliverotom_ng_devices_connected (adds an origin label)
rotom_devices_totalrotom_ng_devices_total (adds an origin label)
rotom_workers_totalrotom_ng_workers_connected
rotom_workers_activerotom_ng_workers_in_use
rotom_device_memory_freerotom_ng_device_memory_free
rotom_device_memory_mitmrotom_ng_device_memory_mitm
rotom_device_memory_startrotom_ng_device_memory_start

NG also adds counters and histograms for device commands, registrations, connection accepts, worker requests/responses, controllers, RPCs and app lifecycle events. Existing Grafana dashboards built for Rotom OG will need their queries updated.

Web UI

OG had two pages (Status and Jobs). NG splits things up and adds detail:

PageRouteNotes
Status/Aggregated controller, device and worker metrics
Devices/devicesNew dedicated page, expandable rows, enable/disable toggles
Controllers/controllersNew — controller monitoring, reconnect/disconnect
Workers/workersNew — per-worker stats and request rates
Jobs/jobsReload from disk, start/finish timestamps, clear instances

Destructive actions (reboot, restart, disconnect) now ask for confirmation, and devices can be disabled so they are skipped for selection without disconnecting them.