Skip to main content

Digital

In Digital mode an OrionMeter LA-IP-RSP or LA-IP-RSP[A] input does not count pulses. Instead it tracks the contact state — closed or open — and reports changes as events with a timestamp. This page is for those who configure the input over the air and decode device packets on their own server. The Protocol 78 description calls this mode "discrete input" (input type 1), and the codec calls it discrete.

When to use Digital mode​

The mode fits when you need the fact and time of a contact state change rather than a pulse count. The device has three inputs, and any of them can be switched to this mode.

CountingDigital
Input type in Protocol 78 (command 0x04)0, counter in the codec1, discrete in the codec
What the device sendsCounter valueInput state and events with a timestamp
Hourly archiveKept for inputs 1 and 2Not kept
Debounce timeSet with command 0x05Fixed, 51 ms
Trigger "None"Not allowedAllowed: no events are generated, the state is still sent periodically

How the input detects closing and opening​

  • Closing the contact (the input pulled low, falling edge) puts the input into the "closed" state; opening (rising edge) puts it into the "open" state.
  • An event is generated only if the input trigger includes that edge.
  • The closing event is generated at the edge itself, before debounce.
  • In Digital mode the debounce time is fixed at 51 ms. The value from command 0x05 applies to counting inputs only.
  • Events are generated only in the device production mode. In warehouse mode an input state change generates no events. The modes are described on the Operation page.

If the contact stays closed, in the COMBI capture mode the device switches off the pull-up about a second after closing (after the 51 ms debounce plus another 1 second wait) to save the battery, and then checks the input once per pulse polling period. So after a long closure the device notices an opening at the next check and then confirms it with debounce. The pulse polling period applies to digital inputs too:

ParameterValue
Default100 ms (byte value 25)
Valid range52–1000 ms: byte values 13–250
How to setByte 1 of command 0x05, in "ms / 4" units: for example, 25 = 100 ms
Value out of rangeThe device uses 101 ms, the firmware default

Default settings​

From the factory all three inputs are counting inputs: inputs 1 and 2 are enabled, input 3 is disabled.

ParameterDefault value
Input typeCounting (0) — on all three inputs
ActivationInputs 1 and 2 enabled, input 3 disabled
TriggerClosing (falling edge)
Capture typeCOMBI
PriorityLOW
Send interval24 hours
Pulse polling period100 ms
Configuration version (CFG_ID)0

To make an input work in Digital mode, send command 0x04 with type 1. Input 3 also has to be enabled: command 0x0A, bit 0.

Over-the-air configuration: DI CFG block (FORMAT 0x02)​

Inputs are configured with a Protocol 78 downlink packet on fPort 2. The header (ID 0x78, SEQ, FLAGS) is followed by the DI CFG block: a FORMAT byte = 0x02, a LEN byte with the block body length, then the body.

Body byteMeaning
0Input number: 0, 1, 2 for inputs 1, 2, 3. The device rejects a block with number 3 or higher
1CFG_ID — configuration version, see the "Configuration version and device reply" section
2 onwardCommands: a CMD byte followed by the command data. A block may contain several commands

One block configures one input. To configure several inputs, send a separate DI CFG block for each.

Commands for Digital mode:

CMDPurposeData
0x0AActivation1 byte: bit 0 — input enabled, bit 1 — logging, bit 2 — periodic archive sending. Bits 1 and 2 have no effect on a digital input: only counting inputs are archived
0x02Send interval3 bytes, uint24, least significant byte first, in seconds. The minimum is 60 seconds; the device silently ignores a smaller value
0x04Input type1 byte, see the next section
0x05Debounce time and pulse polling period2 bytes in "ms / 4" units: byte 0 — debounce (counting input only), byte 1 — pulse polling period
0xEELoRaWAN confirmation1 byte, see the "Event priority and delivery confirmation" section

Commands 0x00, 0x01, 0x03 and 0x06 apply to counting inputs only.

The "Input type" byte (command 0x04) and an example packet​

The command 0x04 byte sets four parameters at once. The device writes them all together, so specify every field even if you change only one.

BitsParameterValues
0–1Input type0 — counting, 1 — discrete (Digital)
2–3Priority0 — LOW, 1 — HIGH, 2 — PANIC
4–5Event trigger0 — opening (rising edge), 1 — closing (falling edge), 2 — any change, 3 — None
6–7Capture type0 — COMBI, 1 — INTERRUPT

The "None" trigger turns off events on input state changes, but periodic state sending continues. This trigger must not be set for a counting input.

Warning

The firmware does not save the INTERRUPT capture type sent with command 0x04: after the settings are applied the input keeps working in COMBI mode. Set bits 6–7 to 0.

Example: 0x29 (0010 1001 in binary) — type 1 (discrete), priority 2 (PANIC), trigger 2 (any change), capture 0 (COMBI).

