Skip to content

Daemon API v2.7.x (beta)

WebSocket authentication

As of version 2.7, clients are required to authenticate before using the Daemon JSON API via WebSocket. New client sessions are expected to authenticate within configurable time period, otherwise the connection is terminated by the server with policy error code (1008). The server expects authentication request to be the first message sent by client after establishing connection.

Clients can authenticate their session via special authentication API messages below.

Note that authentication is required when connecting directly to the WebSocket server, if you are using the IQRF Gateway Webapp user interface, the application handles session authentication for users upon singing in.

Authentication request

The authentication request message is a JSON request in the following format:

json
{
	"type": "auth",
	"token": "<YOUR_API_TOKEN>"
}

Authentication response

In case of successful authentication, the server responds with a message confirming authentication, and includes expiration time of the session and whether the used API key has sufficient permissions for use of service mode API.

json
{
	"type": "auth_success",
	"expiration": "2026-06-29T12:20:02.188Z",
	"service": false
}

If on the other hand, the authentication fails, the server responds with an authentication failure message, informing the client of the authentication failure reason via a code and short message, and the connection is terminated with policy error code (1008).

json
{
	"type": "auth_error",
	"code": 4,
	"error": "Invalid token"
}

Authentication error codes

Below is a table of authentication error codes and their meaning.

CodeError stringDescription
1UnauthenticatedClient sent a non-authentication message after connecting.
2Authentication timeoutClient failed to send authentication message in time.
3Authentication failedAuthentication could not be performed. Currently only used if the server receives a mangled, non-JSON message.
4Invalid tokenThe token used for authentication is not in a valid format, or the token record does not exist.
5Expired tokenThe token used for authentication has already expired.
6Revoked tokenThe token used for authentication has been revoked.

General message error

If a request fails before reaching its handler, the Daemon replies with the generic messageError (mType) response. The rsp object containts additional properties to further clarify the error.

Message error status codes

CodeMessageDescription
1An error has occurred while handling request.A general, further unspecified, unexpected error occurred while handling the request.
2Failed to parse JSON message.Received message is not a valid JSON object. The specifics of the failure are described by the error and offset properties of the rsp object.
3mType missing in JSON message.The received message does not contain $.mType property, and as such is not recognized, and cannot be handled.
4Failed to validate JSON message contents.The received message contents are not valid against the respective JSONSchema. The error property of the rsp object specifies schema validation.
5Management queue is not initialized.Management message queue is not active and cannot process incoming management messages.
6Management queue is full.Management queue is at capacity, and cannot process the new incoming message.
7Network queue is not initialized.Management message queue is not active and cannot process incoming management messages.
8Network queue is full.Management queue is at capacity, and cannot process the new incoming message. The capacity property of the rsp object specifies the queue capacity.
9Unexpected auth message.This response is sent if a client attempts to authenticate an already authenticated WebSocket session.

IQRF Generic

Generic messages are able to handle any DPA packet. See the IQRF Standard section for status code details.

Raw iqrfRaw

SchemaExample

RawHdp iqrfRawHdp

SchemaExample

IQRF Standard

Standard messages have been designed according to IQRF Standard and DPA protocol.

Status codes

