Przejdź do głównej zawartości

System Information

Ta treść nie jest jeszcze dostępna w Twoim języku.

Returns unique information about the current device, including model, firmware version, MAC address, and public key.

GET /api/identify/

Access Level: 🟨 1

Response:

FieldTypeDescription
manufacturerstringDevice manufacturer.
devicestringDevice model name.
deviceIdintegerDevice identifier.
firmwareTypeintegerFirmware type (e.g., basic, extended, etc.).
firmwareVerintegerFirmware version.
releaseDatestringRelease date and time in ISO 8601 format.
macstringEthernet interface MAC address.
uniqueMacbooleanFlag indicating if the device MAC address is unique.
pubKeystringDevice 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="
}

GET /api/version/

Access Level: 🟩 0

Response:

FieldTypeDescription
devicestringManufacturer’s device model.
deviceIdintegerManufacturer’s device identifier.
firmwareTypeintegerFirmware modification.
firmwareVerintegerFirmware version.
releaseDatestringRelease date and time in ISO 8601 format.

Example Response:

{
"device": "MC-251",
"deviceId": 46,
"firmwareType": 1,
"firmwareVer": 46,
"releaseDate": "2025-05-14T00:00:00"
}

Retrieves the current state of the device by key (or all states).

GET /api/state/get/?key&...

Access Level: 🟨 1

Available Keys:

Returns information about the current Ethernet connection state.

Response Fields:

FieldTypeDescription
ipstring / nullCurrent IP address assigned to the device, or null if not assigned.
macstringEthernet interface MAC address.
linkUpbooleanIndicates if there is an active link.

Returns information about the current GSM module state.

Response Fields:

FieldTypeDescription
signalLevelinteger / nullGSM signal level in %, or null if GSM is not connected.
ipstring / nullIP address assigned to the GSM interface, or null if not assigned.
imeistring / nullModem IMEI, or null if undefined.
simStateintegerSIM card state: 0 — not inserted, 1 — inserted and active.
pinStateintegerPIN 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.).
ccidstring / nullSIM card CCID, or null if undefined.
providerstring / nullSIM card operator name, or null if undefined.
radioBandstring / nullGSM standard: 2g, 3g, 4g, or null if undefined.
isTcpIpBusybooleanIndicates if the GSM interface TCP/IP stack is busy.
isGsmRegisteredbooleanIndicates registration in the operator’s network.
isGsmRoamingbooleanIndicates roaming status.
isGprsStartedbooleanIndicates active GPRS connection.
traficTotalintegerTotal data transferred via GSM interface (in bytes).

Returns information about the current VPN (WireGuard) connection state.

Response Fields:

FieldTypeDescription
linkStatestringConnection 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.
configServerReachedboolean / nullConfiguration server availability.
lastPeerUpstring / nullTime of last peer connection (ISO 8601), or null.
netifIpstring / nullVPN interface IP address, or null.
netifMaskstring / nullVPN interface subnet mask, or null.
peerIpstring / nullRemote peer IP address, or null.
peerPortintegerRemote peer port.
interfacestring / nullConnection interface: eth, gsm, or null.
configStatestringConfiguration 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.
ownPubKeystringDevice’s own public key.

Modbus TCP cloud connection state.

Response Fields:

FieldTypeDescription
statestringCurrent connection state (disabled, waiting, connecting, connected).
waitingTimeSecinteger / nullTime waiting for connection, in seconds.
interfacestring / nullConnection interface: eth, gsm, wg, or null.
remoteIpstring / nullServer IP address, or null.
remotePortintegerServer remote port.
connectionTimeSecintegerTime since connection established, in seconds.
idleTimeSecintegerConnection idle time, in seconds.
activationWithCodestring / nullActivation 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.
activationCodestring8-digit device activation code.

Returns information about the current device activation state.

Response Fields:

