Single Emulator Mode

Single Emulator Mode provides full control over individual CPE devices — ideal for development, debugging, and protocol testing. Access it from the landing page at http://localhost:8555 or directly at http://localhost:8555/single.

TR-069 Emulator — Single Emulator Mode

Overview

Single Mode is designed for working with one device at a time with granular control over parameters, events, and logs. For bulk device simulation, see the Load Test Mode.

Feature Single Mode

Device count

One at a time

Parameter editing

Interactive tree browser with search

Event triggering

Manual per-event selection

Log viewing

Real-time live viewer with syntax highlighting

Device persistence

Save and restore device configurations

Getting Started

These steps assume the emulator is running at http://localhost:8555. If not, see Installation — Quick Start.

  1. Open http://localhost:8555/single.

  2. In Start Emulator, enter a Serial Number, set the ACS URL (or accept the default) and pick a Parameter Tree. Tick Enable HTTP Connection Request if the ACS will initiate sessions.

  3. Click Start Emulator. The device registers with the ACS and appears under Active Emulators.

  4. Click Open on the device to inspect it: browse/edit the parameter tree, invoke TR-069 events, and watch the live log.

  5. Click Stop (in the list or the detail view) when finished. Saved configurations remain under Saved Devices for quick re-start. Stopping the Load Test from the Load page (POST /api/stop?scope=load) does not stop Single Emulator devices. A stopped device sends no Bulk Data reports. Stopping a device drops what its ACS configured, its Bulk Data profiles and their schedule included, so it starts again without them; only a stop of everything with clearCaches: false keeps them for the next start. A factory reset, or deleting the saved configuration, drops what the ACS configured together with the schedule.

Common Workflows

Inspect and edit a device’s data model

Open the device, use the Device Tree search to find a parameter, click it, then edit its Value or Notification level and Save. See Device Detail View.

Trigger a TR-069 event

Open the device, pick an event from the Invoke Event dropdown (e.g. Connection Request (6)) and click Invoke. The device starts a session with the ACS. See Device Detail View.

Watch a session in real time

Open the device and use the Live Log (auto-refreshes every 1.5 s). Click Full View for search, errors-only filtering, statistics and download. See Live Log Viewer.

Simulate realistic, changing values

Add Updatable Parameters (e.g. an increasing uptime or random signal) so the device reports changing values automatically. See Updatable Parameters.

Reuse and clone devices

Saved devices can be re-started with one click (Play), loaded back into the form for editing (Edit), or cloned to a new serial via the REST API (POST /apiV2/cloneDevice). See Saved Devices and the /apiV2 API.

Start from a base protocol tree

Use POST /apiV2/startProtocol to start a device from the canonical TR-098 or TR-181 base tree (parameterstree/base/) without selecting a specific file.

Starting a Device

The start form lets you configure a new emulator instance.

Configuration Fields

Field Description

Serial Number

Unique identifier for the emulated CPE device

ACS URL

