Hands-on with InfluxDB, Node-RED, and OPC UA
Now, let’s implement a flow that reads the CPU used by the OPC UA server implemented in Chapter 6. We will use Node-RED as the edge, write the signal to InfluxDB, and display it with the InfluxDB UI. We will leverage Docker to build the infrastructure.
The first step is to clone the official repo on a local PC:
$ git clone https://github.com/PacktPublishing/Hands-On-Industrial-Internet-of-Things-Second-Edition
Then, change the current directory to the Chapter
7
directory:
$ cd Hands-On-Industrial-Internet-of-Things-Second-Edition/Chapter7
Once you’ve cloned the repo, follow the following steps:
- Open command prompt and start the
opc-ua
server:$ cd node-opcua-sampleserver $ npm install $ npm start
Note that it is the same procedure implemented in Chapter 6.
- Start the InfluxDB server using
docker
:$ mkdir data $ docker run -p 8086:8086 -v data:/var/lib/influxdb2 --name=mytsdb influxdb:latest
- Open the...