Skip to main content

Trying Sphere with the simulator

Every Sphere connector contains a simulator: software NVRs that behave like Dahua NVRs behind the same driver interface. They sign in, describe themselves and their cameras, stream video over RTSP, answer PTZ commands, raise motion alarms and hold recordings. Live view, playback, PTZ and alarms work end to end with them, which makes them the way to try, demonstrate and train on Sphere before an NVR is there.

What you get​

Each simulated NVR has:

ModelEntrosity Sphere simulator (Dahua-compatible NVR), serial SIM-…, firmware sim-1.0
Cameras4 channels, Camera 1 to Camera 4, main and sub streams in H.264 (a still grey picture, 320 × 240)
PTZChannel 1 is a PTZ camera: it accepts every PTZ command (the picture does not move)
AlarmsA VideoMotion alarm about once a minute, on each channel in turn: it starts, and stops 5 seconds later
RecordingsOne continuous recording per hour for the last 24 hours, on every channel

Every host:port you give a simulated NVR is its own NVR, so you can add as many as you like. Any user name signs in; the password wrong is refused, to show a sign-in failure.

The simulated NVRs do not report a time zone, so Test warns about it: set the NVR's time zone in Sphere if you want to see recording times converted.

Set up a trial​

The simulator runs only when the connector is started with --dev, which the Windows service is not. On the connector computer:

  1. Install and enroll a connector on any Windows computer, following Connectors. It does not need to reach any NVR.

  2. Stop the service and run the connector in the foreground with the simulator, in an elevated command prompt:

    sc stop SphereConnector
    "C:\Program Files\Entrosity Sphere Connector\sphere-connector.exe" run --dev

    The console shows simulated NVRs available (driver "simulator"). Keep the window open for the trial; Ctrl+C stops it, and sc start SphereConnector brings the service back.

  3. In Sphere, add an NVR on that connector (Getting started) with Driver Simulated NVR (trial), any Address and HTTP port (for example sim1 and 80), any user name and any password but wrong.

  4. Within seconds the NVR is Online with four cameras. Continue with Getting started.

Developers run the same with make dev in entrosity-sphere-connector (Sphere connector).

Things to try​

TryYou see
In Live view, choose 4 tiles and click the four camerasFour live tiles of the grey picture (main streams)
Open camera 1Its main stream, and the PTZ panel
Hold a direction, Store here preset 1, Go to itEach command succeeds (nothing moves)
Open camera 2, tick Show PTZ controls and move itAn error: the camera has no PTZ (unsupported)
Open Alarms and wait a minuteMotion detected starts and ends on the next camera; acknowledge it
In Playback, tick one or more cameras and keep todayContinuous recordings for every hour of the last 24 hours
Click the timelineThe same picture, from the chosen time
Under Sign-in, set the password to wrongThe NVR turns Auth failed; the right password brings it back
Optimise for live view on the NVR's page (tenant admins), with 1 s4 changed, 0 already fine, 0 not changed (the simulated sub streams run at 25 fps with a keyframe every 50 frames); a second time, 0 changed, 4 already fine, 0 not changed
Disconnect the NVRIts streams stop and no more alarms arrive; Connect resumes
Stop the connector with Ctrl+CThe connector goes Offline and the NVR Unknown; after run --dev again, they come back

Limits and settings​

  • The simulated NVRs live in the connector's memory; they exist only while it runs with --dev. On a connector running without --dev, the jobs of NVRs with driver simulator fail with unknown_driver.
  • The simulator's RTSP server listens on 127.0.0.1:9554; SPHERE_SIM_ADDR changes the address.
  • --dev adds the simulator; the dahua driver keeps working, so real and simulated NVRs can share a connector.

See also Sphere connector.