MergenHub Envest
Home/Docs/User Manual (in-app, complete)

SCADA / HMI

Screen Editor

Drag-and-drop visual screen editor (WinCC-like industrial HMI style). It has Design and Run modes.

CanvasWorld-space SVG + screen-space overlay; zoom/pan, alignment guides, distribute evenly, Undo/Redo.
Snap / GridGrid and object snapping; free movement while Ctrl is held.
Multi-selectMove / resize / rotate (group).
ScreensSub-screens (top tab strip), export/import.

Mouse & keyboard

Ctrl + wheelZoom in/out around the cursor
Space / Alt + dragPan the canvas
Ctrl (while dragging)Temporary free movement (snap off)
Ctrl+Z / Ctrl+YUndo / redo
"Fit" / "100%"Center the page in the visible area + fit

Selection inside a drawing (SVG) — Illustrator flow

Double-click (on a drawing)Enters the drawing; the topmost group under the cursor is selected.
Single clickSelects the object at that level (orange frame + name label).
Double-click (on a group)Enters the group one level deeper; a breadcrumb bar appears on top (e.g. normal-hat › baglac).
Click outsideGoes up level by level until the clicked object is visible and selects it.
EscUp one level; if already at the top, leaves the selection.
Right-click (on a part)Part menu: add animation, bring to front/send to back, color, size/position, exit to parent group.
Note Fit centers and fits the entire designed screen page into the viewport — in run (runtime) mode the operator sees the screen correctly at any resolution.

Widgets

Built-in widgets (with variants):

BasicLabel, rectangle, indicator, gauge, chart, trend-log, lamp, button, switch, input, setting field.
IndustrialTank, 3D Tank, Pump, Valve, Pipe (straight / round 3D / elbow ┌┐└┘).
Map & cameraMap/Station (tile + station pin, live color/nav/popup) and Camera (live IP camera video; see IP camera).
ConnectionPipe Link (connects two objects with an orthogonal, corner-fixed pipe).

Elbow pipe: the corner stays fixed and the arms extend with the box — route paths without distortion.

SVG Objects (inline)

Imported/library SVGs are drawn as inline vectors (not raster): they stay sharp at every zoom/rotation. For flawless behavior the SVG should:

  • contain a viewBox; have no fixed width/height.
  • give parts that will be linked to animation an id/class (WinCC "SVG dynamization" — e.g. fill id="fill", needle id="needle").
  • contain no embedded raster (PNG); Illustrator/Inkscape "Optimized/Plain SVG".

The format standard is SVG (WinCC Unified also uses native SVG).

Warning PNG/JPG (raster) symbols blur when scaled — avoid them. Non-vector images are suitable only for a static background.

Animation & Tag Binding

Each widget is bound to a tag; animation is applied according to the live value. Multiple (conditional) animations can be added to one widget.

ColorFill/line color according to a value threshold (e.g. >8 red).
VisibilityShow/hide according to the value (e.g. fault lamp).
LevelTank fill height (min–max scaled).
FlowPipe flow animation — flows while value ≠ 0.
RotationRotate the pump/motor rotor (while running).
Text / valueShow the numeric value with unit + decimals.

Animation list (⚡)

The ⚡ button on the toolbar lists all animations on the screen in one panel: user rules, simple widget animations and template bindings ("template" badge — the water level/flow/status color bindings of the Koru1000 base layer). Clicking a row centers the object on the canvas and makes it glow; hovering highlights the target part; user rules can be deleted from the row.

Preview (▶): plays all rules unconditionally in design mode — you see the animations without switching to Run (it does not change the saved screen).

Tip In tag fields, ✕ clears the selection with one click; even if long tag paths are truncated, the full path is shown on hover.
Tip Setpoint writes are confirmed with "write-verify": the entered value is written to the device and read back; if read = written, ✓ is shown, otherwise ✗ — the operator sees that the write really went through.

Macro — your own HTML object + system SDK

A Macro is your own HTML/CSS/JS object that you place on the screen: use it where ready-made widgets are not enough (a plant-specific table, a custom indicator, a small calculation tool, a system dashboard). It is added from the palette with Macro and edited in the properties panel on the right.

It runs in a sandbox (sandboxed iframe): it cannot access the application's page, and its network is closed (CDN scripts, remote fonts/images are not loaded — embed everything). It reaches data through two doors: data-mh-* (tag values) and MH.query (system data).

