4-20 mA Add-On
Configuration Parameters
In addition to the GW4 configuration parameters the add-on has the following specific parameters:
Analog Channel Parameters
| Description | Key | Type | Possible Values | Default |
|---|---|---|---|---|
| Enable measurement on 4–20 mA input channel 1 (CH1) | ch1Enable | Bool | true / false false = channel disabled | true |
| Number of seconds to wait for the CH1 sensor to get ready after power on | ch1PreReadSec | Number | Seconds (integer) 0… | 1 |
| Number samples to take for a single CH1 measurement | ch1Samples | Number | 1-1000 | 200 |
| Scaling factor applied to the raw CH1 value | ch1Factor | Number | Numeric (float) e.g. 1.0, 0.1 | 1 |
| Offset added to the CH1 value after scaling | ch1Offset | Number | Numeric (float) e.g. 0, -5.0 | 0 |
| High alarm threshold for CH1 measurement value | ch1AlarmHigh | Number | Numeric (float) empty = disabled | [not set] |
| Low alarm threshold for CH1 measurement value | ch1AlarmLow | Number | Numeric (float) empty = disabled | [not set] |
| Enable measurement on 4–20 mA input channel 2 (CH2) | ch2Enable | Bool | true / false false = channel disabled | true |
| Number of seconds to wait for the CH2 sensor to get ready after power-on | ch2PreReadSec | Number | Seconds (integer) 0… | 1 |
| Number of samples taken for a single CH2 measurement | ch2Samples | Number | 1-1000 | 200 |
| Scaling factor applied to the raw CH2 value | ch2Factor | Number | Numeric (float) | 1 |
| Offset added to the CH2 value after scaling | ch2Offset | Number | Numeric (float) | 0 |
| High alarm threshold for CH2 measurement value | ch2AlarmHigh | Number | Numeric (float) empty = disabled | [not set] |
| Low alarm threshold for CH2 measurement value | ch2AlarmLow | Number | Numeric (float) empty = disabled | [not set] |
| Cron schedule used while an alarm is active, overriding the normal device cron | alarmCron | String | Cron expression (string) empty = no override | [not set] |
| Number of seconds CH1 stays powered after first power-on or brownout | ch1PwrAfterBrownoutDur | Integer | Seconds (integer) 0 = disabled | 0 |
Detailed Description
chXFactor and chXOffset Parameters
The measured raw value is multiplied by chXFactor and then chXOffset is added. All further calculations and alarm checks are done with this derived value.
chXAlarmLow and chXAlarmHigh Parameters
If the calculated measurement value is above chXAlarmHigh or below chXAlarmLow, an alarm is triggered. The number of triggered alarms and the time in the alarm state is measured and transmitted.
alarmCron Parameter
In case of an active alarm, this cron is used instead of the regular cron. If empty, the regular sensor cron will be used.
LoRaWAN Communication
The current firmware version does not yet support LoRaWAN for the 4–20 mA add-on.