■ user documentation

ModbusGuard Configurator

Complete guide to the ModbusGuard web configurator: signing in, editing the params.json of your sensors, and managing controllers.

Version 1.0  ·  params.json editor
Contents
01

Introduction

The ModbusGuard configurator is a browser-based application for editing the params.json configuration file, which describes a sensor network: devices, registers, rooms, value ranges, and notification schedules.

The editor runs entirely in the browser. No installation is required. All changes are held in memory and saved only when you explicitly export or push the file to a server.

ℹ
What params.json contains The file describes: sensor states, report schedules, users and their contacts, room names, sensor types with units, value ranges, and a map of devices/registers linked to rooms, types, and ranges.
02

Getting started

Opening the editor

Go to the configurator address given by your administrator in a modern browser (Chrome, Firefox, Edge, Safari). No installation is needed.

⚠
Browser requirements Use a modern browser. Internet Explorer is not supported.

Signing in

The configurator opens with a sign-in screen. There are two kinds of access:

AccessHow to sign inWhat you can do
GuestUsername guest, password guest (printed on the sign-in screen), or the «Sign in as guest» buttonEdit, import and export a config in the browser. Nothing is stored on the server.
Personal accountUsername and password issued by your administratorEverything a guest can do, plus the Controllers section: keep configs on the server, send them to your controllers and see their live values.

Your username and a «sign out» button are at the bottom of the sidebar. If the configurator is opened without the ModbusGuard server behind it, only the guest sign-in works.

First launch

On first open, the editor loads with demo data from the params.json template. You can:

Saved preferences

The editor saves preferences in browser localStorage:

⚠
Important Config data is held only in memory and is not preserved when you close the tab. Always download the file or save it to the server before closing the browser.
03

Interface

Layout

ZoneDescription
Sidebar (left)Section navigation, your username with a sign-out button, theme and language toggles, copy/download buttons
TopbarCurrent section name, summary (devices · registers · users), and the «Save to …» button while a controller is open in the editor
Work area (right)Current section content — cards, tables, forms

Navigation sections

SectionPurpose
◉ ControllersYour controllers: status, live values and stored configs (personal accounts only)
⇑ Import JSONLoad a configuration file
■ DevicesManage devices and their registers
◆ RoomsRoom list
◆ Sensor typesSensor types and units
↔ RangesAcceptable value ranges
○ SchedulesAutomated report schedules
○ UsersUser list and contacts
⇓ Export JSONView and download the final file
◇ Server APIExchange the config directly with one controller on your network

Mobile

On mobile the sidebar is hidden. Tap ☰ in the top-left to open it. It closes automatically when you select a section.

Sidebar footer buttons

ButtonAction
Theme (☀ / ☾)Cycle theme: auto → light → dark → auto
EN / RUSwitch interface language
CopyCopy current JSON to clipboard
DownloadDownload params.json to your computer
04

Import JSON

The Import JSON section lets you load an existing configuration file. Three methods are supported:

Method 1: drag and drop

1
Open the Import JSON section from the sidebar.
2
Drag your params.json from your computer into the dashed drop zone.
3
The zone highlights blue — release the file. The config loads automatically.

Method 2: file picker

1
Click the drop zone or the text inside it.
2
Your OS file dialog opens.
3
Select the file and click Open.

Method 3: paste JSON

1
Paste the file content into the «or paste JSON» field (Ctrl+V / Cmd+V).
2
Click Load JSON.
⚠
Required keys The file must contain all required keys: states, reports, users, rooms, types, ranges, params. If any are missing, a red error message will appear.
05

Devices & registers

The Devices section is the main working area. Each device is shown as a collapsible card. A summary at the top shows total devices, registers, rooms, and users.

Address format: HEX and DEC

Addresses are stored in hexadecimal. Switch the display between HEX and DEC using the toggle at the top of the section.

FormatExample
HEX0x08, 0x0003, 0x001c
DEC8, 3, 28
ℹ
Switching format changes display only. The JSON file always stores addresses in HEX.

Register columns

ColumnValueHow to change
RegisterRegister addressSet at creation only
RoomWhich room this register belongs toDropdown list
TypeSensor typeDropdown list
RangeAcceptable value rangeDropdown list
NotifyWho gets notified on range breachClick user chips (blue = selected)
✕Delete registerDelete button

Adding a register

1
Click + add register at the bottom of the device card. A modal dialog opens.
2
Select the address format (HEX or DEC) using the toggle inside the dialog.
3
Enter the register address. A preview shows how the address will be stored. Green = valid and unique. Red = error or duplicate.
4
Select room, sensor type, and range from the dropdowns.
5
Optionally select notification users by clicking the name chips.
6
Click Add.

Adding a device

1
Click + add device at the bottom of the section.
2
Select address format and enter the device address (1 byte: 0x00–0xFF / 0–255).
3
Click Add. Then add registers to the new device card.
⚠
Deleting a device Click ✕ in the device card header and confirm. This removes the device and all its registers. The action cannot be undone — reload the original file to restore.
06

Rooms

Rooms are human-readable names that help identify which physical location a sensor register belongs to.

ℹ
To delete a room, first reassign all registers that reference it in the Devices section.
07

Sensor types

A sensor type defines what a register measures. Each type has two fields:

FieldDescriptionExample
NamePhysical quantity nametemperature
SuffixUnit shown after the value °С, %, atm.
08

Ranges

A range sets the acceptable limits for a register. When a sensor value falls outside these limits, the system sends notifications to the selected users.

Each range has two optional fields: min and max. Leave a field blank to make the range one-sided:

FilledMeaning
min onlyAny value above min is acceptable
max onlyAny value below max is acceptable
BothValues between min and max are acceptable

Below the ranges, Repeated alarms sets how many minutes must pass before the same alarm for the same sensor is sent again (default 60). A "back to normal" message also waits that long after the last alarm, so a value hovering around a limit sends one SMS instead of many. 0 sends every change.

ℹ
Range indices (0, 1, 2…) are used as references in registers. Do not reorder ranges if registers are already configured without re-assigning them.
09

Report schedules

Schedules define the times of day when users receive automated reports on sensor status.

ℹ
Schedule #0 The first schedule (index 0) is reserved and means «no reports». It cannot be deleted. Users assigned to schedule #0 receive no automatic notifications.

Adding a send time