1) Value binding — without writing JS

The element that will show the value carries its binding itself, and the engine fills it in:

<b data-mh-bind="Anlık güç" data-mh-tag="Kanal1.Pompa1.Guc" data-mh-unit="kW" data-mh-dec="1">--</b>
data-mh-kindvalue (default) · state (on/off text) · level (fill height) · color (background)
data-mh-unit / -decUnit and decimal places
data-mh-on / -off / -thresholdText/color and threshold for state and color
data-mh-min / -maxScale for level
data-mh-bindName shown in the panel — you change the tag from here in the Bound elements list
Note Quality display is automatic: a value whose quality is not Good becomes faded + dashed-bordered. You will not mistake frozen data for live data.

2) System data — MH.query / MH.poll

The alarm list, event and audit log, system resources, connected OPC UA clients, device status, a device's read/write log… all can be read from a macro. The macro does not go out to the network: the application asks the question, with your own session — so a macro cannot see what you cannot see. Every query needs the permission of the user who opens the screen (alarm queries Alarms: View, audit Audit log, subsystems Server settings, agents Data Bridge, data logging Data Logs: View; see Permissions page by page). These macros do not need tags.

alarms · alarmDefs · alarmHistoryActive alarms, definitions, history
events · auditSystem event log · who did what (audit)
metrics · status · subsystems · servicesCPU/RAM/disk, tag and OPC load, service statuses
devices · diagnosticsDevice communication · a device's read/write traffic
opcuaClientsConnected OPC UA clients + subscription/monitored tag count
tagsTag search: current value + quality
agents · loggerStatus · loggerGroups · advancedTags · licenseData bridge agents, data logging, virtual tags, license
MH.poll('alarms', {}, 5000, function(list){
  govde.innerHTML = list.map(function(a){
    return '<tr><td>' + MH.esc(a.name) + '</td><td>' + MH.fmt(a.value,1) + '</td>'
         + '<td>' + (a.acked ? 'onaylı' : 'BEKLİYOR') + '</td></tr>';
  }).join('');
});

MH.poll repeats the query periodically (the first call is immediate; it does not query while the macro is not visible). Helpers: MH.fmt, MH.saat, MH.tarih and MH.esc (escape system text before putting it into HTML). Writing has a single path: MH.write(tag, değer) — it goes through the application's permission/confirmation and audit path.

3) Element mode — edit the parts inside one by one

From outside, a macro is a single box; to edit the card/title/value inside it, enter element mode: double-click the macro (the same hand habit as part mode in symbols) or use Select elements in the panel. A blue strip appears on top while in the mode.

HoverThe part under the mouse is framed and its name is shown (⛓ mark on bound ones).
SelectThe clicked part opens in the panel on the right. The breadcrumb bar (card › row › b) is clickable: click a parent name to select the container.
DataGive the selected part a tag; display (value/state/fill/color), unit and decimals are set here. No JS needed.
AppearanceText and background color, font size, bold, alignment, padding, width share in the row.
LayoutMove up/down, copy, delete; add a ready block inside or below.
ExitEsc. While in the mode, clicks go into the macro, so the object is not moved — it returns to normal when you exit.

Editing on the canvas

A small toolbar appears above the part you select — edit there without going to the panel:

AEdit the text in place (double-clicking the part does the same; Enter saves, Esc cancels)
B · A− / A+Bold; decrease / increase text size
^ · v · = · xMove up/down, copy, delete
tagJumps to the tag field in the right panel
Note Toolbar actions are also written to the source the same way — as if you did them from the panel. Ctrl+Z undoes all of them.

Layout — the macro recognizes its box

A macro box has a fixed size; if the content grows, the parts at the bottom would become invisible. Choose the Layout mode in the panel:

Fit to box (default for new macros)The content is measured and scaled to fit the box exactly — never clipped. Same behavior as other SCADA objects; it does not break when the screen is opened with Fit either.
FlowClassic behavior: content flows, and is clipped if it overflows the box (older macros stay in this mode).
Fill verticallyRoot parts share the box height equally — for card/row layouts.
Box follows contentThe box grows with the content; if needed the screen page is also extended (the object does not get stuck below the page and vanish).

