ModbusGuard Configurator
Complete guide to the ModbusGuard web configurator: signing in, editing the params.json of your sensors, and managing controllers.
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.
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.
Signing in
The configurator opens with a sign-in screen. There are two kinds of access:
| Access | How to sign in | What you can do |
|---|---|---|
| Guest | Username guest, password guest (printed on the sign-in screen), or the «Sign in as guest» button | Edit, import and export a config in the browser. Nothing is stored on the server. |
| Personal account | Username and password issued by your administrator | Everything 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:
- Work with it directly — edit to suit your needs and export.
- Load your own file — go to Import JSON and upload an existing params.json.
- Open a controller — with a personal account, go to Controllers and click «Open in editor».
Saved preferences
The editor saves preferences in browser localStorage:
- Selected theme (dark / light / auto)
- Interface language (Russian / English)
- Address display format (HEX / DEC)
- Server URL and API key (Server API section)
Interface
Layout
| Zone | Description |
|---|---|
| Sidebar (left) | Section navigation, your username with a sign-out button, theme and language toggles, copy/download buttons |
| Topbar | Current 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
| Section | Purpose |
|---|---|
◉ Controllers | Your controllers: status, live values and stored configs (personal accounts only) |
⇑ Import JSON | Load a configuration file |
■ Devices | Manage devices and their registers |
◆ Rooms | Room list |
◆ Sensor types | Sensor types and units |
↔ Ranges | Acceptable value ranges |
○ Schedules | Automated report schedules |
○ Users | User list and contacts |
⇓ Export JSON | View and download the final file |
◇ Server API | Exchange 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
| Button | Action |
|---|---|
| Theme (☀ / ☾) | Cycle theme: auto → light → dark → auto |
| EN / RU | Switch interface language |
| Copy | Copy current JSON to clipboard |
| Download | Download params.json to your computer |
Import JSON
The Import JSON section lets you load an existing configuration file. Three methods are supported:
Method 1: drag and drop
params.json from your computer into the dashed drop zone.Method 2: file picker
Method 3: paste JSON
states, reports, users, rooms, types, ranges, params. If any are missing, a red error message will appear.
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.
| Format | Example |
|---|---|
| HEX | 0x08, 0x0003, 0x001c |
| DEC | 8, 3, 28 |
Register columns
| Column | Value | How to change |
|---|---|---|
| Register | Register address | Set at creation only |
| Room | Which room this register belongs to | Dropdown list |
| Type | Sensor type | Dropdown list |
| Range | Acceptable value range | Dropdown list |
| Notify | Who gets notified on range breach | Click user chips (blue = selected) |
| ✕ | Delete register | Delete button |
Adding a register
Adding a device
Rooms
Rooms are human-readable names that help identify which physical location a sensor register belongs to.
- Edit — click any name field and type the new value.
- Add — click + add room; a new empty row appears.
- Delete — click ✕. If the room is used by any register, deletion is blocked and a warning lists the affected registers.
Sensor types
A sensor type defines what a register measures. Each type has two fields:
| Field | Description | Example |
|---|---|---|
| Name | Physical quantity name | temperature |
| Suffix | Unit shown after the value | °С, %, atm. |
- Edit — click either field and type.
- Add — click + add type.
- Delete — click ✕. Blocked if used by any register.
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:
| Filled | Meaning |
|---|---|
| min only | Any value above min is acceptable |
| max only | Any value below max is acceptable |
| Both | Values between min and max are acceptable |
- Edit — click min or max and enter a number (decimals like 23.5 are allowed). Clear the field to remove a limit.
- Add — click + add range.
- Delete — click ✕. Blocked if used by any register.
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.
Report schedules
Schedules define the times of day when users receive automated reports on sensor status.
Adding a send time
- Edit time — click the hours or minutes dropdown directly in the pill.
- Delete time — click ✕ next to the time picker.
- Add schedule — click + add schedule at the bottom. Starts with 09:00.
- Delete schedule — click ✕ in the card header. Blocked if any users are assigned to it.
Users
Users are contacts who receive notifications when sensor values go outside acceptable ranges.
| Field | Description |
|---|---|
| Name | Display name (used in Devices section to select notification recipients) |
| Phone | Phone number for SMS notifications |
| Report schedule | Which report schedule applies to this user |
- Edit — click the Name or Phone field. The avatar initials update automatically when the name changes.
- Add — click + add user.
- Delete — click ✕. Blocked if the user is assigned as a notification recipient in any register.
- Assign schedule — use the Report schedule dropdown in the user card.
Export JSON
The Export JSON section shows the current configuration as formatted JSON.
| Button | Action |
|---|---|
| Copy | Copies JSON to clipboard. Button briefly shows «Copied!» |
| Download | Downloads params.json to your computer |
Both buttons are also available in the sidebar footer — accessible from any section without navigating here.
0x08), regardless of the display mode selected in the editor.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
Reading a controller card
| Label | Meaning |
|---|---|
| online / offline | Whether the controller has reported in the last two minutes. «never connected» means its token has not been used yet. |
| config applied | The controller runs the latest config stored on the server. |
| update pending | A newer config is saved on the server and the controller has not applied it yet. It does so at its next report. |
| no config yet | Nothing is stored on the server for this controller. |
| in editor | The 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
| Button | Action |
|---|---|
| Open in editor | Load the config of the controller into the editor. All other sections then show and edit this config. |
| Save editor here | Store what is in the editor as the new config of this controller. |
| Values | Show the last values the controller reported: value, state and how old each reading is. |
| Rename | Change the name shown in the list. |
| New token | Issue a new token. The old one stops working at once, so the Raspberry Pi must be given the new one. |
| Delete | Remove 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.
Server API
The Server API section lets you load config from a controller on your network and send it back without manual file transfers.
Connection settings
| Field | Description | Example |
|---|---|---|
| Server address | Address of the controller, with the port; the API path is added automatically | http://192.168.1.100:8000 |
| API Key | Secret key sent as Bearer token | my-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
| Button | Method | Action |
|---|---|---|
| GET config | GET | Load config from server and apply it in the editor |
| POST config | POST | Send current config to server for storage |
Status indicator
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.Theme & language
Theme
The theme button is in the sidebar footer. Cycles through:
| Mode | Icon | Description |
|---|---|---|
| Auto | ☀ auto / ☾ auto | Follows 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.
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.