Status codes between 0 and 255 are based on the DPA framework, status codes from 32 to 63 are reserved for implementations of user peripherals. Asynchronous responses are marked by bit 7 set to 1. Negative status codes represent issues occurring during communication with the IQRF interfaces. For more details about each of the messages, click the DPA doc badge to view the corresponding DPA peripheral command page.
CodeMessageDescription
0okRequest has been handled successfully.
1ERROR_FAILGeneral failure code representing further unspecified issues.
2ERROR_PCMDThe peripheral does not support the specified command.
3ERROR_PNUMThe specified peripheral is not supported or the peripheral does not support the specified command.
4ERROR_ADDRIncorrect address parameter. The address may be out of range.
5ERROR_DATA_LENThe number of request data bytes is not correct for specified peripheral command.
6ERROR_DATAThe request message data is not valid for the specified peripheral command. This usually translates to value being out of range of accepted values.
7ERROR_HWPIDThe specified HWPID does not correspond to an HWPID of the device.
8ERROR_NADRThe specified node address does not corresponding to a bonded node.
9ERROR_IFACE_CUSTOM_HANDLERData from interface consumed by Custom DPA Handler.
10ERROR_MISSING_CUSTOM_DPA_HANDLERCustom DPA handler is enabled in transciever configuration, but there is no handler loaded in the device.
255STATUS_CONFIRMATIONThis code is returned when only a confirmation is received, for example when a message is sent via broadcast.
-1ERROR_TIMEOUTNo response was received within timeout.
-8ERROR_IFACE_EXCLUSIVE_ACCESSThe request could not be handled due to exclusive access not being available.

Binary output


Enumerate iqrfBinaryoutput_EnumerateIQRF Standard doc

SchemaExample

Set output iqrfBinaryoutput_SetOutputIQRF Standard doc

SchemaExample

Light


Set Voltage of lighting analog interface (LAI) iqrfLight_SetLaiIQRF Standard doc

SchemaExample

Send LDI commands and returns answers synchronously iqrfLight_SendLdiCommandsIQRF Standard doc

SchemaExample

Send LDI commands and returns answers asynchronously iqrfLight_SendLdiCommandsAsyncIQRF Standard doc

SchemaExample

Read Voltage of lighting analog interface (LAI) using FRC iqrfLight_FrcLaiReadIQRF Standard doc

SchemaExample

Execute LDI command using FRC iqrfLight_FrcLdiSendIQRF Standard doc

SchemaExample

Sensor


Enumerate iqrfSensor_EnumerateIQRF Standard doc

SchemaExample

Read sensors with types iqrfSensor_ReadSensorsWithTypesIQRF Standard doc

SchemaExample

FRC iqrfSensor_FrcIQRF Standard doc

SchemaExample

Embed Explore


Enumerate iqrfEmbedExplore_EnumerateDPA doc

SchemaExample

Peripheral information iqrfEmbedExplore_PeripheralInformationDPA doc

SchemaExample

More peripheral information iqrfEmbedExplore_MorePeripheralsInformationDPA doc

SchemaExample

Embed Coordinator


Address information iqrfEmbedCoordinator_AddrInfoDPA doc

SchemaExample

Get discovered devices iqrfEmbedCoordinator_DiscoveredDevicesDPA doc

SchemaExample

Get bonded devices iqrfEmbedCoordinator_BondedDevicesDPA doc

SchemaExample

Clear all bonds iqrfEmbedCoordinator_ClearAllBondsDPA doc

SchemaExample

Bond node iqrfEmbedCoordinator_BondNodeDPA doc

SchemaExample

Remove bond iqrfEmbedCoordinator_RemoveBondDPA doc

SchemaExample

Discovery iqrfEmbedCoordinator_DiscoveryDPA doc

SchemaExample

Set DPA parameters iqrfEmbedCoordinator_SetDpaParamsDPA doc

SchemaExample

Set hops iqrfEmbedCoordinator_SetHopsDPA doc

SchemaExample

Backup iqrfEmbedCoordinator_BackupDPA doc

SchemaExample

Restore iqrfEmbedCoordinator_RestoreDPA doc

SchemaExample

Authorize bond iqrfEmbedCoordinator_AuthorizeBondDPA doc

SchemaExample

SmartConnect iqrfEmbedCoordinator_SmartConnectDPA doc

SchemaExample

Set MID iqrfEmbedCoordinator_SetMIDDPA doc

SchemaExample

Embed Node


Read iqrfEmbedNode_ReadDPA doc

SchemaExample

Remove bond iqrfEmbedNode_RemoveBondDPA doc

SchemaExample

Backup iqrfEmbedNode_BackupDPA doc

SchemaExample

