finds.dev← search

// the find

etm/opcua-smart

★ 6 · C · LGPL-3.0 · updated Jul 2022

OPC-UA Ruby Bindings (open62541)

A Ruby gem that wraps open62541, the C OPC UA stack, as a native extension with a deliberately narrowed API. You define object types in a tap-block DSL, manifest instances, and find nodes by symbol. It is aimed at people who want to build OPC UA servers from Ruby without learning the full specification, and the client side is still marked TBD.

- Restricting the modelling surface is the actual design decision, and the README says so plainly. The DSL (add_object_type with a tap block, add_variable_rw with a change callback, objects.manifest) maps closely enough to the information model that a small server fits in one readable file.

- The examples cover more than hello-world: typed method arguments, client subscriptions, XML import in server_xml.rb, and a deep-hierarchy server. There is something to copy for the awkward cases.

- The C side is split into separate client and server extensions, each with its own finders, value conversion and string helpers. The Ruby layer stays thin and the protocol work stays in the upstream stack, which is the right trade for a gem like this.

- Last push was July 2022. The install section requires open62541 'master as of 2020-06-04' and '> 1.1', so expect compile breakage against current open62541 releases. The README concedes the API has moved.

- Client support is still 'TBD' in the README, and the only client material is a set of example scripts. Anyone who needs more than reading and writing values will be reading the C extension.

- Type support is narrow by design. Untyped values default to STRING, DOUBLE and INT, and other datatypes are 'added by request'. That rules it out for anything with structured or non-scalar types.

- The library-path setup step as written (sudo echo with >> into /etc/ld.so.conf.d) will fail, because the redirect runs as the invoking user and not as root. It is the first thing a new user hits after installing.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →