This section demonstrates how Node-RED, Grafana, and InfluxDB integrate within the Direct-Connect (DC) Node data pipeline.
We’ll start by exploring a test node setup, running a sensor script, and understanding how MQTT communication fits into the overall workflow.
-
Log in to the test node.
-
Open a new shell and navigate to the GitHub repository folder:
su teamlary cd /home/teamlary/gitHubRepos/iotSystemsGuide/DCNodes/firmware/xu4Mqtt/
The DCNodes directory contains a representative codebase for operating Direct-Connect (DC) Nodes on single-board computers (SBCs).
Inspect the file bme280Reader.py — this script provides a basic implementation of a climate sensor (BME280) used in live deployments.
Execute the script:
python3 bme280Reader.pyThen, log in to InfluxDB to verify if recent data (from the last 5 minutes) is available.
- Visit: http://mdash.circ.utdallas.edu:8086/
- Log in using your credentials.
- Navigate to the
sharedAirDFWbucket. - Filter by:
- Node Name
- Sensor ID
You can identify the correct node name using the id_lookup.csv file.
⚠️ Since MQTT is not yet activated on the node, you will not see any live data at this stage.
Open the mintsSensorReader file and uncomment the final two lines in the sensorFinisher() function, then rerun bme280Reader.py.
def sensorFinisher(dateTime, sensorName, sensorDictionary):
print("-----------------------------------")
print("-------- Sensor Finisher ----------")
print(sensorName)
writePath = getWritePath(sensorName, dateTime)
exists = directoryCheck(writePath)
writeCSV2(writePath, sensorDictionary, exists)
print(writePath)
if(latestOn):
mL.writeJSONLatest(sensorDictionary, sensorName)
if(mqttOn):
mL.writeMQTTLatest(sensorDictionary, sensorName)Once MQTT is enabled, you should begin seeing live data arriving from the node.
However, this will only work if the node is already registered in the workflow. Next, we’ll simulate a scenario where the node is brand new.
To simulate adding a new node, open mintsDefinitions.py and comment out line 30 as shown below:
# nodeID = findMacAddress()
nodeID = "a0b1c2d3e4f5g6"Then rerun:
python3 bme280Reader.pyCheck again in InfluxDB for data under this new node ID.
You’ll notice no data appears — this is expected.
The node hasn’t yet been registered in the system.
The following section describes how to register new nodes so their data is accepted by the InfluxDB workflow.


