Harvestree LoRaWAN runs measurement cycles according to the selected application mode. Between cycles, the device remains in low-power sleep. In LoRaWAN operation, measurements and status are transmitted as uplinks.
Energy harvesting needs a usable temperature gradient. Stored energy and configured limits (for example minimum operating voltage and application periods) decide whether a cycle runs measurement, radio, or sleep. Measurement charge per pass (type, delay, oversampling, typical duration and budget) is in Harvestree Measurements Technical Reference. Radio charge per cycle depends on whether an uplink is sent (normal, alarm, or keepalive), payload size, and LoRaWAN data rate / region; it is configured and scheduled here, not in the measurements reference. For uplink energy budgets, autonomy planning, and application-specific trade-offs, contact MOIZ or your supplier for application support. Alarm timing (check vs event periods) is in Alarm mode below.
Monitoring mode
Monitoring mode is periodic:
- wake at each configured measurement period,
- acquire configured measurements,
- if operating conditions are valid, transmit a normal uplink,
- otherwise skip transmission or send a keepalive according to configuration,
- return to sleep until the next measurement period.
flowchart TD
W[Wakeup on measurement period] --> M[Acquire configured measurements]
M --> V{Operating conditions valid?}
V -->|Yes| U[Transmit normal uplink]
V -->|No| K[Skip or keepalive]
U --> S[Sleep until next period]
K --> S
Alarm mode
Alarm mode combines periodic checks and event-driven transmissions. Behaviour depends on:
- whether an alarm is currently active,
- Reactivity period — wake/check cadence while no alarm is active,
- Alarm transmission period — cadence while an alarm remains active,
- Normal transmission period — minimum spacing between normal uplinks when no alarm is active.
Synchronous vs asynchronous sources
| Type | When | What |
|---|---|---|
| Synchronous | Each measure pass | M8 port readings; harvest voltage; base temperature |
| Asynchronous | Interrupt at wake | Motion (acceleration threshold); async dry contact on a port |
Synchronous limits use the latest sample (high / low / in range / out of range; no hysteresis). Asynchronous sources are edge- or threshold-driven — dry contact: § Asynchronous dry-contact trigger; motion: accelerometer threshold on the internal sensor.
Asynchronous trigger behaviour
From the product’s point of view, asynchronous sources (motion and async dry contact) use a two-layer model:
- Fast wake — a configured edge (contact) or threshold crossing (motion) wakes the device from sleep so it can run an alarm cycle sooner than the next scheduled check.
- Decision on measurement — the alarm is confirmed from the current contact level (async dry contact) or from the motion flag for that cycle (MOVE). A wake alone does not keep an alarm active if the contact has already returned to normal when the level is read.
Reactivity period (alarm check period, 0x0200) provides a scheduled safety net: on each wake with sufficient stored energy, the product reads all ports and system values. For async dry contact, if the contact is still in the alarm-active state (closed after a rising edge, or open after a falling edge — per your configuration), the alarm is raised even if the original edge was missed while interrupts were disarmed.
Below minimum operating voltage, full measurements and alarm uplinks are skipped (keepalive rules still apply). Async wake events are not stored across low-energy cycles: when storage voltage recovers, only the current contact level at the next reactivity wake (or a new edge) can start an alarm. This avoids reporting an alarm for a contact change that ended while energy was too low.
| Topic | Product behaviour |
|---|---|
| Interrupts armed | Only while no alarm is active and the device is sleeping between cycles. Disarmed during measurement, radio transmission, and for the whole time an alarm episode is active. |
| Post-enable debounce | For 2 seconds after contact interrupts are re-enabled, edges are ignored. This filters spurious transitions when the input path is reconnected. Very short pulses in this window may be missed. |
| Input settle | About 15 ms after the contact path is connected, before edge detection is enabled (allows the slow opening transition to finish — see contact transition timing). |
| Contact close vs open (hardware) | Electronics respond much faster on contact closing (~10 µs scale) than on opening (~1 ms RC, a few ms until stable). Edge wake on open is inherently slower; level reads right after an open may still show closed for a few milliseconds. |
| Contact level read | About 20 ms settling when the contact is sampled during an alarm cycle. |
| Short pulses | Closing is fast on the electronics (~10 µs RC); opening is slower (~1 ms). Pulses shorter than the debounce/settle windows, or that return to normal before the next reactivity wake, may not trigger an alarm. Use synchronous dry contact or a longer-held contact if you need every brief closure reported. |
| During an alarm episode | Further contact edges are not re-armed until the contact returns to normal and the episode ends. The contact level is re-checked on each alarm transmission period wake. |
| Concurrent async events | If one async wake is already pending, a second edge (another port or motion) before the cycle runs is ignored. The next reactivity wake still evaluates all sources. |
Timing
- Reactivity period — wake/sleep cadence when no alarm is active. Same cadence after a keepalive when stored voltage is below the configured minimum operating voltage.
- Alarm transmission period — cadence after an alarm uplink while the condition remains active.
- Normal transmission period — minimum spacing between normal uplinks when no alarm is active. One normal uplink is sent immediately when an alarm clears, then this period applies again. If voltage is low and no keepalive is sent, sleep uses this period.
Parameter mapping (Toolbox / LoRaWAN remote configuration):
| Product term (this page) | Parameter name | ID |
|---|---|---|
| Reactivity period | Alarm check period | 0x0200 |
| Alarm transmission period | Alarm event period | 0x0201 |
| Normal transmission period | Measurement period | 0x0002 |
See also LoRaWAN remote configuration — Alarm timing.
flowchart TD
W[Wakeup] --> C[Evaluate alarm sources]
C --> A{Alarm active?}
A -->|Yes| TA[Transmit alarm uplink]
TA --> SE[Sleep alarm period]
A -->|No| N{Normal uplink due?}
N -->|Yes| TN[Transmit normal uplink]
N -->|No| SK[No transmission]
TN --> SC[Sleep reactivity period]
SK --> SC
SE --> W
SC --> W
Idle mode
Idle mode is standby:
- no periodic measurement cycle,
- no regular application uplinks.
flowchart TD
I[Idle standby] --> SL[Low-power sleep]
SL --> TR[Wait for external trigger or reconfiguration]
TR --> I
Modbus slave mode
In Modbus slave mode:
- data access is through wired Modbus RTU requests,
- Modbus traffic wakes or resumes the application from low-power standby,
- measurements run on a configured Modbus measurement cadence (independent of how often the master polls),
- LoRaWAN application traffic is disabled.
flowchart TD
S[Standby / low-power wait] --> R[Modbus request received]
R --> U[Wake or resume application]
U --> P[Periodic measurement loop]
P --> D[Latest values in registers]
D --> A[Master reads at its polling rate]
A --> S
Modbus measurement cadence is configured in milliseconds (Harvestree Modbus Register Table). It is separate from the LoRaWAN measurement period (seconds) used in Monitoring and Alarm modes.
LoRaWAN startup and join
In Monitoring and Alarm modes (after USB commissioning):
- USB first: the configuration link is up before the LoRaWAN stack starts, so the device can be tuned on the bench while waiting for energy.
- Storage voltage gate: the first OTAA join and each join retry run only when storage voltage ≥ the configured minimum operating voltage (same threshold as full measurement uplinks in Monitoring / Alarm).
- Re-check interval: storage voltage is sampled on that gate every 300 s (
PERIOD_JOIN_RETRY). Join attempts and retries are skipped between checks while voltage stays below the limit. - After join: the measurement cycle starts only once the network reports a successful join; until then, no periodic application uplinks are emitted from the measurement scheduler.
Common behaviour
- Port configuration and calibration: Harvestree Toolbox on site; limited remote tuning via LoRaWAN (see user Configuration chapter). Measurement behaviour: Harvestree Measurements Technical Reference.
- Calibration: applied before uplink encoding; synchronous port alarms use the same corrected values. Harvest voltage and base temperature alarms use those system readings from each pass.
- Scheduling: deterministic wake/sleep sequencing across modes.