Restore iqrfEmbedNode_RestoreDPA doc

SchemaExample

Validate bonds iqrfEmbedNode_ValidateBondsDPA doc

SchemaExample

Embed OS


Read iqrfEmbedOs_ReadDPA doc

SchemaExample

Batch iqrfEmbedOs_BatchDPA doc

SchemaExample

Selective batch iqrfEmbedOs_SelectiveBatchDPA doc

SchemaExample

Reset iqrfEmbedOs_ResetDPA doc

SchemaExample

Restart iqrfEmbedOs_RestartDPA doc

SchemaExample

Run RFPGM iqrfEmbedOs_RfpgmDPA doc

SchemaExample

Set security iqrfEmbedOs_SetSecurityDPA doc

SchemaExample

Sleep iqrfEmbedOs_SleepDPA doc

SchemaExample

Load code iqrfEmbedOs_LoadCodeDPA doc

SchemaExample

Read configuration iqrfEmbedOs_ReadCfgDPA doc

SchemaExample

Write configuration iqrfEmbedOs_WriteCfgDPA doc

SchemaExample

Write configuration byte iqrfEmbedOs_WriteCfgByteDPA doc

SchemaExample

Test RF signal iqrfEmbedOs_TestRfSignalDPA doc

SchemaExample

Factory settings iqrfEmbedOs_FactorySettingsDPA doc

SchemaExample

Indicate iqrfEmbedOs_IndicateDPA doc

SchemaExample

Embed EEPROM


Read iqrfEmbedEeprom_ReadDPA doc

SchemaExample

Write iqrfEmbedEeprom_WriteDPA doc

SchemaExample

Embed EEEPROM


Read iqrfEmbedEeeprom_ReadDPA doc

SchemaExample

Write iqrfEmbedEeeprom_WriteDPA doc

SchemaExample

Embed RAM


Read iqrfEmbedRam_ReadDPA doc

SchemaExample

Write iqrfEmbedRam_WriteDPA doc

SchemaExample

Embed SPI Removed in DPA v4.15.0


Write and read iqrfEmbedSpi_WriteReadDPA docRemoved in DPA v4.15.0

SchemaExample

Embed LEDR


Set iqrfEmbedLedr_SetDPA doc

SchemaExample

SetOff iqrfEmbedLedr_SetOffDPA doc

SchemaExample

SetOn iqrfEmbedLedr_SetOnDPA doc

SchemaExample

Get iqrfEmbedLedr_GetRemoved in DPA v3.0.3

SchemaExample

Pulse iqrfEmbedLedr_PulseDPA doc

SchemaExample

Flashing iqrfEmbedLedr_FlashingDPA doc

SchemaExample

Embed LEDG


Set iqrfEmbedLedg_SetDPA doc

SchemaExample

SetOff iqrfEmbedLedg_SetOffDPA doc

SchemaExample

SetOn iqrfEmbedLedg_SetOnDPA doc

SchemaExample

Get iqrfEmbedLedg_GetRemoved in DPA v3.0.3

SchemaExample

Pulse iqrfEmbedLedg_PulseDPA doc

SchemaExample

Flashing iqrfEmbedLedg_FlashingDPA doc

SchemaExample

Embed IO


Direction iqrfEmbedIo_DirectionDPA doc

SchemaExample

Set iqrfEmbedIo_SetDPA doc

SchemaExample

Get iqrfEmbedIo_GetDPA doc

SchemaExample

Embed Thermometer


Read iqrfEmbedThermometer_ReadDPA doc

SchemaExample

Embed UART


Open iqrfEmbedUart_OpenDPA doc

SchemaExample

Close iqrfEmbedUart_CloseDPA doc

SchemaExample

Write and read iqrfEmbedUart_WriteReadDPA doc

SchemaExample

Clear, write and read iqrfEmbedUart_ClearWriteReadDPA doc

SchemaExample

Embed FRC


Send iqrfEmbedFrc_SendDPA doc

SchemaExample

