Our Data Model

Quick description of our data model

Topics and their meanings

For implementing a Node-RED flow one first needs to understand how we at UMH defined the data transfer. It is designed in the way of a three level architecture in which each level is represented by one subflow in Node-RED.

1. Subflow: Data Extraction under the Highlevel topic /raw

As a first step we always want to safe all messages from sensors (retrofitted and internal) in the form of there arrival. We don’t want to process the messages at this point. Like a neanderthal we want to grab every piece of data we could possibly use later. But keep in mind the frequency with that you’re scanning the sensors and machines for data (Once or ten times per second are two whole different pair of shoes).

2. Subflow: Data Processing under specified topics

When working on this flow we are at a stage where we have all the data produced by the machine available in the cloud provided by our MQTT broker. So we now want to perform some basic calculations on them. For example:

  • /addShift → Grafana (where data gets visualized) always needs a shift to start with its analytics. For that we ask the client for the shift’s start and end. After that we take this information and implement it in the server’s Node-RED flow. The virtual shift shall start and end when the real one does.
  • /processValue → Under this topic all values of interest can be stored in sub-topics. Examples can be seperated sensor data, produced length, all kinds of errors, temperatures, speeds, etc. Almost everything you want to process further and place on the dashboard in any way.
  • /detectedAnomaly → Whenever something happens so that the production has to stop, a message shall be sent here. In addition, we want to also send the reason inside the msg.payload (the body of a MQTT-message where all the information is located).
  • /count → Whenever a machine produces something it normally produces piece-by-piece (one or a few products at the time). Under this topic we want to count the overall output a machine produces over time.
  • /activity → The message under this topic is about the machine’s activity. Is it running or not?

Most Important: These are just the basic functions you should always include in your Node-RED flow. But, there are so many more you can think of and design yourself. To get an impression go to our documentation. In a nutshell, all combinations and mathematical operations of the input variables can be calculated. Always ask the client and user and think of what can be valuable!

3. Subflow: Data Processing under the /state topic

In addition to the subflow that we created under step 2, there is at least one last /topic that is very important: the machine state.

Here we combine output messages from step 2 to gather all the information needed to perform relevant analysis on overall conditions. Similar to step 2 also here other information than only the machine state can be of interest. Creativity is you friend! ^^

Rules

Last modified February 17, 2023: update (#208) (ea731fc)