A full packet on fPort 2 that enables input 3 in Digital mode:

78 00 00 02 0C 02 05 0A 01 02 10 0E 00 04 29 EE 02
BytesMeaning
78 00 00Protocol 78 header: ID, SEQ, FLAGS
02FORMAT 0x02 — DI CFG block
0CLEN: 12 bytes of block body follow
02Input number 2 — input 3
05CFG_ID = 5
0A 01Activation: input enabled
02 10 0E 00Send interval 0x000E10 = 3600 seconds (1 hour)
04 29Input type: discrete, PANIC, any change, COMBI
EE 02LoRaWAN confirmation for event packets

Configuration version and device reply​

CFG_ID in the DI CFG block determines whether the settings are applied:

CFG_IDWhat the device does
0Applies nothing, only reports the current version
1–254Applies the settings only if CFG_ID differs from the stored input version
255Always applies the settings

The default configuration version in the device is 0.

For an accepted DI CFG block the device replies with a service packet (FORMAT 0x08) of the CFG_ID subtype: it carries block number 0x02 and the current configuration version of the input. A new version is stored only if the settings actually changed. If you send the same settings with a new CFG_ID, the device keeps the previous version and reports it in the reply.

Device messages: state and events (FORMAT 0x0B)​

The device sends the state of digital inputs and their events in an uplink as a 0x0B record.

Enabled inputs are grouped by send interval: inputs with the same interval share one timer. When the timer fires, counting inputs go out as one record, and all digital inputs go out as one 3-byte 0x0B record without events: 0B, FLAGS, STATES. If the record carries events, timestamps and the events themselves follow STATES.

FieldSizeMeaning
FORMAT1 byte0x0B
FLAGS1 byteBits 0–4 — number of events (0–31), bits 5–7 — source (0 — discrete inputs)
STATES1 byteBit n = 1 if input n + 1 is enabled, works in Digital mode and is closed. Bits 3–7 are 0. The state at the moment the packet is assembled, not at the moment of the event
TIMESTAMP4 bytes, least significant byte firstTime of the first event. Present only if there is at least one event
Events4 bits per event, two events per byte, low half of the byte firstBits 0–2 — input number (from 0), bit 3: 1 — the input opened, 0 — it closed
Timestamp block length1 byteLength of the compressed timestamp block. 0 with a single event
Timestamp blockVariableTimestamps compressed as differences

Timestamps are seconds, uint32. To get UNIX time, add 946684800, as in the archive packets.

Warning

STATES and events use opposite polarity. In STATES 1 means "closed", while in an event bit 3 = 1 means "opened". The codec returns value: true when the bit is set, so in its output inputN.value = true means the input is closed, while true for an event in events means the input opened.

Example: input 3 closed on 2026-10-08 at 12:00:00 UTC.

78 01 00 0B 01 04 40 42 5A 32 02 00
BytesMeaning
78 01 00Protocol 78 header: ID, SEQ, FLAGS
0BState and events record
01FLAGS: one event, source 0 — discrete inputs
04STATES: bit 2 = 1 — input 3 is closed
40 42 5A 32TIMESTAMP 0x325A4240 = 844776000; 844776000 + 946684800 = 1791460800 — 2026-10-08 12:00:00 UTC
02Event: input number 2 (input 3), bit 3 = 0 — closed
00Timestamp block length: 0, a single event

A fragment of the codec output for this packet (service fields omitted):

"input3": { "value": true },
"events": [
{ "input3": { "utctimestamp": "2026-10-08T12:00:00.000Z", "value": false } }
]

Event priority and delivery confirmation​

PriorityWhen the event is transmitted
LOW (0)With the next transmission by the device TX timer — by default within about 10 minutes; the input send interval does not affect this
HIGH (1)Same as LOW: the current firmware does not distinguish them
PANIC (2)The device starts an out-of-schedule uplink after about 0.1 s; under frequent transmissions it waits for the mandatory pause after the previous transmission. In the packet PANIC events come before LOW and HIGH events

The priority is not sent in the packet: a 0x0B record does not tell which priority an event had.

The command 0xEE byte sets which packets are sent with LoRaWAN confirmation:

BitPackets
0Regular data of counting inputs
1Digital input event packets; the same bit applies to periodic state sending of these inputs
2Archive data

To have digital input packets sent with confirmation, set bit 1 — value 0x02, as in the example above.

Good to know​

  • Digital inputs are not archived: the hourly archive is kept and sent only for counting inputs 1 and 2.
  • Events are generated only in the device production mode.
  • The device silently ignores a send interval shorter than 60 seconds.
  • To send an event out of schedule, use the PANIC priority: the current firmware does not distinguish LOW from HIGH.
  • The same settings with a new CFG_ID do not change the version — the reply carries the previous version.

See also​