Edge computing and IIoT
Earlier articles
Troubleshooting
Why MQTT Engine Filtered Namespaces works backwards
Filtered Namespaces on each MQTT Engine server connection is a deny list: name Sparkplug B on the connection that must not subscribe to it and the custom namespace on the other. The SUBACK return code 128 in the Failed subscribe line marks the filter the broker ACL denied, and its position names which one.
How-to
How to store MQTT messages in InfluxDB with Telegraf
No — InfluxDB has no MQTT client and cannot subscribe to topics. Run Telegraf beside it: the mqtt_consumer input subscribes to your topics and an InfluxDB output writes the parsed points. Publish line protocol, or set the parser to the format your device actually sends, and pick the output plugin that matches the server's write API.
How-to
Turn an MQTT topic into InfluxDB fields with Telegraf
Telegraf reads /temperature/boiler/room3 with payload 21.7 as a metric carrying a topic tag and a value field. A five-processor chain (regex, converter, regex, regex, pivot) renames the measurement, builds location=room3 and pivots the middle segment into the field key; one Starlark processor does the same in eight lines. Either way the output line is temperature,location=room3 boiler=21.7 with the original timestamp.
Troubleshooting
Telegraf MQTT consumer connects but writes no data to InfluxDB
An empty 0 / 10000 output buffer with both the MQTT and InfluxDB connections up means no metrics are reaching Telegraf's parser. Prove live delivery with a second subscriber on a different client ID before touching parser or buffer settings: the two startup connections are independent events, and with qos = 0 and a non-persistent session, traffic published while Telegraf is offline is unrecoverable.
How-to
How to query InfluxDB over MQTT with a bridge flow
InfluxDB does not answer queries over MQTT: it serves them over its HTTP API. Put a bridge on the edge PC — a Node-RED flow subscribed to a request topic — that maps a validated, bounded request to a query against the bucket and publishes the result to a separate response topic, so request and reply never loop.
Troubleshooting
Ignition Edge stuck starting after a Java trust store corruption
The gateway page stays at Gateway is starting because module initialization dies when Java cannot build its default SSL context — wrapper.log shows java.security.NoSuchAlgorithmException for DefaultSSLContext under SunJSSE. Copy cacerts and cacerts.bak out of lib\runtime\jre-win\lib\security in the installation the service runs, rename cacerts.bak to cacerts, restart the service, and the gateway comes up.
How-to
Setting historian pruning and retention for Ignition tag history
Prune tag history on the history provider, not with the transaction group's delete setting: in the Gateway's tag history configuration, enable data pruning and set a retention period in days. At 250 MB per day of growth, 30 days of retention holds about 7.5 GB and a full year about 91 GB. Deadband and Max Time Between Samples decide most of the daily rate, and QC records from transaction groups keep growing on a separate budget.
Troubleshooting
Fix InfluxDB database is locked on a network share
The mounted share is the first suspect: InfluxDB 2.5.1 opens its bolt file on the share, then fails SQL migrations with database is locked because SQLite file locking is not dependable on NFS or SMB. Stop every process that can reach the paths, confirm the active bolt-path and engine-path, prove the same configuration on local storage, then keep the engine local and use the share only for backups.
How-to
Connect Node-RED to InfluxDB 2.6 with the v2 API
Yes: node-red-contrib-influxdb writes to InfluxDB 2.6 over the v2 API. Set the configuration node to 2.0, enter the server URL and API token, then the organization and bucket, and confirm with one controlled test write that shows up in a query against that bucket.
Troubleshooting
Hold an Ignition Edge connection up through wireless dropouts
The Gateway Network fault budget is the ping interval multiplied by the missed-ping count: a 10 s interval with 60 missed pings gives the ten-minute window you want, but only if no lower timer - the fixed 30,000 ms WebSocket idle timeout on Ignition 8.1.2, a firewall state expiry, a radio reset - closes the TCP session first. If the path keeps resetting it, move to MQTT store-and-forward.
Troubleshooting
Why the Ignition Edge historian keeps disappearing
The Edge historian disappears because its saved record, not its module, is disabled: the EdgeHistorian row in config.idb's TAGHISTORYPROVIDEREP table carries ENABLED = 0, so startup skips registering the provider while Tag Historian reports Running. Back up config.idb, set ENABLED to 1, and the provider holds across reboots; a module restart only restores it until the next start.
Comparison
MQTT Recorder or Tag Historian for plant data
Tag Historian stores timestamped values for individual tags in a SQL database, built for trends and time-based queries. MQTT Recorder receives a block of data from an MQTT server and inserts it as one row in a database table, built for completed field-generated records such as tickets and batch results. Choose by the unit of information, then put buffering where the link fails.