How to Modify the Configuration of Device Access
1. Edit edgedevice.yaml
the file
Before connecting the device, you need to edgedevice.yaml
edit the file. For different protocols, protocolSettings
further configuration can be performed according to the protocol. For detailed configuration, please go to Shifu API Reference.
...
connection: Ethernet
address: 0.0.0.0:11112
protocol: HTTP
protocolSettings:
OPCUASetting:
...
connection
: Indicates the network connection method of the device.address
: Indicates the network address of the device.protocol
: Indicates the communication protocol for interacting with the device.protocolSettings
: Indicates the next step of setting the protocol, and different settings need to be introduced for different protocols .
2. Create deviceshifu
After modifying the above files, you can create deviceshifu . At this time, deviceshifu will try to connect to your device through the configuration you set.
3. Detect device access status
If you kubectl get pods -n deviceshifu
find that the deviceshifu status appears Error
or through the command CrashLoopBackOff
, it means that the connection is abnormal.
You can also kubectl logs <NAME> -n deviceshifu
print error messages by command.
Access an OPC UA device through configuration
connection: Ethernet
address: opc.tcp://192.168.0.111:4840/freeopcua/server
protocol: OPCUA
protocolSettings:
OPCUASetting:
SecurityMode: None
ConnectionTimeoutInMilliseconds: 5000
AuthenticationMode: UserName
Username: user1
Password: pwd1
Through the above configuration, address
set the address of your OPC UA device, protocol
set it OPC UA
, protocolSetting
join OPCUASetting
, and configure SecurityMode
(information security mode), ConnectionTimeoutInMilliseconds
(connection timeout), AuthenticationMode
(authentication default) and account password, etc.
After modifying the above configuration, create a deviceshifu to access the OPC UA device.
This article is published by Boundless Authorization