Also, a newly added block is scrolled into view and glows briefly; in "Flow" mode, if the content overflows, a "Content overflows the box — fit the box" button appears in the panel.

Note Scaling does not touch your source: your HTML stays the same, the engine only fits the display into the box.

Blocks (Row, Column, Card, Value, Status badge, Title, Text, Table) let you build a macro from parts: they are added inside/below the selected part or at the end from the panel, and their styles come in automatically once.

Note Changes are written directly into the HTML text — your code is not reformatted, only the place you touched changes. If something goes wrong, Ctrl+Z undoes it.
Tip Template buttons now append below the existing content by default (your work is not erased). You can choose Always replace in the "When a template is applied" option.

4) Code editor

HighlightingHTML / CSS / JS separately, with line numbers
Expand (⤢)Opens the same editor full screen
AutocompleteMH.query(' → data list · assign the result to a variable and type . → that type's fields · data-mh-tag=" → real tag search · data-mh- → attributes. Also opens with Ctrl+Space.
SDK and examplesParameters, returned fields and a working example for each data type; Add to JS inserts it straight into the code
TemplatesValue: KPI card, value list, status badge, fill bar — System: alarm list, event log, system resources, OPC UA clients, device status, read/write log
Tip Do not hard-code colors: var(--mh-primary), --mh-card, --mh-border, --mh-success, --mh-warning, --mh-danger follow the theme; MH.theme() returns night/day.
Warning If the code errors, it appears in a red box under the macro (including unhandled Promise rejections). Tag values flow only in Run mode; in design, sample data is shown and a "PREVIEW DATA" label stays in the corner.

Run Mode (Runtime)

Run mode is the clean operator view: the top bars are hidden, the canvas is full screen, and the controls are in a floating panel at the top right.

FitFits the entire designed screen into the viewport and centers it (aspect ratio preserved). Recommended.
StretchStretches the screen to completely fill the viewport (aspect ratio not preserved).
1:1Actual size; navigate with wheel/pan.

Widget click actions: switch screen, faceplate (opens a designed screen live in a floating window). Bottom tabs: Alarms, Chart (history of logged tags).

Tip Use Fit so the screen looks right on mobile/different resolutions; if you set the design page size to match your content, no blank space is left.

Screen status indicators and colour rules

In the SCADA tree on the left you can put small status indicators (icons) next to the name of each screen: is there communication, is the pump running, is there an alarm. You see the state without opening the screen. You set the colour of the icon with a rule: "if the tag value is this, make the colour that".

Adding an indicator: step by step

  1. Press the pencil button in the screen's row in the tree (or right-click the row): the Screen Properties window opens.
  2. In the Status Indicators (sidebar) section press Add Indicator.
  3. Select the icon from the box on the left; type the tag path into the box next to it or select the tag with the magnifier button.
  4. In the Colour rules box below it you can give the indicator a name if you wish (shown when you hover over it: "Pump", "Communication").
  5. Press Add rule and fill in the rule: Value [equals / does not equal / is greater than / is greater than or equal to / is less than / is less than or equal to / is between] [number] then colour [colour box] and, if you wish, a state name (e.g. Running). When "is between" is selected a second number box opens (the ends are included).
  6. Add as many rules as needed. The Preset: running / stopped and Preset: normal / alarm buttons write two frequently used rule sets with one click; you can change the colours and names afterwards.
  7. Close the window with Save. The icon appears next to the screen name in the tree and is coloured live.
Order of the rulesRules are tried top to bottom; the colour of the first rule that matches is used. You change the order with the up arrow in the rule row. Example: first "equals 2 → red (Fault)", then "is greater than 0 → green (Running)"; when the value is 2 the first rule wins.
If no rule matchesThe icon stays pale grey.
If there are no rulesThe old behaviour: green if the value is greater than 0.5, red otherwise.
If the value cannot be readThe icon stays pale grey and the tooltip says "value not available" (the tag has never been read or there is no communication).
TooltipWhen you hover over the icon, the name of the indicator, the state name of the matching rule and the current value are shown.
Long screen nameIf the name does not fit in the row it is shortened with an ellipsis; the icons and the sub-screen count stay visible. The full name is in the tooltip.
Example: well station First indicator: icon engine, tag Kuyu 1.Kuyu 1.Pompa1StartStopDurumu, Preset: running / stopped. Second indicator: icon warning, tag Kuyu 1.Kuyu 1.Al_MotorTermik, Preset: normal / alarm.

IP camera: Cameras settings and the Camera component

3.13

The live video of IP cameras (RTSP) is watched on SCADA screens with the Camera component. Browsers cannot play RTSP, so a small video engine (go2rtc, MIT licensed) runs on the server: it connects to the camera and converts the video into a format the browser can play. Video flows through MergenHub's own address, past its session and permission checks; the camera's address and password never reach the browser.

Setup: step by step

1Settings › Web & Connectivity › Cameras. On the Video engine card the status must be Running and Camera video on must be ticked.
2Add camera: Name, Main stream address (e.g. rtsp://192.168.1.64:554/Streaming/Channels/101), optional Sub stream address (low resolution, e.g. channel 102), the camera's Username and Password. OK, then Save at the bottom of the page.
3Try the video with Preview on the row (save first). Adding and deleting apply in a few seconds without restarting the service.
4In the screen designer put the palette › Map & camera › Camera component on the screen and pick the camera in the property panel. A placeholder shows in design; it plays live in Run.

Video engine

StatusRunning: streams are ready. Starting: wait a few seconds. Stopped: camera video is off or no camera is on. Not installed: go2rtc\go2rtc.exe is missing in the installation folder (the installer puts it there; repair the installation). Error: the message next to it says why.
Camera video onWhen off, the engine does not run; screens say "Camera video is turned off".
WebRTC (low latency)Off by default. When off, video flows through the web interface's own port (MSE): no extra port or firewall rule is needed, and it works behind HTTPS and reverse proxies. When on, the browser tries WebRTC first and falls back to MSE if it cannot connect within 6 s; the WebRTC port (default 8555, TCP and UDP) must be open in the firewall.
AdvancedThe engine and the optional ffmpeg.exe run only from the go2rtc\ folder of the installation (e.g. C:\Program Files\MergenHub\go2rtc\); there is no path field in the settings. For H.265 cameras and the MJPEG fallback (old browsers that cannot play MSE) put ffmpeg.exe in that folder.

Camera definition

Addressrtsp, rtsps, rtspx and http(s) (MJPEG cameras) are accepted. Hikvision: rtsp://IP:554/Streaming/Channels/101; Dahua: rtsp://IP:554/cam/realmonitor?channel=1&subtype=0. A user:password@ written into the address is moved to the separate fields when saved.
PasswordStored encrypted on disk, shown masked in the settings, never sent to the browser. If the password is left masked and the camera's address (server, port) is changed, saving is refused: the stored password is not sent to the new address; enter it again. Use a view-only account on the camera.
Camera onA camera that is off stays in the list; screens showing it say "Camera is turned off".
DeleteScreens showing this camera say "Camera not found".

Camera component

CameraOne of the cameras in Settings › Cameras. The Manage cameras button (for a user with the Camera settings action) opens the settings page.
StreamMain or Sub (low resolution); shown only for a camera with a sub stream. In small boxes the sub stream saves bandwidth and server load.
FitFit (whole image), Fill (crops), Stretch.
Muted · Snapshot button · Show nameThe snapshot button downloads the current frame as PNG; the full-screen button enlarges the box.

If the connection drops the box says "No connection" and reconnects by itself with growing waits (2 – 30 s); the stream closes while the browser tab is hidden and reopens when it is back.

Permissions Camera definitions: the Server settings permission + the "Camera settings" (settings.cameras) action. Watching: SCADA: View + the "Watch cameras" (camera.view) action; when it is off the screen opens, the box says "You have no permission to watch cameras" and no video leaves the server. A user whose screens are limited by area / screen access (resource ACL) lists and watches only the cameras placed on screens they can see.
Security The video engine's internal interface opens no TCP port: it listens on a local socket that only the service account and administrators can reach, with a random password on every start. The engine's own RTSP / RTMP / SRTP servers are off; from outside, cameras are reached only through MergenHub's authenticated address.
Common problems "Video engine (go2rtc) is not installed on the server": repair the installation. "The saved camera password could not be opened": enter the password again in Settings › Cameras (e.g. when the data was moved to another server without its key). The video stays grey / black: the camera may be sending H.265; switch the sub stream to H.264 or put ffmpeg.exe in the go2rtc\ folder.