1
Open the schedule card (not #0).
2
Click + time.
3
A time picker appears: two dropdowns for hours (00–23) and minutes (00–59). Select the desired time.
✓
Always 24-hour format The time picker always uses 24-hour format (00:00 – 23:59) regardless of browser or OS locale settings.
10

Users

Users are contacts who receive notifications when sensor values go outside acceptable ranges.

FieldDescription
NameDisplay name (used in Devices section to select notification recipients)
PhonePhone number for SMS notifications
Report scheduleWhich report schedule applies to this user
11

Export JSON

The Export JSON section shows the current configuration as formatted JSON.

ButtonAction
CopyCopies JSON to clipboard. Button briefly shows «Copied!»
DownloadDownloads params.json to your computer

Both buttons are also available in the sidebar footer — accessible from any section without navigating here.

ℹ
Addresses in the exported file are always written in HEX format (e.g. 0x08), regardless of the display mode selected in the editor.
12

Controllers

A controller is one Raspberry Pi running ModbusGuard on site. It reports its live values to the server about every 30 seconds and takes its params.json from there, so you can change a config without visiting the site.

The Controllers section is shown only when you are signed in with a personal account.

Adding a controller

1
Click «+ add controller» and give it a name, for example the name of the site.
2
A token appears together with two ready lines: SERVER_URL and DEVICE_TOKEN. Copy them now — the token is shown only once.
3
On the Raspberry Pi, put the two lines into the .env file of the ModbusGuard service and restart the service.
4
Within a minute the controller is shown as online.
ℹ
First connection If the server has no config for the controller yet, the controller uploads the params.json it already runs. Nothing changes on site.

Reading a controller card

LabelMeaning
online / offlineWhether the controller has reported in the last two minutes. «never connected» means its token has not been used yet.
config appliedThe controller runs the latest config stored on the server.
update pendingA newer config is saved on the server and the controller has not applied it yet. It does so at its next report.
no config yetNothing is stored on the server for this controller.
in editorThe config of this controller is the one currently open in the editor.
v1, v2, …Number of the latest saved config. Every save creates a new version.

Buttons

ButtonAction
Open in editorLoad the config of the controller into the editor. All other sections then show and edit this config.
Save editor hereStore what is in the editor as the new config of this controller.
ValuesShow the last values the controller reported: value, state and how old each reading is.
RenameChange the name shown in the list.
New tokenIssue a new token. The old one stops working at once, so the Raspberry Pi must be given the new one.
DeleteRemove the controller and its stored configs. The device loses access to the server and keeps working with its local config.

Saving a config

While a controller is open in the editor, a «Save to …» button is shown in the topbar of every section. A dot on the button means there are changes not yet saved to the server.

The server checks the config before storing it. If something is wrong — for example a register refers to a deleted range — nothing is saved and the problems are listed. A saved config reaches the controller within a minute and is applied without a restart.

⚠
The server copy wins A connected controller always follows the config stored here. Changes made directly on the device are replaced at the next report, so edit the config in the configurator.
13

Server API

The Server API section lets you load config from a controller on your network and send it back without manual file transfers.

⚠
Direct connection only This section talks straight to one controller on your local network and does not use your account. Browsers block such requests from a page opened over HTTPS, so it works only when the configurator itself is opened over plain HTTP. A controller that is connected to the server refuses POST config. For everyday work use the Controllers section.

Connection settings

FieldDescriptionExample
Server addressAddress of the controller, with the port; the API path is added automaticallyhttp://192.168.1.100:8000
API KeySecret key sent as Bearer tokenmy-secret-key

Click 👁 next to the API Key field to show or hide the key. URL and key are saved to localStorage and restored on next open.

Buttons

ButtonMethodAction
GET configGETLoad config from server and apply it in the editor
POST configPOSTSend current config to server for storage

Status indicator

Idle
Waiting for action
Loading
Request in progress
Success
Operation completed
Error
Connection or auth problem
ℹ
Authorization All requests include Authorization: Bearer <key> header. If no key is set, the header is omitted. Make sure the key matches the API_KEY in the controller's .env file.
14

Theme & language

Theme

The theme button is in the sidebar footer. Cycles through:

ModeIconDescription
Auto☀ auto / ☾ autoFollows OS preference (light or dark)
Light☾Forced light theme
Dark☀Forced dark theme

Language

Click EN or RU in the sidebar footer. The interface switches immediately. The choice is saved in localStorage. On first open the language is determined by browser locale.

15

FAQ

Will my changes be lost on page refresh?

Yes. Config data is held in memory only and is not preserved between sessions. Always download the file or save it to the server before closing the tab.

Why can't I delete a room / type / range / user?

The item is used in one or more device registers. The warning modal lists all affected registers. Reassign those registers in the Devices section first, then retry deletion.

Why can't I delete a schedule?

The schedule is assigned to one or more users. The warning modal lists them. Reassign those users to a different schedule in the Users section first.

How do I enter address 0x0003 in DEC mode?

Enter 3. The editor automatically converts it to 0x0003 when saving.

I get a CORS error when connecting to the server

The server is not allowing requests from your origin. Ask the administrator to check the CORS_ORIGIN setting in the server's .env file. For development, CORS_ORIGIN=* allows all origins.

The Download button doesn't work

Make sure your browser is not blocking automatic downloads for this site. Allow downloads in browser settings. Alternatively, use the Copy button and paste the JSON into a text file manually.

Can I have multiple configs open at once?

Only in separate browser tabs. Each tab has its own independent config state.

How do I add a new device with no registers?

Use + add device, confirm, then the empty device card appears. Add registers to it with + add register.

What can I do as a guest?

Everything that happens in the browser: build a config, import a file, export or copy the result. Storing configs on the server, controllers and live values need a personal account, which your administrator creates.

A controller is shown as offline

It has not reported for two minutes. Check that the device has power and internet access, and that the token in its .env file is the current one — after «New token» the old one no longer works. The device keeps monitoring and sending SMS while it is offline.