System Information
Ta treść nie jest jeszcze dostępna w Twoim języku.
Physical Device Identification
Section titled “Physical Device Identification”Returns unique information about the current device, including model, firmware version, MAC address, and public key.
GET /api/identify/
Access Level: 🟨 1
Response:
| Field | Type | Description |
|---|---|---|
manufacturer | string | Device manufacturer. |
device | string | Device model name. |
deviceId | integer | Device identifier. |
firmwareType | integer | Firmware type (e.g., basic, extended, etc.). |
firmwareVer | integer | Firmware version. |
releaseDate | string | Release date and time in ISO 8601 format. |
mac | string | Ethernet interface MAC address. |
uniqueMac | boolean | Flag indicating if the device MAC address is unique. |
pubKey | string | Device public key for cryptographic authentication. |
Example Response:
{ "manufacturer": "Novatek-Electro Ltd.", "device": "MC-251", "deviceId": 46, "firmwareType": 1, "firmwareVer": 46, "releaseDate": "2025-05-26T00:00:00", "mac": "d8:80:39:69:0e:6d", "uniqueMac": true, "pubKey": "WB2dxH7Jk+tmW2TDwOmWxtBKjkKf4siJi42bDyCLLXQ="}Firmware Version
Section titled “Firmware Version”GET /api/version/
Access Level: 🟩 0
Response:
| Field | Type | Description |
|---|---|---|
device | string | Manufacturer’s device model. |
deviceId | integer | Manufacturer’s device identifier. |
firmwareType | integer | Firmware modification. |
firmwareVer | integer | Firmware version. |
releaseDate | string | Release date and time in ISO 8601 format. |
Example Response:
{ "device": "MC-251", "deviceId": 46, "firmwareType": 1, "firmwareVer": 46, "releaseDate": "2025-05-14T00:00:00"}Get Device State
Section titled “Get Device State”Retrieves the current state of the device by key (or all states).
GET /api/state/get/?key&...
Access Level: 🟨 1
Available Keys:
ethernet: Ethernet interface stategsm: GSM interface statevpn: VPN interface statembTcpCallback: Modbus TCP cloud connection stateactivation: Device activation statefwUpdate: Update statembTcpServer: TCP server statembTcpClients: TCP client stateinputs: Inputs stateoutputs: Outputs statestatistics: General statisticsmemTaskfiles: Task files statememCard: SD card statesettings: Settings statetime: Device timemisc: Miscellaneous states
ethernet
Section titled “ethernet”Returns information about the current Ethernet connection state.
Response Fields:
| Field | Type | Description |
|---|---|---|
ip | string / null | Current IP address assigned to the device, or null if not assigned. |
mac | string | Ethernet interface MAC address. |
linkUp | boolean | Indicates if there is an active link. |
Returns information about the current GSM module state.
Response Fields:
| Field | Type | Description |
|---|---|---|
signalLevel | integer / null | GSM signal level in %, or null if GSM is not connected. |
ip | string / null | IP address assigned to the GSM interface, or null if not assigned. |
imei | string / null | Modem IMEI, or null if undefined. |
simState | integer | SIM card state: 0 — not inserted, 1 — inserted and active. |
pinState | integer | PIN code state: |
0 - Unknown state; | ||
1 - PIN not required; | ||
2 - PIN required, attempts unknown; | ||
3 - PIN required, 0 attempts left; | ||
4 - PIN required, 1 attempt left; | ||
5 - PIN required, 2 attempts left; | ||
6 - PIN required, 3 attempts left; | ||
7 - PIN required, >3 attempts left; | ||
8 - Other auth required (PUK, etc.). | ||
ccid | string / null | SIM card CCID, or null if undefined. |
provider | string / null | SIM card operator name, or null if undefined. |
radioBand | string / null | GSM standard: 2g, 3g, 4g, or null if undefined. |
isTcpIpBusy | boolean | Indicates if the GSM interface TCP/IP stack is busy. |
isGsmRegistered | boolean | Indicates registration in the operator’s network. |
isGsmRoaming | boolean | Indicates roaming status. |
isGprsStarted | boolean | Indicates active GPRS connection. |
traficTotal | integer | Total data transferred via GSM interface (in bytes). |
Returns information about the current VPN (WireGuard) connection state.
Response Fields:
| Field | Type | Description |
|---|---|---|
linkState | string | Connection state: |
disabled - VPN disabled in settings; | ||
netifCreated - Network interface created; | ||
peerConfigured - Peer connection configured; | ||
peerConnected - Connection to peer established; | ||
peerUp - VPN tunnel is up and running. | ||
configServerReached | boolean / null | Configuration server availability. |
lastPeerUp | string / null | Time of last peer connection (ISO 8601), or null. |
netifIp | string / null | VPN interface IP address, or null. |
netifMask | string / null | VPN interface subnet mask, or null. |
peerIp | string / null | Remote peer IP address, or null. |
peerPort | integer | Remote peer port. |
interface | string / null | Connection interface: eth, gsm, or null. |
configState | string | Configuration state: |
errorKey - Error: invalid key; | ||
errorMem - Error: insufficient memory; | ||
disabled - VPN disabled in settings; | ||
pause - Delay between configuration attempts; | ||
serverHostnameResolving - Resolving config server hostname; | ||
serverConnecting - Connecting to config server; | ||
serverConnected - Connected, receiving peer config; | ||
peerHostnameResolving - Resolving peer hostname; | ||
ready - Configuration received and ready. | ||
ownPubKey | string | Device’s own public key. |
mbTcpCallback
Section titled “mbTcpCallback”Modbus TCP cloud connection state.
Response Fields:
| Field | Type | Description |
|---|---|---|
state | string | Current connection state (disabled, waiting, connecting, connected). |
waitingTimeSec | integer / null | Time waiting for connection, in seconds. |
interface | string / null | Connection interface: eth, gsm, wg, or null. |
remoteIp | string / null | Server IP address, or null. |
remotePort | integer | Server remote port. |
connectionTimeSec | integer | Time since connection established, in seconds. |
idleTimeSec | integer | Connection idle time, in seconds. |
activationWithCode | string / null | Activation state: |
unused - Device has not received activation code; | ||
activated - Device is activated and bound to network; | ||
set - Device received code and awaits binding; | ||
null - No connection or error. | ||
activationCode | string | 8-digit device activation code. |
activation
Section titled “activation”Returns information about the current device activation state.
Response Fields:
| Field | Type | Description |
|---|---|---|
infrastructureName | string | Infrastructure name. |
infrastructureShortUrl | string | Short URL to infrastructure site. |
domain | string | Server address used for activation. |
endpointId | string | Unique device identifier. |
endpointName | string | Device name. |
propertyId | string | Organization identifier. |
propertyName | string | Organization name. |
pin | string | 8-digit device PIN code. |
hasBonusesEur | string | Bonus amount on organization account. |
activeTill | string / null | Activation expiration date (ISO 8601), or null if expired. |
supportEmail | string | Support service email. |
fwUpdate
Section titled “fwUpdate”Firmware update process state.
Response Fields:
| Field | Type | Description |
|---|---|---|
updateState | string | Update state: |
SAVED_FILE_UNKNOWN - Update file not found; | ||
CARD_ABSENT - SD card not installed; | ||
CARD_NOT_READY - SD card not ready; | ||
CARD_FILES_CHECKING - Checking update files on SD card; | ||
CARD_FILE_UPDATED_READY - Update file on SD card ready; | ||
FILE_VERSION_MATCHES_ACTIVE - File version matches current. | ||
downloadState | string | Download state: |
SERVER_FILE_UNKNOWN - File on server not determined; | ||
DOWNLOADER_BUSY - Downloader busy; | ||
CARD_ABSENT - SD card not installed; | ||
CARD_NOT_READY - SD card not ready; | ||
CARD_FILES_CHECKING - Checking files on SD card; | ||
SERVER_FILE_UPDATED_READY - File on server ready for download; | ||
SERVER_FILE_DOWNLOADING - Downloading file; | ||
DOWNLOADED_FILE_CHECKING_INTEGRITY - Checking integrity; | ||
DOWNLOADED_FILE_CHECKING_APPLICABILITY - Checking compatibility; | ||
DOWNLOADED_FILE_SAVING - Saving file to SD card; | ||
SERVER_FILE_VERSION_MATCHES_SAVED - Server version matches saved. | ||
url | string / null | Firmware file URL or null. |
progress | string / null | Download progress percentage (0.00 – 100.00) or null. |
errorCode | string / null | Error code if any, or null. Common codes: |
ERROR_FR_DISK_ERR - Low-level disk error; | ||
ERROR_FR_INT_ERR - Internal file system error; | ||
ERROR_FR_NOT_READY - Media not ready; | ||
ERROR_FR_NO_FILE - File not found; | ||
ERROR_FR_DENIED - Access denied; | ||
ERROR_FR_EXIST - File already exists; | ||
ERROR_FR_WRITE_PROTECTED - Write protected; | ||
ERROR_FR_NOT_ENOUGH_CORE - Not enough memory; | ||
ERROR_HTTP_RESPONSE - General HTTP error; | ||
ERROR_CONNECT - TCP connection error; | ||
ERROR_RESPONSE_TIMEOUT - Server timeout. | ||
availableVersion | integer / null | Firmware version available for download, or null. |
savedVersion | integer / null | Firmware version saved on SD card, or null. |
currentVersion | integer | Currently installed firmware version. |
mbTcpServer
Section titled “mbTcpServer”List of active Modbus TCP server connections.
Response Fields:
| Field | Type | Description |
|---|---|---|
isActive | boolean | Indicates if the server is running. |
listenPortEth | integer | Port for Ethernet clients. |
listenPortGsm | integer | Port for GSM clients. |
clients | array | Array of client objects (interface, remoteIp, remotePort, etc.). |
mbTcpClients
Section titled “mbTcpClients”State of Modbus TCP clients.
Response Fields:
| Field | Type | Description |
|---|---|---|
state | string | Current state (waiting, connected, connecting). |
waitingTimeSec | integer / null | Time waiting for connection, in seconds. |
interface | string / null | Connection interface. |
remoteIp | string | Client IP address. |
remotePort | integer | Client remote port. |
connectionTimeSec | integer | Time since connection established, in seconds. |
idleTimeSec | integer | Connection idle time, in seconds. |
inputs
Section titled “inputs”Example Request:
GET /api/state/get/?inputs
Example Response:
{ "inputs": { // TODO: Not implemented }}outputs
Section titled “outputs”Example Request:
GET /api/state/get/?outputs
Example Response:
{ "outputs": { // TODO: Not implemented }}statistics
Section titled “statistics”Device operation statistics.
Response Fields:
| Field | Type | Description |
|---|---|---|
serialAvgPerSecReq | integer | Average RS-485 request rate (req/sec). |
serialAvgPerSecResp | integer | Average RS-485 response rate (resp/sec). |
serialAvgPerSecLoad | integer | Average RS-485 load (%/sec). |
mbAvgPerSecReq | integer | Average Modbus request rate (req/sec). |
ethAvgPerSecKb | string | Average Ethernet data rate (KB/sec). |
gsmAvgPerSecKb | string | Average GSM data rate (KB/sec). |
mbTcpServerMaxClients | integer | Maximum number of clients on Modbus TCP server. |
runTimeMin | integer | Uptime since last reboot (minutes). |
totalRunTimeMin | integer | Total device uptime (minutes). |
memTaskfiles
Section titled “memTaskfiles”Example Request:
GET /api/state/get/?memTaskfiles
Example Response:
{ "memTaskfiles": { // TODO: Not implemented }}memCard
Section titled “memCard”SD card state information.
Response Fields:
| Field | Type | Description |
|---|---|---|
capacityKb | integer / null | Total SD card capacity in KB, or null. |
freeKb | integer / null | Free space on SD card in KB, or null. |
isMounted | boolean | Mount status (true — mounted). |
isInserted | boolean | Insertion status (true — inserted). |
settings
Section titled “settings”Settings state information.
Response Fields:
| Field | Type | Description |
|---|---|---|
modifyOn | string / null | Last settings modification time (ISO 8601), or null. |
isUserModified | boolean | Indicates if settings are modified but not applied. |
isDefault | boolean | Indicates if current settings are defaults. |
Current device time information.
Response Fields:
| Field | Type | Description |
|---|---|---|
timeLocal | integer | Current local time (ISO 8601). |
timeUtc | integer | Current UTC time (ISO 8601). |
isDst | boolean | DST flag. |
sunriseLocalSec | integer / null | Sunrise time in seconds from start of day, or null. |
sunsetLocalSec | integer / null | Sunset time in seconds from start of day, or null. |
polarDay | boolean | Indicates polar day. |
polarNight | boolean | Indicates polar night. |
Additional diagnostic data.
Response Fields:
| Field | Type | Description |
|---|---|---|
voltage | string / null | Current supply voltage, or null. |
temperature | string / null | Current temperature in Celsius, or null. |