E+H Floodmonitoring
The node fetches the current values of a list of configured measuring points (instrumentations) from the Endress+Hauser Netilion cloud. From water level and distance, the configured thresholds and optional flood classes it builds one FloodMonitoring entity per measuring point and emits all entities together in one message.
- Node type
- eh-floodmonitoring
- Package
- @htag/node-red-contrib-hypertegrity-environment
- Inputs / outputs
- 1 / 1
- Data source
- Endress+Hauser Netilion API (api.netilion.endress.com)
When to use this node
Municipalities that operate their own Endress+Hauser radar or ultrasonic sensors on brooks, culverts or retention basins receive the readings via the Netilion cloud. The E+H Floodmonitoring node brings these values into a Node-RED flow, converts them to centimetres and evaluates them against the thresholds you set.
Typical use cases are:
- Flood monitoring of small watercourses that are not covered by state or federal gauges.
- Alert dashboards with status
NormalorCritical, a picture of the measuring point and a link to a detail page. - Adaptive polling intervals, where critical measuring points are queried more often than unremarkable ones.
How the node works
Trigger
An incoming message starts the fetch. Optionally it brings its own sensor list or the fastInterval flag.
Authenticate
Depending on the method, API key and user are sent via Basic Auth, or an OAuth token is requested and refreshed automatically.
Fetch values
For each measuring point the endpoint instrumentations/ID/values is queried one after another. Errors of single measuring points are logged as warnings.
Evaluate and emit
Water level and distance are converted from millimetres to centimetres, compared with thresholds and sent as an array of FloodMonitoring entities.
Result: One message with an array of FloodMonitoring entities, each with water level, status, flood class, location and links.
The node is trigger-based. Combine it with one or two Inject nodes: a slow interval for all measuring points and optionally a fast interval with msg.fastInterval = true that only queries the currently critical measuring points. The node remembers which measuring points are critical in the node context.
Configuration
The edit dialog is divided into the tabs General, Sensors and Authentication.
General tab
| Field | Type | Default | Meaning |
|---|---|---|---|
| Name | Text | empty | Display name of the node in the flow. Without a name the node shows "E+H Floodmonitoring". |
Sensors tab
The tab contains an editable list. Each entry describes one measuring point and is stored as an object in the array sensors.
| Field | Type | Default | Meaning |
|---|---|---|---|
| Sensor ID | Select with refresh button | empty | ID of the instrumentation in Netilion. The button loads up to 100 instrumentations of your account; tag and serial number are displayed. Stored as id. |
| Name | Text | empty | Display name of the measuring point. Carried over into the entity. Stored as name. |
| Distance Value | Select | empty (equals distance) | Key of the value that provides the measured distance. The Werte button loads the available keys of the selected instrumentation. Stored as distanceKey. |
| Level Value | Select | empty (equals level) | Key of the value that provides the water level. Stored as levelKey. |
| Latitude (Lat), Longitude (Lon) | Number | empty | Coordinates of the measuring point in decimal degrees. Missing values are emitted as 0. Stored as lat and lon. |
| Threshold Level (cm) | Number | empty | Water level in centimetres from which the status Critical is set. 0 or empty disables the check. Stored as thresholdLevel. |
| Threshold Distance (cm) | Number | empty | Distance threshold in centimetres. Stored as thresholdDistance. |
| HQ Thresholds | Checkbox | off | Enables classification into flood classes. Stored as useHQThresholds. |
| HQ Thresholds (comma separated) | Text | empty | Six ascending limits in millimetres, separated by commas (example below). Stored as hqThresholds. |
| Image URL | Text | empty | Address of a picture of the measuring point. Supports the placeholders {{id}} and {{name}} as well as environment variables in the form ${NAME}. Stored as imageLink. |
| Dashboard URL | Text | empty | Address of a detail page. Same placeholders as the image URL. Stored as dashboardLink. |
Example of six HQ thresholds:
1412,1686,1891,2100,2300,2500
Authentication tab
| Field | Type | Default | Meaning |
|---|---|---|---|
| Authentication Method | Select (basic, oauth) | basic | Basic Auth (API Key + User) sends API key and user credentials with every request. OAuth Token (API Key + Secret + User) requests a short-lived token with API key and secret that is refreshed automatically. Stored as authMethod. |
| API Key | Password (credential) | empty | API key of your Netilion application. Stored encrypted and sent in the header Api-Key with every request. |
| API Secret | Password (credential, OAuth only) | empty | Secret of your Netilion application for the token request. Stored encrypted. |
| Username | Text (credential) | empty | Username of your Netilion account. |
| Password | Password (credential) | empty | Password of your Netilion account. Stored encrypted. |
Access requires an Endress+Hauser Netilion account in which your devices are set up as instrumentations, plus the API key and, if applicable, secret of an application registered there. Both are obtained in the Netilion developer portal. All four credential fields accept environment variables in the form ${NAME}, which the node resolves at startup.
Credentials already stored are shown as placeholders in the dialog; leave the field empty to keep the stored value. The refresh buttons in the dialog fall back to the stored credentials via the Node-RED server, so you do not have to enter them again.
Input
| Property | Type | Meaning |
|---|---|---|
msg | any | Every message starts a fetch. All properties of the message are kept in the output; payload is overwritten. |
msg.payload | Array (optional) | Replaces the configured sensor list if it is a non-empty array whose first element has a field id. Per element id, name, coordinates.latitude, coordinates.longitude, thresholds.level, thresholds.distance, hq_thresholds (array, enables HQ classification), imageLink and dashboardLink are evaluated. For distance and level value the keys distance and level apply. |
msg.fastInterval = true | Boolean (optional) | Fast interval: only measuring points that had the status Critical in the last fetch are queried. |
msg.fastInterval = false | Boolean (optional) | Slow interval: all measuring points except the currently critical ones are queried. |
msg.fastInterval not set | – | All configured or provided measuring points are queried. |
Output
The node sends one message per fetch, provided at least one measuring point was queried successfully. msg.payload is an array of FloodMonitoring entities.
{
"payload": [
{
"id": "urn:ngsi-ld:FloodMonitoring:551018",
"type": "FloodMonitoring",
"name": "Gauge Example Brook Bridge",
"alertLevel": 120,
"location": {
"value": {"type": "Point", "coordinates": [7.4701, 51.3602]}
},
"dateObserved": "2026-10-01T08:12:00.000Z",
"floodLevelStatus": "Normal",
"hq": 0,
"measuredDistance": 245.3,
"currentLevel": 54.7,
"picture": "https://images.example.org/sites/551018.jpg",
"link": "https://dashboard.example.org/waterlevel551018"
}
]
}
| Field | Meaning |
|---|---|
id | urn:ngsi-ld:FloodMonitoring: followed by the instrumentation ID. |
type | Always FloodMonitoring. |
name | Configured name of the measuring point. |
alertLevel | Configured threshold level in centimetres; 0 if none is set. |
location | Location in NGSI-v2 style with a GeoJSON point under value, order longitude, latitude. |
dateObserved | Timestamp of the level value from Netilion; if the level value is missing, the time of the fetch. |
floodLevelStatus | Critical if a threshold greater than 0 is set and currentLevel reaches or exceeds it; otherwise Normal. |
hq | Flood class 0, 5, 10, 25, 50, 100 or 150 based on the six HQ limits; 0 if classification is disabled or fewer than six limits are given. |
measuredDistance | Measured distance in centimetres (Netilion delivers millimetres). Omitted if the distance value was not found. |
currentLevel | Water level in centimetres (Netilion delivers millimetres). Omitted if the level value was not found. |
picture | Image URL after placeholder substitution; omitted if empty. |
link | Dashboard URL after placeholder substitution; omitted if empty. |
Example flow
The package ships with an example flow. Import it in Node-RED via Menu → Import → Examples → @htag/node-red-contrib-hypertegrity-environment → eh-floodmonitoring. Alternatively download eh-floodmonitoring.json and import it via Menu → Import.
Two Inject nodes
'Go!' triggers the full fetch every hour; 'fastInterval' sets msg.fastInterval to true every 15 minutes and queries only critical measuring points.
E+H Floodmonitoring
The node is preconfigured without sensors and with Basic Auth. Enter credentials and measuring points before deploying.
Debug
A Debug node 'Output' shows the array of FloodMonitoring entities in the sidebar.
Show example flow as JSON
[
{"id": "tab1", "type": "tab", "label": "eh-floodmonitoring", "disabled": false, "info": ""},
{"id": "inject1", "type": "inject", "z": "tab1", "name": "Go!", "props": [{"p": "payload"}, {"p": "topic", "vt": "str"}], "repeat": "3600", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 200, "wires": [["eh1"]]},
{"id": "inject2", "type": "inject", "z": "tab1", "name": "fastInterval", "props": [{"p": "fastInterval", "v": "true", "vt": "bool"}], "repeat": "900", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 150, "y": 280, "wires": [["eh1"]]},
{"id": "eh1", "type": "eh-floodmonitoring", "z": "tab1", "name": "", "sensors": "[]", "authMethod": "basic", "x": 420, "y": 200, "wires": [["debug1"]]},
{"id": "debug1", "type": "debug", "z": "tab1", "name": "Output", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "x": 720, "y": 200, "wires": []}
]
Status and errors
| Indicator | Meaning |
|---|---|
| Red ring "no sensors" | No measuring points exist in the dialog or in msg.payload. The message "No sensors configured or provided in payload" is reported via node.error. |
| Green ring "cache filtered - 0 sensors" | After filtering via msg.fastInterval no measuring point remains. No message is sent. |
| Blue dot "fetching n sensors..." | Fetching n measuring points is in progress. |
| Green dot "n sensor(s) ok" | All measuring points were queried successfully. |
| Yellow dot "n ok, m err" | Some measuring points could not be queried; the successful ones are sent. |
| Red dot "n error(s)" | No measuring point could be queried. No message is sent. |
| Warning "Failed to fetch flood sensor …" | A single measuring point returned an error, for example due to an invalid ID or rejected credentials. |
| Warning "No API key configured …" | No API key is stored at startup. |
| Warning "OAuth mode selected but no API Secret configured." | OAuth is selected but the secret is missing. |
| Warning "OAuth token refresh failed …" | Token refresh failed; the node performs a full re-authentication. |
Errors are reported via node.error together with the triggering message and can be handled with a Catch node.
Notes
- Credentials and terms of use: Netilion is a commercial service of Endress+Hauser. API quotas and prices depend on your Netilion contract; clarify questions about conditions with Endress+Hauser or our sales team. Every measuring point causes one API request per fetch (timeout 15 seconds); with OAuth the token request is added.
- OAuth token: The token is valid for about 11 minutes. The node refreshes it 60 seconds before expiry via refresh token and re-authenticates if that fails.
- Context store: The list of critical measuring points lives in the node context under the key
cache. Without a persistent context store insettings.jsit is lost on restart; the next fetch withoutfastIntervalrebuilds it. - Admin endpoints: The buttons in the dialog use the endpoints
/eh-floodmonitoring/instrumentationsand/eh-floodmonitoring/valuesof the Node-RED server. They fall back to the node's stored credentials and log a diagnostic trace without secrets to the Node-RED log. - Units: Netilion delivers distance and water level in millimetres; the node emits centimetres. The HQ limits are entered in millimetres.
- Output format: The entity follows the Smart Data Model
FloodMonitoringin flat form; onlylocationis nested in NGSI-v2 style. Use the NGSI-LD Builder to shape the data for an NGSI-LD context broker. - Personal data: The entities contain measuring point names, coordinates and links that you assign yourself. Make sure not to include names or addresses of private individuals in names and URLs. Credentials are stored encrypted in the Node-RED credential store and never carried over into the output.