Full URL of the Auto Configuration Server (e.g., http://acs-host:8080/ftacs/ACS)

Parameter Tree

XML file defining the device data model. Select from available files or upload a new one.

HTTP Connection Request

Ticked by default. It is the start value of the device’s TR-181 parameter Device.ManagementServer.HTTPConnectionRequestEnable (TR-181 2.11, writable boolean, factory default true); the parameter, not the flag, is the state from then on. Unticked, the device’s ConnectionRequestURL is empty (in Inform and GetParameterValues too) and an HTTP Connection Request that still reaches the listener for its serial is dropped without any HTTP response: the connection is closed (reset), one INFO log line, no session. The listener port itself stays open, because it is shared by every device of the pod; this is the closest a shared port can come to the CPE closing its port, which TR-069 3.2.2.2 requires of a disabled mechanism. A tree without the parameter gets it only when unticked. Ticked, the tree stays as it is: the model of a CPE older than TR-181 2.11, whose mechanism is always on, where a SetParameterValues of the name is the unknown-parameter fault. The ACS can change the parameter with SetParameterValues; the device follows at once in both directions, without a session of its own, and the next Inform carries 4 VALUE CHANGE with the changed ConnectionRequestURL (TR-069 A.3.3.1). A TR-098 (InternetGatewayDevice) tree has no such parameter: starting, saving or cloning one unticked is refused (400); a stored such device starts enabled and the log has an ERROR line. UDP/STUN and XMPP Connection Requests are not affected. A device started or saved through the API without this field (or with null) is enabled, and so is every device stored by an earlier version of the emulator, whatever it stored: only an explicit false saved by this version or later disables it

The start form has no identity fields. To give a device its own Manufacturer, ManufacturerOUI, ProductClass and SoftwareVersion, send manufacturer, manufacturerOui, productClass and softwareVersion to POST /apiV2/start or POST /apiV2/saveDevice. See Device identity members.

Click Start to launch the emulator. The device registers with the ACS and appears in the Active Emulators list.

A device whose parameter tree has an XMPP connection (ManagementServer.ConnReqXMPPConnection) also shows an XMPP badge in its Active Emulators entry, refreshed every 5 seconds. Green with a comments icon is Enabled (a lock is added when TLS was established), amber is Connecting or Dormant, red is ServerNotPresent or any Error…​ status, and grey is Disabled (XMPP off, also when Enable is false) or an unknown status (XMPP ?). Hover the badge for the raw Status, the JabberID, the server (address:port, or the Domain marked DNS-SRV) and whether TLS is in use.

Uploading a Parameter Tree

Click the upload icon next to the Parameter Tree selector to add a custom device parameter file. The file appears in the Parameter Tree dropdown immediately after upload.

Device Detail View

Click Open on an active emulator to open the device detail modal. The modal is split into two sections:

Single Mode — device detail view with parameter tree and live log

Left Panel — Parameter Tree

  • Search — Filter parameters by name in real-time

  • Hierarchical tree — Expand/collapse nodes to browse the full device data model

  • Visual indicators — Folder icons for object containers, cube icons for leaf parameters

  • Inline values — Parameter values displayed next to each node

Parameter Editor

Click any parameter in the tree to select it. The editor shows:

Control Description

Value

Editable input field for the current parameter value

Notification

Dropdown to set notification level: 0 (off), 1 (passive), 2 (active)

Save Value

Persist the modified value

Save Notif

Update the notification level

Delete

Remove a writable parameter or object instance

Add to Updatable

Add this parameter to the auto-updating list

Right Panel — Actions and Monitoring

Event Invocation

Trigger TR-069 events from the dropdown:

Event Description

BootStrap (0)

Device initialization / factory reset event

Boot (1)

Device reboot event

Periodic (2)

Scheduled inform to ACS

ValueChange (4)

Parameter changed with active notification

Connection Request (6)

ACS-initiated connection request

Diagnostics (8)

Diagnostics complete

Quick Actions

Button Description

Download Log

Download the full device log file (GET /apiV2/getLog)

Refresh Tree

Reload the parameter tree from the device

Make Speed Delay

Simulate network latency

Reset Speed Delay

Remove latency simulation

Reset WiFi

Reset WiFi parameters to defaults

Stop

Stop this emulator

Live Log Viewer

The compact log viewer shows the last 150 lines of device activity.

  • Auto-Refresh — Toggle automatic refresh (every 1.5 seconds)

  • Clear — Clear log output

  • Full View — Open expanded log viewer

Full Log Viewer

The expanded viewer provides advanced log analysis:

  • Configurable line cap via Max lines (1,000 / 5,000 / 10,000 / 25,000 / 50,000 / 100,000; default 5,000)

  • Real-time refresh with auto-scroll (every 2 seconds; fetches new lines incrementally)

  • Search — Free-text filtering with highlighted matches

  • Errors only — Filter to show only error/warning entries

  • Log statistics — Total lines, error count, warning count

  • Clear — Clear the viewer output

  • Syntax highlighting — Color-coded log levels and SOAP/XML content

Backed by GET /apiV2/getLogContent with incremental position tracking. The compact viewer fetches 150 lines per refresh; the full viewer fetches up to the selected cap. To save the complete log file to disk, use Download Log in the device’s Quick Actions (GET /apiV2/getLog).
Emulator Logs

The Logs panel on the main page saves the logs of the whole emulator: Emulator log saves logs/main.log — everything the emulator logs outside a device’s session (start-up, scheduling, errors) --, and All logs (zip) saves emulator-logs-<time>.zip with main.log, every device log and the parts rolled over at 10 MB (*.log.zip). If main.log does not exist yet, the reason is shown under the buttons. The same buttons, plus a device log by serial, are in Load Test Mode. REST: GET /api/logs/main, GET /api/logs/archive (see REST API — Load Test).

Saved Devices

Device configurations are persisted for quick reuse.

  • Play (icon) — Start an emulator from the saved configuration (hidden while the device is already running)

  • Edit (icon) — Load the saved configuration back into the Start Emulator form for editing

  • Delete (icon) — Remove the saved device; refused with the message "Device is running" (409 DEVICE_RUNNING) while the device is running — stop it first

Each saved device shows: Serial Number, ACS URL, Parameter File, and the HTTP Connection Request status (ConnReq: Yes/No); a Running badge appears while the device is currently active.

The devices are kept in single_devices.json (see SINGLE_DEVICE_STORAGE_FILE). Each entry carries a "storageFormat": 2 key, added the first time the file is saved by this version. An entry without it was written by an earlier version, which stored enableHttpConnectionRequest as false for every device that did not set it although it never read it; such an entry is loaded as enabled, and the log has one INFO line per device ("stored before the HTTP Connection Request flag was honoured: enabled"). Only an explicit false saved with storageFormat 2 starts the device with HTTPConnectionRequestEnable false (the stored flag is a start value; a factory reset does not read it).

An entry this version cannot read (not an object, no serial, a field of the wrong type) is skipped with one ERROR line each and written back unchanged by every later save, until a save or delete names its serial. A file that cannot be parsed at all, or whose top level is not an array, is not overwritten: the store starts empty, every save and delete logs an ERROR naming the file and is refused (the running devices keep working in memory), until the file is fixed by hand or emptied in place (: > /app/single_devices.json on k8s; an empty file is an empty store), and the emulator is restarted. Do not delete the file: a k8s subPath-mounted file cannot be removed. A missing or empty file is an empty store.

Rolling back to a build older than this change: first remove the storageFormat keys from single_devices.json; each is on a line of its own. The older build fails on the unknown key and starts with an empty store (one ERROR line); the file stays intact until that build writes to it for the first time. Its first save then writes only that one device, and a delete writes an empty list, so every other stored device is lost.

Kubernetes (single-file subPath mount, as on test-agent): sed -i writes a temp file and renames it, which fails with EBUSY on the mount, and the emulator cannot be stopped inside the pod. Rewrite the file in place, which keeps the inode:

  1. Copy the file out as a backup: kubectl cp <pod>:/app/single_devices.json ./single_devices.json.bak.

  2. In the pod, before anything is started or saved: sed '/"storageFormat"/d' /app/single_devices.json > /tmp/sd.json && cat /tmp/sd.json > /app/single_devices.json.

  3. Optional but recommended: check that the result is valid JSON on your workstation, not in the pod (the image has neither python3 nor jq): kubectl exec <pod> — cat /app/single_devices.json > sd.json, then jq . sd.json or python3 -m json.tool sd.json.

  4. Do this in the pod of the old build before it saves anything, then restart that pod so it reloads the file; or do it right before the rollback, with nothing started or saved in between. Done while the new build runs, its next save writes the keys again.

Plain host: stop the emulator, run sed -i '/"storageFormat"/d' single_devices.json, check the file is valid JSON, start the old build.

Updatable Parameters

Configure parameters that change automatically during emulation — useful for simulating sensor data, counters, or signal metrics.

Configuration

Field Description

Name

Full parameter path (e.g., Device.WiFi.Radio.1.Stats.BytesSent)

Type

Data type: INT or STRING (the Single Mode form offers these two; BOOL is additionally available in Load Test Mode and through the REST API)

Step Type

Update behavior: DEFAULT (no change), INCREMENT, DECREMENT, or RANDOM

Min / Max

Value range (for numeric types)

Step

Increment/decrement step size

Updatable parameters can be configured both at device start and from the device detail view for running devices.

Both lists show each parameter’s name and type | stepType | values, where the values are the array list if one is set, otherwise min..max, followed by the step (e.g. INT | INCREMENT | 300..1200 step 5); the number of parameters is shown next to the list’s title. Editing a parameter in the device detail view keeps its array list, which the form has no field for.

Upload a Parameters File

Both lists — in Start Emulator and in the device detail view — also take a ready-made file: choose an updatableParameters.yaml or an older cpe_self_updated_params.properties under Upload updatableParameters.yaml or old cpe_self_updated_params.properties and click Upload. The file is read exactly as in Load Test Mode — the same YAML format, the same conversion of the .properties lines, the same checks — but it sets the parameters of one device instead of the global updatableParameters.yaml:

  • In Start Emulator the upload replaces the list in the form; the device gets it when Start Emulator is clicked.

  • In the device detail view the upload replaces the running device’s parameters at once; they are also saved in the device’s stored config.

The file is accepted only as a whole: if anything in it cannot be used, an error under the Upload button names the problem and the list stays unchanged; after a successful upload the same place shows how many parameters were loaded. Delete all next to Upload empties the list (it asks for confirmation first). REST: POST /apiV2/updatableParameters/parse reads a file and returns its parameters without storing them (see REST API — Single Mode).

REST API (v2)

Single Mode devices are managed through the /apiV2/ endpoints. See the Swagger UI at http://localhost:8555/swagger-ui.html for the full interactive reference, and REST API — Single Mode for the complete documented endpoint list, request/response shapes and event codes.

Key Endpoints

Method URL Description

POST

/apiV2/start

Start a device with full configuration, including the optional device identity members

POST

/apiV2/stop

Stop a running device

GET

/apiV2/activeEmulators

List running devices

GET

/apiV2/storedDevices

List saved device configurations

POST

/apiV2/saveDevice

Save a device configuration

POST

/apiV2/startStored

Start from a saved configuration

GET

/apiV2/parameters

Get all parameters for a device

GET

/apiV2/parametersByPrefix

Get parameters by path prefix

POST

/apiV2/changeParameter

Modify a parameter value

POST

/apiV2/changeNotification

Set parameter notification level

POST

/apiV2/invoke

Trigger a TR-069 event

GET

/apiV2/getLogContent

Get log content with position tracking

GET

/apiV2/logStatistics

Get log line count and error/warning counts

POST

/apiV2/addObject

Add a new object instance

POST

/apiV2/deleteObject

Remove an object from the tree

POST

/apiV2/cloneDevice

Clone a device configuration with a new serial