# OPC UA package? ( Open Platform Communications Unified Architecture)

**URL:** <https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336>\
**Category:** Data\
**Created:** [February 9, 2023, 11:38am UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336 "2023-02-09T11:38:20Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [February 9, 2023, 11:38am UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/1 "2023-02-09T11:38:20Z")

</div>

Is there a Julia version of [python-opcua](https://python-opcua.readthedocs.io/en/latest/index.html) or something equivalent?

---

<div class="post-metadata">

**Author:** ![Deduction42](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/deduction42/32/9206_2.png) [@Deduction42](https://discourse.julialang.org/u/Deduction42)\
**Post date:** [March 13, 2023, 9:39pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/2 "2023-03-13T21:39:18Z")

</div>

Not that I know of. About four years ago I had Julia program that called a Python opc package through PyCall as a proof-of-concept that we never pursued further (I can’t remember which Python package it was). Back then I wasn’t surprised that Python had the package and Julia didn’t.

Fast-forward to today, I’m actually surprised I can’t find a Julia package for this; I’d half expect to find one that was further along than Python. MATLAB has had opc-ua for ages, and over the past four years, Julia’s package ecosystem has become generally better at covering MATLAB functionality than Python, especially in anything related to the process control space. All these packages are excellent and very useful for industrial data science and (advanced) process control:

- [GitHub - JuliaControl/ControlSystems.jl: A Control Systems Toolbox for Julia](https://github.com/JuliaControl/ControlSystems.jl)
- [GitHub - JuliaControl/RobustAndOptimalControl.jl: Robust and optimal design and analysis of linear control systems](https://github.com/JuliaControl/RobustAndOptimalControl.jl)
- [GitHub - baggepinnen/ControlSystemIdentification.jl: System Identification toolbox for LTI systems, compatible with ControlSystems.jl](https://github.com/baggepinnen/ControlSystemIdentification.jl)
- [Optim.jl](https://julianlsolvers.github.io/Optim.jl/stable/)
- [GitHub - SciML/DifferentialEquations.jl: Multi-language suite for high-performance solvers of differential equations and scientific machine learning (SciML) components. Ordinary differential equations (ODEs), stochastic differential equations (SDEs), delay differential equations (DDEs), differential-algebraic equations (DAEs), and more in Julia.](https://github.com/SciML/DifferentialEquations.jl)
- [GitHub - SciML/ModelingToolkit.jl: An acausal modeling framework for automatically parallelized scientific machine learning (SciML) in Julia. A computer algebra system for integrated symbolics for physics-informed machine learning and automated transformations of differential equations](https://github.com/SciML/ModelingToolkit.jl)

They even have a lot of this wrapped up in their JuliaSimControl product. All this and yet no straightforward way to provide an opc-ua connection to make all these amazing tools to seamlessly talk to the outside world. It’s really quite a shame to have all this great stuff metaphorically locked away in a box with no easy opc-ua protocols (although it’s kind of a weak box, you can always call another language to implement the opc-ua communication). It just seems like it would be a natural fit to the Julia ecosystem though.

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [March 14, 2023, 5:55am UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/3 "2023-03-14T05:55:25Z")

</div>

I think this is a general problem. Julia is mostly academic and you can’t write a paper about an OPC-UA package or an interface for a DB.

---

<div class="post-metadata">

**Author:** ![vettert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vettert/32/30599_2.png) [@vettert](https://discourse.julialang.org/u/vettert)\
**Post date:** [October 6, 2023, 5:30pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/4 "2023-10-06T17:30:58Z")

</div>

Well, how do people go about this? Import data through OPC and matlab/python? Then feed back through matlab/python whatever needs controlling? Seems a little, well, hacky.

Anyone wanting to start a project on this?

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [October 6, 2023, 6:28pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/5 "2023-10-06T18:28:55Z")

</div>

Probably this would be a good starting point [https://www.open62541.org/](https://www.open62541.org/)

---

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [October 8, 2023, 10:40am UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/6 "2023-10-08T10:40:41Z")

</div>

I suppose one would first create a JLL package for the open62541 library before making a julia interface/wrapper package?

---

<div class="post-metadata">

**Author:** ![ohmsweetohm1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ohmsweetohm1/32/49126_2.png) [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Post date:** [October 8, 2023, 2:30pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/7 "2023-10-08T14:30:31Z")

</div>

I guess someone tried that already: [https://github.com/JuliaPackaging/Yggdrasil/tree/master/O/open62541](https://github.com/JuliaPackaging/Yggdrasil/tree/master/O/open62541)

---

<div class="post-metadata">

**Author:** ![vettert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vettert/32/30599_2.png) [@vettert](https://discourse.julialang.org/u/vettert)\
**Post date:** [October 8, 2023, 8:02pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/8 "2023-10-08T20:02:07Z")

</div>

Yes, and here’s the jll: [JuliaBinaryWrappers/open62541\_jll.jl (github.com)](https://github.com/JuliaBinaryWrappers/open62541_jll.jl)

It’s for a Aug 2021 version and as far as I can tell ( [open62541\_jll · JuliaHub](https://juliahub.com/ui/Packages/General/open62541_jll/1.2.2+0)) it has no dependents.

So, first step would be to maybe update the JLL and then think about a wrapper package? I’ll see what I can get done regarding the former this week. (I never did that before, so if there’s someone willing to volunteer who did it before: be my guest 🙂 ).

---

<div class="post-metadata">

**Author:** ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)\
**Post date:** [October 8, 2023, 11:30pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/9 "2023-10-08T23:30:28Z")

</div>

> [@vettert](#):
>
> first step would be to maybe update the JLL

This might just require changing the version and GitSource SHA

```julia
name = "open62541"
version = v"1.3.7" # <-- updated to v"1.3.7" (Sept 7 release)

# Collection of sources required to complete build
sources = [
    GitSource("https://github.com/open62541/open62541.git",
              "b8ac9e77f703e6ba5c012b886a8821037503daa6"), # <-- updated
    DirectorySource("./bundled"),
]

```

> [@vettert](#):
>
> think about a wrapper package

The author of that Yggdrasil `build_tarball.jl` also seems to have an unregistered wrapper package on their personal GitHub page: [GitHub - martinkosch/open62541.jl: A Julia wrapper for the open62541 open source implementation of OPC UA](https://github.com/martinkosch/open62541.jl)

---

<div class="post-metadata">

**Author:** ![vettert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vettert/32/30599_2.png) [@vettert](https://discourse.julialang.org/u/vettert)\
**Post date:** [October 9, 2023, 5:04pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/10 "2023-10-09T17:04:26Z")

</div>

Ok, updated the jll package to the latest release of open451, link as above. Turned out that some tweaking was necessary (removing the outdated patches etc.).

I’ll fork the .jl package later and will give it a brief test with this new version of the jll.

Also will contact the original author. Maybe there is some scope of moving the package to an organization.

---

<div class="post-metadata">

**Author:** ![caxelrud](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@caxelrud](https://discourse.julialang.org/u/caxelrud)\
**Post date:** [November 20, 2023, 4:56pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/11 "2023-11-20T16:56:40Z")

</div>

Hi. I am also interested in the OPC-UA for Julia. Is there any development or plans related to this topic? I can help (at least with testing).

---

<div class="post-metadata">

**Author:** ![vettert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vettert/32/30599_2.png) [@vettert](https://discourse.julialang.org/u/vettert)\
**Post date:** [November 21, 2023, 4:31am UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/12 "2023-11-21T04:31:41Z")

</div>

Hi,  
I made some progress after my last post. Turns out that the wrapper package didn’t work anymore with the new open62541 versions that I got onto Yggdrasil (which wasn’t as straightforward either - as usual, I guess).

Then spent some time to improve the wrapper package (open62541.jl mentioned above). Focussing on automating and cleaning up code generation, introducing very primitive tests (essentially testing against some of the tutorials on the [open62541.org](http://open62541.org) website) and fixing some bugs.

I am now close to being able to push an update to the wrapper package. Trying to get there by end of this week 🙂

The original author has also been kind in replying to my issue post on the wrapper package. So, there is some scope to getting things rolling!

---

<div class="post-metadata">

**Author:** ![vettert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vettert/32/30599_2.png) [@vettert](https://discourse.julialang.org/u/vettert)\
**Post date:** [November 30, 2023, 7:28pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/13 "2023-11-30T19:28:05Z")

</div>

Just an update: the original author, Martin Kosch, and I are working on a PR. Mainly introducing tests and adding some basic functionality. Status is visible here: [Thomvet patch by thomvet · Pull Request #5 · martinkosch/open62541.jl · GitHub](https://github.com/martinkosch/open62541.jl/pull/5)

---

<div class="post-metadata">

**Author:** ![vettert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vettert/32/30599_2.png) [@vettert](https://discourse.julialang.org/u/vettert)\
**Post date:** [December 6, 2023, 9:29am UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/14 "2023-12-06T09:29:18Z")

</div>

We merged a PR that brings the package back to a usable state.

There will be some more improvements necessary before we are cutting a release and register it in the General registry. Not least of all, we will have to generate some documentation and usage examples, because right now the documentation exists of only the automatically generated docstrings (via Clang.jl, i.e., these are comments that are in the C header file…) - very barebones obviously.

Also, a warning: At the moment, we are exporting everything, so the API surface is huge and we would technically have lots of breaking changes. There’s a discussion to be had what we want to export. Work in progress 🙂

If you want to start using it, that’s of course welcome, but thread carefully and do expect things to break for now. 🙂

---

<div class="post-metadata">

**Author:** ![RGonTheNoble](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rgonthenoble/32/209422_2.png) [@RGonTheNoble](https://discourse.julialang.org/u/RGonTheNoble)\
**Post date:** [February 24, 2025, 6:55pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/15 "2025-02-24T18:55:46Z")

</div>

I just want to say thank you so much for your efforts on this!

---

<div class="post-metadata">

**Author:** ![vettert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vettert/32/30599_2.png) [@vettert](https://discourse.julialang.org/u/vettert)\
**Post date:** [February 24, 2025, 8:29pm UTC](https://discourse.julialang.org/t/opc-ua-package-open-platform-communications-unified-architecture/94336/16 "2025-02-24T20:29:56Z")

</div>

You are welcome. If you are using it, we would really appreciate some feedback; also if it is just a list of possible improvements! That would be great to have 🙂
