Coder Social home page Coder Social logo

azure-iiot-opc-twin-module's Introduction

Azure Industrial IoT OPC Twin Module

The OPC Twin module runs on the edge and provides serveral edge services to the OPC Twin and Registry Services.

Core of the module is the Supervisor identity. The supervisor manages endpoint "twins", which correspond to OPC UA server endpoints that are activated using the corresponding OPC UA registry API. These endpoint twins translate OPC UA JSON received from the Twin micro service running in the cloud into OPC UA binary messages which are sent over a stateful secure channel to the managed endpoint.

The supervisor also provides discovery services which send device discovery events to the OPC UA Device Onboarding service for processing, where these events result in updates to the OPC UA registry.

The OPC Twin module can be deployed in an IoT Edge gateway. For development and testing purposes it can also be run standalone following the instructions below.

This module is part of our suite of Azure IoT Industrial components.

Using the module

A pre-built image exits in Microsoft's container registry and can be obtained by running docker pull mcr.microsoft.com/iotedge/opc-twin:latest.

To use it follow the instructions on how to deploy the module to IoT Edge:

  • Instructions on how to deploy a module to one or a set of IoT Edge targets.
  • Instructions on how to install IoT Edge on Linux and on Windows.

Install one IoT Edge gateway and module per factory network. Make sure you run one or more OPC UA servers in the same network to utilize the OPC Twin capabilities.

Build and Run

To build and run the module yourself, clone the repository. Then...

Install any tools and dependencies

Deploy Azure Services

Follow the instructions here to deploy all required services for local development. Copy the resulting .env file into this repository's root (or into the parent folder).

Building and running locally using Docker (Quick start mode)

  1. Make sure the Prerequisites are set up.
  2. Change into the repo root and ensure the .env file containing an entry for PCS_IOTHUB_CONNSTRING exists.
  3. Start the module by running docker-compose up.

Also, make sure you run one or more OPC UA servers in a network reachable from your development machine to utilize the OPC UA Twin capabilities.

Build, run and deploy the module to IoT Edge (Production)

  1. To build your own module container image and deploy it make sure the Prerequisites are set up.
  2. Change into the repo root and run docker build -f docker/linux/amd64/Dockerfile -t azure-iiot-opc-twin-module .
  3. Then push the module to an accessible registry, e.g. Azure Container Registry, or dockerhub.
  4. Follow the instructions on how to deploy the module to IoT Edge [here][#Using-the-module].

Building and running the module with Visual Studio or VS Code

  1. Make sure the Prerequisites are set up.
  2. Change into the repo root and ensure the .env file containing an entry for PCS_IOTHUB_CONNSTRING exists.
  3. Open the azure-iiot-opc-twin-module.sln solution file in Visual Studio or VS Code
  4. Configure the Microsoft.Azure.IIoT.Modules.OpcUa.Twin.Cli project properties to pass --host as command line argument when starting.
  5. Set the Microsoft.Azure.IIoT.Modules.OpcUa.Twin.Cli as startup project and start debugging (e.g. by pressing F5).

Contributing

Refer to our contribution guidelines.

Feedback

Please enter issues, bugs, or suggestions as GitHub Issues here.

License

Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License.

azure-iiot-opc-twin-module's People

Contributors

barnstee avatar marcschier avatar microsoftopensource avatar msftgits avatar scovetta avatar

Watchers

 avatar  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.