Use EMQ* IoT Messaging Platform with Intel® Edge Insights for Industrial (Intel® EII)

ID 标签 730359
已更新 10/12/2022
版本 3.0
公共

author-image

作者

Overview

When collecting industrial data generated by various types of devices and other intelligent sensors, you need a protocol gateway software to parse the different industrial protocols, including Modbus, OPC Unified Architecture (OPC UA), IEC 104, Siemens* S7 and others. Neuron*, an industrial gateway software, can parse dozens of commonly used protocols to the MQTT protocol. After parsing, industrial data is transmitted in MQTT protocol and then sent to EMQ X, an MQTT message broker. This Neuron + EMQ X data ingestion flow can be integrated with the TICK stack in Intel® Edge Insights for Industrial (Intel® EII).   

Using EMQ* IoT messaging platform with Intel® EII, you can realize real-time industrial data collecting, monitoring, and processing. Coding is not required, as Neuron and EMQ X both provide Docker* images on Docker Hub. 

Select Configure & Download to download Edge Insights for Industrial 4.0 with Time Series Use Case and then follow the steps below in Get Started.

Configure & Download

 

Icon for 3rd party Industrial

 


Target System Requirements 

Minimum System Requirements:  

  • 8th generation or higher Intel® Core™ processors with Intel® HD Graphics.
  • 8th generation or higher Intel® Xeon® processor. 
  • At least 4 GB RAM.  
  • At least 128 GB hard drive.  
  • An Internet connection.  
  • Ubuntu* 20.04

How It Works 

Edge Insights for Industrial uses the TICK stack for time-series data analytics. Telegraf*, InfluxDB* and Grafana* are parts of the TICK stack of Intel® EII. When using EMQ IoT messaging platform with Intel® EII, industrial protocol gateway software Neuron and MQTT message broker EMQ X can ingest various industrial data before Telegraf in the TICK stack.

The high-level flow of data is as follows: Modbus Simulator -> Neuron -> EMQ X -> Telegraf -> Influx -> Kapacitor* -> Influx. 

  • Modbus Simulator generates Modbus data. 
  • Neuron parses data in the Modbus protocol to data in the MQTT protocol.  
  • EMQ X republishes the message in the MQTT protocol in Pub/Sub mode. 
  • Telegraf is configured to input MQTT and subscribes data from EMQ X. 
  • InfluxDB is connected to Telegraf to store the data. Data can be monitored by printing out the InfluxDB logs, or by logging into Grafana to see the dashboard.  

When using EMQ IoT messaging platform with Intel® EII, all the modules are running on the same node.

Architecture Diagram for IoT Device Data Ingestion
Figure 1: Architecture Diagram

 

 


Get Started 

Prerequisites 

Select Configure & Download to download Edge Insights for Industrial 3.0 with Time Series Use Case. For requirements and installation steps, refer to the Edge Insights for Industrial Get Started Guide.

Configure & Download

Step 1: Run Intel® EII Time Series with EMQX

  1. Generate EII time series deployment and configuration files:
    cd [WORK_DIR]/IEdgeInsights/build
    python3 builder.py -f usecases/time-series.yml 
  1. Get docker-compose.yml with EMQ software from docker-compose.yml, and replace [WORK_DIR]/IEdgeInsights/build/docker-compose.yml with the new one.
  1. Download server_config.json  in [WORK_DIR]/IEdgeInsights/build 
  1. Start EII time series use case with EMQX: 
    cd [WORK_DIR]/IEdgeInsights/build
    ./docker-compose up -d
  2. Check if all the services are up:

    docker ps

    Screenshot for docker compose

Step 2: Configure Neuron 

  1. Open a web browser and enter NEURON_IP:7000. The username is admin and the password is 0000.
    In this use case, Neuron’s IP address can be the local IP. 
  2. Add a south device named modbus_server and a modbus-tcp plugin. 
    Browser window showing how to add a device.
    Figure 2: Add South Device

     
  3. Click on Device configuration on the modbus_server tab to add configuration.
    Browser window showing device configuration dialog.
    Figure 3: Configure South Device


     
  4. Click on the modbus_server tab to add a group.
    Browser window showing Create Group dialog.
    Figure 4: Add South Device Group


     
  5. Click on the Tag List icon on group item to add a tag.
    Browser window showing Add Tags dialog.
    Figure 5: Add South Device Tag


     
  6. Add a north application named mqtt_broker.
    Browser window showing Add App dialog.
    Figure 6: Add North Application


     
  7. Click on Application configuration on the mqtt_broker tab to add configuration.
    Browser window showing Application Configuration dialog.
    Figure 7: Configure North Application



     
  8. Click on the mqtt_broker tab to add a subscription.
    Browser window showing Add Subscription dialog.
    Figure 8: Add North Subscription



    If successful, the connection status of mqtt_broker should be connected. 

 

Step 3: Configure EMQX  

  1. Open a web browser and type EMQX_IP:18083. Username is admin and the password is public.
  2. Click on Rule under the Rule Engine tab and create a rule.
  3. Add SQL Rule condition.
    SELECT
      payload.timestamp as tstp,
      payload.values.tag1 as tag1
    FROM
      "/neuron/mqtt_broker/upload" 
     
    Browser window showing Create Rule dialog.
    Figure 9: Add SQL Rule

     
  4. Add action handler. 
    {“tstp”:${tstp},”value”:${tag1}} 

    Click Confirm after you finish.
     
    Web browser showing action handler.
    Figure 10: Add Action Handler

 

Step 4: View Data from InfluxDB Log and Grafana 

  1. Print InfluxDB log to view the connection with the command: 
    docker logs ia_datastore
    If successful, you can see the value=256 in the output, which is the value we set in the modbus-server. 

     

  2. Log into Grafana to monitor the data. Open web browser and type Grafana_IP:3000. Username is root and password is eii123.
    Create a new panel and select ts_data in FROM, field(value) in SELECT.
     
    Web browser showing Grafana screen.
    Figure 11: Grafana Log In Screen

     

Summary and Next Steps 

After using EMQ IoT messaging platform with Intel® EII, you will receive industrial data with Neuron + EMQ X data ingestion flow integrated with the TICK stack in Intel® EII.  

As a next step, add rules and algorithms, such as anomaly detection in Kapacitor*, to complete the full workflow of industrial data processing and monitoring.


Learn More 

To continue learning, see the following guides and software resources: 


Troubleshooting 

To check if the connections of the Modbus simulator to Neuron and Neuron to EMQ X are healthy, find the connection status in the Neuron web console, as shown in the examples below.

Browser window showing connection status of South Devices.
Figure 12: Connection Status of South Devices

 

 

Browser window showing connection status of North Application.
Figure 13: Connection Status of South Devices

 


Support Forum 

If you're unable to resolve your issues, visit Forum, Slack or GitHub for technical support of Neuron and EMQ X.