Netris2

Description of the device
The model NETRIS®2 IIoT-capable WIKA radio unit is used wherever centralised, web-based, remote monitoring of measuring instrument data is required. The Ex radio unit receives the data via the two intrinsically safe, analogue 4 ... 20 mA input signals. The fully encapsulated instrument with IP55 ingress protection transmits the received data continuously to a cloud via configurable data packets with LoRaWAN® (Long Range Wide Area Network). Battery-operated wireless transmission via LoRaWAN® is based on LPWAN technology to enable high transmission ranges and long battery life. The radio unit is connected to a suitable measuring instrument via cable. The simple web configuration via the cloud and the LoRaWAN® network enables the complete end-to-end encryption with bidirectional communication for safe IIoT applications. The WIKA radio unit NETRIS®2 is part of the WIKA IIoT solution. With this, WIKA offers a holistic solution for your digitalization strategy.
For more information see product site.
NETRIS2 Parser Quick Start
Parser API
All functions are pure (no global mutation) except setMeasurementRanges which updates internal range configuration for subsequent decodes.
Types:
Input types:
interface UplinkInput {
fPort: number // LoRaWAN FPort
bytes: number[] // Raw payload as array of unsigned bytes (0-255)
recvTime?: string // Optional ISO timestamp (if your LNS provides it)
}
interface HexUplinkInput {
fPort: number // LoRaWAN FPort
bytes: string // Raw payload as hex-encoded string (case-insensitive, even length)
recvTime?: string // Optional ISO timestamp (if your LNS provides it)
}Return type (shared by all decode helpers):
type Result = {
data: Record<string, any> // Parsed key/value pairs
warnings?: string[] // Non-fatal anomalies
} | {
errors: string[] // Fatal or structural issues only
}To understand the data field, take a look at the examples and the schema definition.
Supported channels to identify different sensors by:
// Is used in the returned data
type ChannelName = 'Electrical current1' | 'Electrical current2'Channels that support adjusting the measurement range:
type AdjustableChannelName = never // No adjustable channels in NETRIS2Channel Configuration:
| Channel Name | Default Min | Default Max | Unit | Configurable |
|---|---|---|---|---|
Electrical current1 | 4 | 20 | mA | No |
Electrical current2 | 4 | 20 | mA | No |
*Both channels have fixed 4-20 mA ranges that cannot be adjusted.
decodeUplink(input)
function decodeUplink(input: UplinkInput): ResultdecodeHexString(hexInput)
function decodeHexString(hexInput: HexUplinkInput): DecodeResultbytes must have even length; case-insensitive.
setMeasurementRanges(channel, range)
// Will throw on invalid channel name or if the channel disallows range updates
function setMeasurementRanges(
channelName: AdjustableChannelName,
range: {
start: number
end: number
}
): voidApplies to future decodes only.
adjustRoundingDecimals(decimals)
// Smartly adjust number of decimals for rounded values
// Impacts all numeric values in all outputs
// Default is 4
function adjustRoundingDecimals(decimals: number): voidApplies to future decodes only.
encodeDownlink(input)
interface DownlinkInput {
codec: 'NETRIS2TULIP2'
input: ConfigurationInput | ResetInput | ResetBatteryInput
}
// encode a single downlink frame
function encodeDownlink(input: DownlinkInput): {
bytes: number[] // Encoded downlink payload as array of unsigned bytes (0-255)
fPort: number // LoRaWAN FPort to use
warnings?: string[] // Non-fatal anomalies
} | {
errors: string[] // Fatal or structural issues only
}Validates the input and encodes it into a single downlink frame. It uses the same range configuration as used for decoding. If the documentation refers to percentage values, use the real world values. (e.g. 20% for threshold with 4-20mA range is 7.2mA (0.2 * (20-4) + 4)).
To understand the input structure, refer to the downlink schema definition and downlink examples.
encodeMultipleDownlinks(input)
// encodes the given configuration in one or more downlink frames depending on byte size
function encodeMultipleDownlinks(
input: DownlinkInput
): {
frames: number[][] // Encoded downlink payloads as arrays of unsigned bytes (0-255)
fPort: number // LoRaWAN FPort to use
warnings?: string[] // Non-fatal anomalies
} | {
errors: string[] // Fatal or structural issues only
}To understand the input structure, refer to the downlink schema definition and downlink examples.
About NETRIS2 Channels
Note: NETRIS2 has fixed 4-20 mA measurement ranges for both channels that cannot be adjusted. The device always reads electrical current in the 4-20 mA range. No configuration is required for measurement ranges.
If you need to verify the device configuration, check the identification frames after device activation.
TULIP2 Identification Frames
Identification messages (message type 6/0x06) confirm the configured channels:
Example TULIP2 identification frame:
{
"data": {
"messageType": 6,
"configurationId": 1,
"productIdName": "NETRIS2",
"channels": [
{
"channelId": 0,
"channelName": "Electrical current1"
},
{
"channelId": 1,
"channelName": "Electrical current2"
}
]
}
}Quick Start
- No measurement range configuration needed (fixed 4-20 mA)
- Add wrapper function if your network server is non-compliant:
function decode(input) { return decodeUplink(input) } - For downlink configuration, refer to the downlink schema documentation above
NPM Module Inclusion
| Device | Included | Factory function |
|---|---|---|
| NETRIS2 | ✔️ | NETRIS2Parser |