FieldTypeDescription
infrastructureNamestringInfrastructure name.
infrastructureShortUrlstringShort URL to infrastructure site.
domainstringServer address used for activation.
endpointIdstringUnique device identifier.
endpointNamestringDevice name.
propertyIdstringOrganization identifier.
propertyNamestringOrganization name.
pinstring8-digit device PIN code.
hasBonusesEurstringBonus amount on organization account.
activeTillstring / nullActivation expiration date (ISO 8601), or null if expired.
supportEmailstringSupport service email.

Firmware update process state.

Response Fields:

FieldTypeDescription
updateStatestringUpdate 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.
downloadStatestringDownload 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.
urlstring / nullFirmware file URL or null.
progressstring / nullDownload progress percentage (0.00100.00) or null.
errorCodestring / nullError 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.
availableVersioninteger / nullFirmware version available for download, or null.
savedVersioninteger / nullFirmware version saved on SD card, or null.
currentVersionintegerCurrently installed firmware version.

List of active Modbus TCP server connections.

Response Fields:

FieldTypeDescription
isActivebooleanIndicates if the server is running.
listenPortEthintegerPort for Ethernet clients.
listenPortGsmintegerPort for GSM clients.
clientsarrayArray of client objects (interface, remoteIp, remotePort, etc.).

State of Modbus TCP clients.

Response Fields:

FieldTypeDescription
statestringCurrent state (waiting, connected, connecting).
waitingTimeSecinteger / nullTime waiting for connection, in seconds.
interfacestring / nullConnection interface.
remoteIpstringClient IP address.
remotePortintegerClient remote port.
connectionTimeSecintegerTime since connection established, in seconds.
idleTimeSecintegerConnection idle time, in seconds.

Example Request:

GET /api/state/get/?inputs

Example Response:

{
"inputs": {
// TODO: Not implemented
}
}

Example Request:

GET /api/state/get/?outputs

Example Response:

{
"outputs": {
// TODO: Not implemented
}
}

Device operation statistics.

Response Fields:

FieldTypeDescription
serialAvgPerSecReqintegerAverage RS-485 request rate (req/sec).
serialAvgPerSecRespintegerAverage RS-485 response rate (resp/sec).
serialAvgPerSecLoadintegerAverage RS-485 load (%/sec).
mbAvgPerSecReqintegerAverage Modbus request rate (req/sec).
ethAvgPerSecKbstringAverage Ethernet data rate (KB/sec).
gsmAvgPerSecKbstringAverage GSM data rate (KB/sec).
mbTcpServerMaxClientsintegerMaximum number of clients on Modbus TCP server.
runTimeMinintegerUptime since last reboot (minutes).
totalRunTimeMinintegerTotal device uptime (minutes).

Example Request:

GET /api/state/get/?memTaskfiles

Example Response:

{
"memTaskfiles": {
// TODO: Not implemented
}
}

SD card state information.

Response Fields:

FieldTypeDescription
capacityKbinteger / nullTotal SD card capacity in KB, or null.
freeKbinteger / nullFree space on SD card in KB, or null.
isMountedbooleanMount status (true — mounted).
isInsertedbooleanInsertion status (true — inserted).

Settings state information.

Response Fields:

FieldTypeDescription
modifyOnstring / nullLast settings modification time (ISO 8601), or null.
isUserModifiedbooleanIndicates if settings are modified but not applied.
isDefaultbooleanIndicates if current settings are defaults.

Current device time information.

Response Fields:

FieldTypeDescription
timeLocalintegerCurrent local time (ISO 8601).
timeUtcintegerCurrent UTC time (ISO 8601).
isDstbooleanDST flag.
sunriseLocalSecinteger / nullSunrise time in seconds from start of day, or null.
sunsetLocalSecinteger / nullSunset time in seconds from start of day, or null.
polarDaybooleanIndicates polar day.
polarNightbooleanIndicates polar night.

Additional diagnostic data.

Response Fields:

FieldTypeDescription
voltagestring / nullCurrent supply voltage, or null.
temperaturestring / nullCurrent temperature in Celsius, or null.