Skip to content

ysimonx/OpcuaToJson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpcuaToJson

by Yannick Simon

The main goal of this repo is to build a python script that converts any OPCUA data to JSON.

In addition, each variables nodes are subscribed and the JSON data are updated when the OPCUA node values change

Installation

sudo apt install python3-venv
python3 -m venv ./env
source ./env/bin/activate
pip install opcua jsonpath_ng cryptography

Run

  • Convert an OPCUA folder of nodes to a JSON file
  • Subscribe to each variable and update JSON file

source ./env/bin/activate
python OpcuaToJson.py -u opc.tcp://MacBook-Air-M1.local:53530/OPCUA/SimulationServer -p "Root/Objects/Simulation" -o ./export_opcua.json -d 2

Exemple with Prosys Simulation Server

cf : www.prosysopc.com these variables changes each second

Capture d’écran 2023-03-12 à 21 01 16

Capture d’écran 2023-03-12 à 20 57 38

About

Converts a OPCUA folder of nodes to JSON

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors