Skip to main content
Data Connectors · Environment

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.

  • Data source
  • Trigger-based
  • FloodMonitoring
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 Normal or Critical, 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​

1

Trigger

An incoming message starts the fetch. Optionally it brings its own sensor list or the fastInterval flag.

2

Authenticate

Depending on the method, API key and user are sent via Basic Auth, or an OAuth token is requested and refreshed automatically.

3

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.

4

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​

FieldTypeDefaultMeaning
NameTextemptyDisplay 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.

FieldTypeDefaultMeaning
Sensor IDSelect with refresh buttonemptyID of the instrumentation in Netilion. The button loads up to 100 instrumentations of your account; tag and serial number are displayed. Stored as id.
NameTextemptyDisplay name of the measuring point. Carried over into the entity. Stored as name.
Distance ValueSelectempty (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 ValueSelectempty (equals level)Key of the value that provides the water level. Stored as levelKey.
Latitude (Lat), Longitude (Lon)NumberemptyCoordinates of the measuring point in decimal degrees. Missing values are emitted as 0. Stored as lat and lon.
Threshold Level (cm)NumberemptyWater level in centimetres from which the status Critical is set. 0 or empty disables the check. Stored as thresholdLevel.
Threshold Distance (cm)NumberemptyDistance threshold in centimetres. Stored as thresholdDistance.
HQ ThresholdsCheckboxoffEnables classification into flood classes. Stored as useHQThresholds.
HQ Thresholds (comma separated)TextemptySix ascending limits in millimetres, separated by commas (example below). Stored as hqThresholds.
Image URLTextemptyAddress 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 URLTextemptyAddress 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​

FieldTypeDefaultMeaning
Authentication MethodSelect (basic, oauth)basicBasic 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 KeyPassword (credential)emptyAPI key of your Netilion application. Stored encrypted and sent in the header Api-Key with every request.
API SecretPassword (credential, OAuth only)emptySecret of your Netilion application for the token request. Stored encrypted.
UsernameText (credential)emptyUsername of your Netilion account.
PasswordPassword (credential)emptyPassword of your Netilion account. Stored encrypted.
Registration with Netilion

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​

PropertyTypeMeaning
msganyEvery message starts a fetch. All properties of the message are kept in the output; payload is overwritten.
msg.payloadArray (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 = trueBoolean (optional)Fast interval: only measuring points that had the status Critical in the last fetch are queried.
msg.fastInterval = falseBoolean (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"
}
]
}
FieldMeaning
idurn:ngsi-ld:FloodMonitoring: followed by the instrumentation ID.
typeAlways FloodMonitoring.
nameConfigured name of the measuring point.
alertLevelConfigured threshold level in centimetres; 0 if none is set.
locationLocation in NGSI-v2 style with a GeoJSON point under value, order longitude, latitude.
dateObservedTimestamp of the level value from Netilion; if the level value is missing, the time of the fetch.
floodLevelStatusCritical if a threshold greater than 0 is set and currentLevel reaches or exceeds it; otherwise Normal.
hqFlood 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.
measuredDistanceMeasured distance in centimetres (Netilion delivers millimetres). Omitted if the distance value was not found.
currentLevelWater level in centimetres (Netilion delivers millimetres). Omitted if the level value was not found.
pictureImage URL after placeholder substitution; omitted if empty.
linkDashboard 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.

Step 1

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.

Step 2

E+H Floodmonitoring

The node is preconfigured without sensors and with Basic Auth. Enter credentials and measuring points before deploying.

Step 3

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​

IndicatorMeaning
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 in settings.js it is lost on restart; the next fetch without fastInterval rebuilds it.
  • Admin endpoints: The buttons in the dialog use the endpoints /eh-floodmonitoring/instrumentations and /eh-floodmonitoring/values of 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 FloodMonitoring in flat form; only location is 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.

References​