Extra result iqrfEmbedFrc_ExtraResultDPA doc

SchemaExample

Send selective iqrfEmbedFrc_SendSelectiveDPA doc

SchemaExample

Set parameters iqrfEmbedFrc_SetParamsDPA doc

SchemaExample

IQMESH Network

Services that ease the task of working with IQMESH network.
They are composed of more than single DPA transaction (request-confirmation-response) in most of the cases, for that reason, the IQMESH services attempt to acquire exclusive access to DPA interface to ensure network consistency.
They are also integrating information from IQRF Repository.
They are inspired by the services available in IQRF IDE - IQMESH Network Manager.

Common status codes

The IQMESH service error codes are numbered from 1000. If no error has occurred, the response status code is 0. The following error codes are shared across all IQMESH services. Specific services may also have their own status codes.
CodeMessageDescription
0--A request has been handled successfully.
1000--A general, further unspecified error has occurred, see statusStr for details.
1001--Request parameters are missing or are not valid.
1002--Exclusive access could not be acquired.

IQRF Network


Ping iqmeshNetwork_Ping

SchemaExample
Service-specific status codes
CodeMessageDescription
1003--There are no nodes bonded in network.

Restart iqmeshNetwork_Restart

SchemaExample
Service-specific status codes
CodeMessageDescription
1003--There are no nodes bonded in network.

IQRF Bonding


Bond node locally iqmeshNetwork_BondNodeLocal

SchemaExample
Service-specific status codes
CodeMessageDescription
1003--Requested address is already assigned to another node.
1004--No available free address to assign to a new node.

SmartConnect iqmeshNetwork_SmartConnect

SchemaExample
Service-specific status codes
CodeMessageDescription
1003--Requested address is already assigned to another node.
1004--No available free address to assign to a new node.

Remove bond iqmeshNetwork_RemoveBond

SchemaExample

Remove bond only from coordinator iqmeshNetwork_RemoveBondOnlyInC

SchemaExample

AutoNetwork iqmeshNetwork_AutoNetwork

SchemaExample

IQRF Enumeration


Enumerate device iqmeshNetwork_EnumerateDevice

SchemaExample

IQRF Configuration


Read TR configuration iqmeshNetwork_ReadTrConf

SchemaExample

Write TR configuration iqmeshNetwork_WriteTrConf

SchemaExample

IQRF DPA Parameters


DPA parameters iqmeshNetwork_DpaValue

SchemaExample

DPA hops iqmeshNetwork_DpaHops

SchemaExample

FRC parameters iqmeshNetwork_FrcParams

SchemaExample

IQRF Backup and Restore


Backup iqmeshNetwork_Backup

SchemaExample

Restore iqmeshNetwork_Restore

SchemaExample
Service-specific status codes
CodeMessageDescription
1003--The restore function is not supported for node devices.
1004--Incorrect backup data size.
1005--Incorrect backup data checksum.

IQRF Maintenance


FRC response time iqmeshNetwork_MaintenanceFrcResponseTime

SchemaExample
Service-specific status codes
CodeMessageDescription
1003--There are no nodes bonded in network.
1004--No network node responded to FRC request.
1005--No network node handled FRC event.

Test RF signal iqmeshNetwork_MaintenanceTestRF

SchemaExample
Service-specific status codes
CodeMessageDescription
1003--There are no nodes bonded in network.

Resolve duplicated addresses iqmeshNetwork_MaintenanceDuplicatedAddresses

SchemaExample
Service-specific status codes
CodeMessageDescription
1003--There are no nodes bonded in network.

Resolve inconsistent MIDs in Coordinator iqmeshNetwork_MaintenanceInconsistentMIDsInCoord

SchemaExample
Service-specific status codes
CodeMessageDescription
1003--There are no nodes bonded in network.

Resolve unused prebonded nodes iqmeshNetwork_MaintenanceUselessPrebondedNodes

