Giter Club home page Giter Club logo

device-opcua-go's Introduction

OPC-UA Device Service

Overview

This repository is a Go-based EdgeX Foundry Device Service which uses OPC-UA protocol to interact with the devices or IoT objects.

Feature

  1. Subscribe data from OPCUA endpoint
  2. Execute read command
  3. Execute write command

Prerequisite

  • MongoDB
  • Edgex-go: core data, core command, core metadata
  • OPCUA Server

Predefined configuration

Pre-define Devices

Define devices for device-sdk to auto upload device profile and create device instance. Please modify configuration.toml file which under ./cmd/res folder

# Pre-define Devices
[[DeviceList]]
  Name = "SimulationServer"
  Profile = "OPCUA-Server"
  Description = "OPCUA device is created for test purpose"
  Labels = [ "test" ]
  [DeviceList.Protocols]
      [DeviceList.Protocols.opcua]
          Endpoint = "opc.tcp://Burning-Laptop:53530/OPCUA/SimulationServer"

Subscribe configuration

Modify configuration.toml file which under ./cmd/res folder if needed

# Driver configs
[Driver]
  DeviceName = "SimulationServer"   # Name of Devcice exited
  Policy = "None"                   # Security policy: None, Basic128Rsa15, Basic256, Basic256Sha256. Default: auto
  Mode = "None"                     # Security mode: None, Sign, SignAndEncrypt. Default: auto
  CertFile = ""                     # Path to cert.pem. Required for security mode/policy != None
  KeyFile = ""                      # Path to private key.pem. Required for security mode/policy != None
  NodeID = "ns=5;s=Counter1"        # Node id to subscribe to

Devic Profile

A Device Profile can be thought of as a template of a type or classification of Device.

Write device profile for your own devices, difine deviceResources, deviceCommands and coreCommands. Please refer to cmd/res/OpcuaServer.yaml

Tips: name in deviceResources should consistent with OPCUA nodeid

Installation and Execution

make build
make run

Reference

device-opcua-go's People

Contributors

burning1020 avatar jwagantall avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.