When introducing a new sensor into the MINTS system, a few configuration steps are required to ensure the data is properly encoded, transmitted, decoded, and stored.
In this example, we’ll add a new sensor named ISG001, which measures basic environmental parameters.
Let’s say your new sensor, ISG001, produces the following data fields:
ISG001_payload = (
np.float32(sensorDictionary["temperature"]).tobytes().hex().zfill(8) +
np.float32(sensorDictionary["pressure"]).tobytes().hex().zfill(8) +
np.float32(sensorDictionary["humidity"]).tobytes().hex().zfill(8) +
np.float32(sensorDictionary["altitude"]).tobytes().hex().zfill(8) +
np.float32(sensorDictionary["feelsLike"]).tobytes().hex().zfill(8)
)Each value is converted to bytes (float32 → 4 bytes) and concatenated to form a hexadecimal payload string.
Before assigning this new sensor, check whether the sensorID already exists in
lrSensorAndPortIDs.py.
If it’s not already defined, assign a new port ID (for example, 201) and update the file accordingly.
-
Duplicate the existing BME280 transmitter as a starting point:
cp bme280Transmitter.py isg001Transmitter.py
-
Modify
isg001Transmitter.pyto use your new ISG001 sensor definition (as shown above), and then run it:python3 isg001Transmitter.py
At this point, the new sensorID will not yet appear in InfluxDB, since it hasn’t been registered in the Node-RED workflow for decoding and data routing.
Open the Node-RED interface and navigate to the LoRa Node → InfluxDB tab.
-
Update the LoRaSummaryWrite function
Add the new Sensor ID and Port ID mapping:201: "ISG001"
-
Modify the sensorIDCheck switch node
Double-click on it and add an entry for your new sensor.
-
Duplicate an existing “Unpack” function
Copy one unpack node, paste it, rename it (e.g.,ISG001 Unpack V2), and update its decoding logic for your fields.
-
Reconnect workflow links
Link the new unpack node between:- The
sensorIDCheckswitch node → yourISG001 Unpack V2 - Your
ISG001 Unpack→Set Device Name for MINTS Nodes
- The
-
Deploy the updated flow to apply the changes.
Export your current Node-RED instance to keep the configuration synced with the cloud version.
Select All Flows and click Download.
Then upload the downloaded file to the Node-RED Docker folder in the
AirQualityAnalysisWorkflows repository.
ssh jxw190004@mdash.circ.utdallas.edu
⚠️ Make sure you have SSH access configured.
cd AirQualityAnalysisWorkflows/
git pullGo to the InfluxDB directory and list running containers:
cd influxdb
podman container lsYou’ll see output similar to:
CONTAINER ID IMAGE COMMAND STATUS PORTS
33bad6576ec5 localhost/mints-nodered:latest Up 2 months ago 0.0.0.0:1880->1880/tcpStop and remove the Node-RED container only (leave InfluxDB running):
podman stop 33bad6576ec5
podman rm 33bad6576ec5Then rebuild and restart:
podman-compose up --build -dexitFinally, rerun your transmitter:
python3 isg001Transmitter.pyConfirm that the new ISG001 sensor data is appearing correctly in InfluxDB.
At this point, your new sensor is fully registered in the MINTS IoT workflow.