SchemaExample
Service-specific status codes
CodeMessageDescription
1003--There are no nodes bonded in network.

IQRF Sensor Data New in v2.7.0

The sensor data service allows for periodic collecting of sensor measurement data and storing latest values in the database.

Service status codes

CodeMessageDescription
0okRequest has been handled successfully.
1003--Sensor data reading worker is not running.
1004--Sensor data reading is already in progress.
1005--Unable to read or write worker configuration.

Get configuration iqrfSensorData_GetConfig

SchemaExample

Set configuration iqrfSensorData_SetConfig

SchemaExample

Start worker iqrfSensorData_Start

SchemaExample

Stop worker iqrfSensorData_Stop

SchemaExample

Invoke worker iqrfSensorData_Invoke

SchemaExample

Worker status iqrfSensorData_Status

SchemaExample

Asynchronous report iqrfSensorData_ReportAsyncAsync

SchemaExample

Daemon Management

With the introduction management and network request queues, the following messages are available to pause and resume execution of network requests if necessary. For example, if there are multiple network requests queued up, the network queue can be paused to allow for management tasks to be performed, without losing network messages.

Common status codes

CodeMessageDescription
0okRequest has been handled successfully.
-1--The request failed, refer to the statusStr property for details of failure.

Exit mngDaemon_Exit

SchemaExample

Mode mngDaemon_Mode

SchemaExample

Reload coordinator mngDaemon_ReloadCoordinator

SchemaExample

Update cache mngDaemon_UpdateCache

SchemaExample

Version mngDaemon_Version

SchemaExample

Start network queue mngDaemon_StartNetworkQueueNew in v2.7.0

Resumes network request queue.

SchemaExample

Stop network queue mngDaemon_StopNetworkQueueNew in v2.7.0

Pauses network request queue, if a network request is currently being processed, the queue is paused once the network request is finished.

SchemaExample

Daemon Database New in v2.7.0

API for network enumeration and querying database for network device data. This API replaces the Daemon Information API.

Common status codes

CodeMessageDescription
0okRequest has been handled successfully.
-1--The request failed, refer to the statusStr property for details of failure.

Device enumeration iqrfDb_Enumerate

SchemaExample

Get device information iqrfDb_GetDevice

SchemaExample

Get information about multiple devices iqrfDb_GetDevices

SchemaExample

Get user-defined device metadata iqrfDb_GetDeviceMetadata

SchemaExample

Set user-defined device metadata iqrfDb_SetDeviceMetadata

SchemaExample

Get binary outputs iqrfDb_GetBinaryOutputs

SchemaExample

Get lights iqrfDb_GetLights

SchemaExample

Get sensors iqrfDb_GetSensors

SchemaExample

Get network topology iqrfDb_GetNetworkTopology

SchemaExample

Annotate responses with metadata iqrfDb_MetadataAnnotation

SchemaExample

Reset database iqrfDb_Reset

SchemaExample

Daemon Configuration


Common status codes

CodeMessageDescription
0okRequest has been handled successfully.
-1--The request failed, refer to the statusStr property for details of failure.

Component cfgDaemon_Component

SchemaExample

Daemon Scheduler


Common status codes

CodeMessageDescription
0okRequest has been handled successfully.
-1--The request failed, refer to the statusStr property for details of failure.

Add task mngScheduler_AddTask

SchemaExample

Edit task mngScheduler_EditTask

SchemaExample

Get task mngScheduler_GetTask

SchemaExample

List tasks mngScheduler_List

SchemaExample

Remove all tasks mngScheduler_RemoveAll

SchemaExample

Remove task mngScheduler_RemoveTask

SchemaExample

Start task mngScheduler_StartTask

SchemaExample

Stop task mngScheduler_StopTask

SchemaExample

Daemon Notification

Daemon state notifications related to interfaces, modes via WebSocket channel on port 1438.

Monitor ntfDaemon_Monitor

SchemaExample

Monitor invocation ntfDaemon_InvokeMonitor

SchemaExample