Pi Sensor Data into Ignition

I have a Pi 4B that I’m looking to get data from.

Attached to the Pi is:

When I SSH into the Pi and view the files that the Sensor Hub uses, there is one executable that can be run in the terminal which outputs the following:

pi sensor

If you run it for too long in the console, it will state something like “too many files open”.

So ultimately, I’d like to get this data into Ignition (8.1.18). What are my options?

This is for R&D so I have at my disposal MQTT modules, and also a Groov-EPIC on the network (I recall seeing Node-Red as a viable option on Pi).

For me Node-red would be the easiest way since you have access to MQTT in ignition. Node red can read the sensor values and post them using sparkplug node, then they will appear like tags in the designer.

Docker sensor Hub
Sparkplug Node

1 Like

You are going to have to write code to read data from the module via I2C. You could then make that data available using MQTT, but if your end goal is to get it into Ignition I personally think it is easier to implement a Modbus TCP server using an off-the-shelf library (there are loads available) and read the data from Ignition using Modbus. That way you don’t have the extra layers and expense of MQTT.

1 Like

Just to add, if that sensor does prove to be more trouble then its worth getting the code, the official pi sense hat has a dedicated node-red flow to get the data.

You could also go down the OPC route…

Never tried that node before so cant comment on its effectiveness but would be cheaper then MQTT if you don’t have the MQTT license.

1 Like