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.
| Counting | Digital | |
|---|---|---|
| Input type in Protocol 78 (command 0x04) | 0, counter in the codec | 1, discrete in the codec |
| What the device sends | Counter value | Input state and events with a timestamp |
| Hourly archive | Kept for inputs 1 and 2 | Not kept |
| Debounce time | Set with command 0x05 | Fixed, 51 ms |
| Trigger "None" | Not allowed | Allowed: 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:
| Parameter | Value |
|---|---|
| Default | 100 ms (byte value 25) |
| Valid range | 52–1000 ms: byte values 13–250 |
| How to set | Byte 1 of command 0x05, in "ms / 4" units: for example, 25 = 100 ms |
| Value out of range | The 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.
| Parameter | Default value |
|---|---|
| Input type | Counting (0) — on all three inputs |
| Activation | Inputs 1 and 2 enabled, input 3 disabled |
| Trigger | Closing (falling edge) |
| Capture type | COMBI |
| Priority | LOW |
| Send interval | 24 hours |
| Pulse polling period | 100 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 byte | Meaning |
|---|---|
| 0 | Input number: 0, 1, 2 for inputs 1, 2, 3. The device rejects a block with number 3 or higher |
| 1 | CFG_ID — configuration version, see the "Configuration version and device reply" section |
| 2 onward | Commands: 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:
| CMD | Purpose | Data |
|---|---|---|
| 0x0A | Activation | 1 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 |
| 0x02 | Send interval | 3 bytes, uint24, least significant byte first, in seconds. The minimum is 60 seconds; the device silently ignores a smaller value |
| 0x04 | Input type | 1 byte, see the next section |
| 0x05 | Debounce time and pulse polling period | 2 bytes in "ms / 4" units: byte 0 — debounce (counting input only), byte 1 — pulse polling period |
| 0xEE | LoRaWAN confirmation | 1 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.
| Bits | Parameter | Values |
|---|---|---|
| 0–1 | Input type | 0 — counting, 1 — discrete (Digital) |
| 2–3 | Priority | 0 — LOW, 1 — HIGH, 2 — PANIC |
| 4–5 | Event trigger | 0 — opening (rising edge), 1 — closing (falling edge), 2 — any change, 3 — None |
| 6–7 | Capture type | 0 — 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.
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
| Bytes | Meaning |
|---|---|
78 00 00 | Protocol 78 header: ID, SEQ, FLAGS |
02 | FORMAT 0x02 — DI CFG block |
0C | LEN: 12 bytes of block body follow |
02 | Input number 2 — input 3 |
05 | CFG_ID = 5 |
0A 01 | Activation: input enabled |
02 10 0E 00 | Send interval 0x000E10 = 3600 seconds (1 hour) |
04 29 | Input type: discrete, PANIC, any change, COMBI |
EE 02 | LoRaWAN confirmation for event packets |
Configuration version and device reply
CFG_ID in the DI CFG block determines whether the settings are applied:
| CFG_ID | What the device does |
|---|---|
| 0 | Applies nothing, only reports the current version |
| 1–254 | Applies the settings only if CFG_ID differs from the stored input version |
| 255 | Always 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.
| Field | Size | Meaning |
|---|---|---|
| FORMAT | 1 byte | 0x0B |
| FLAGS | 1 byte | Bits 0–4 — number of events (0–31), bits 5–7 — source (0 — discrete inputs) |
| STATES | 1 byte | Bit 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 |
| TIMESTAMP | 4 bytes, least significant byte first | Time of the first event. Present only if there is at least one event |
| Events | 4 bits per event, two events per byte, low half of the byte first | Bits 0–2 — input number (from 0), bit 3: 1 — the input opened, 0 — it closed |
| Timestamp block length | 1 byte | Length of the compressed timestamp block. 0 with a single event |
| Timestamp block | Variable | Timestamps compressed as differences |
Timestamps are seconds, uint32. To get UNIX time, add 946684800, as in the archive packets.
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
| Bytes | Meaning |
|---|---|
78 01 00 | Protocol 78 header: ID, SEQ, FLAGS |
0B | State and events record |
01 | FLAGS: one event, source 0 — discrete inputs |
04 | STATES: bit 2 = 1 — input 3 is closed |
40 42 5A 32 | TIMESTAMP 0x325A4240 = 844776000; 844776000 + 946684800 = 1791460800 — 2026-10-08 12:00:00 UTC |
02 | Event: input number 2 (input 3), bit 3 = 0 — closed |
00 | Timestamp 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
| Priority | When 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:
| Bit | Packets |
|---|---|
| 0 | Regular data of counting inputs |
| 1 | Digital input event packets; the same bit applies to periodic state sending of these inputs |
| 2 | Archive 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
- Digital inputs — input modes and the digital input schematic.
- Operation — device production and warehouse modes.
- Specification — number of inputs and device characteristics.
- Protocol 78 packet format — packet header: ID, SEQ, FLAGS.
- Protocol 78 playground — decoding device packets in the browser.