Sensor Config Editor
Complete guide to configuring and managing sensor parameters using the web-based params.json editor.
Introduction
Sensor Config Editor 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
Open index.html in your browser (Chrome, Firefox, Edge, Safari) or go to the address provided by your administrator. No additional installation is needed.
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.
- Fetch from server — go to Server API and click GET config.
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, copy/download buttons, theme and language toggles |
| Topbar | Current section name, summary (devices · registers · users) |
| Work area (right) | Current section content — cards, tables, forms |
Navigation sections
| Section | Purpose |
|---|---|
⇑ 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 | Push/pull config via HTTP |
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.
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.Server API
The Server API section lets you load config from a remote server and save it back without manual file transfers.
Connection settings
| Field | Description | Example |
|---|---|---|
| Server URL | Full API endpoint address | http://192.168.1.100:8000/api/config |
| 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 server'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 push 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.