Device Driver Development / Device API Access

Hi everyone,

I've developed a device driver module for Ignition 8.1.44 using the ManagedTagProvider API, and it's working well for device monitoring but I'm looking to enhance it to appear in the OPC UA Device Connections interface. I've followed Kevin Herron's advice from this post and I've read the SDK examples and Eclipse Milo address space APIs. However I'm running into the same issues others have reported. Commercial third party drivers have proved this integration is possible, so I know there's a path forward.

Some of my road blocks:

  • Maven Dependencies: The opc-ua-device-api artifact seems unavailable in public repositories for 8.1.44
  • Missing JavaDocs: The com.inductiveautomation.ignition.gateway.opcua.server.api package isn't in the published docs
  • API Gap: AbstractDeviceModuleHook, DeviceType, and DeviceSettingsRecord are documented, the actual compilation dependencies are missing

I've made a few different attempts to implement the OPC-UA device driver APIs based on the documentation and examples, but keep running into compilation and runtime issues:

Based on the SDK documentation, I tried implementing:

  // build.gradle.kts
  dependencies {
      compileOnly("com.inductiveautomation.ignition:opc-ua-device-api:8.1.44")
      // ... other dependencies
  }

  Error:
  Could not find com.inductiveautomation.ignition:opc-ua-device-api:8.1.44

Tried working with what's publicly available:

  public class CustomDeviceModuleHook extends AbstractDeviceModuleHook {
      @Override
      public void createDeviceTypes(DeviceContext deviceContext) {
          // Attempting to follow the documented pattern
      }
  }

  Error:
  Cannot resolve symbol 'AbstractDeviceModuleHook'
  Package com.inductiveautomation.ignition.gateway.opcua.server.api does not exist

Tried integrating Eclipse Milo directly with the Gateway context:

  dependencies {
      modlImplementation("org.eclipse.milo:sdk-server:0.6.16")
  }

  // Implementation attempt
  public void integrateWithOpcUaServer() {
      // Trying to access Ignition's OPC-UA server instance
      OpcUaServer server = gatewayContext.getOpcUaServer(); // Method doesn't exist
  }

  Error:
  Cannot resolve method 'getOpcUaServer()' in 'GatewayContext'

For Kevin Herron or IA Staff:

  • Are the device driver APIs intended to be publicly available for 8.1.44, or is there a specific process to access them?
  • Should I focus on Eclipse Milo's server APIs directly, or are there Ignition-specific extensions I should be using?
  • Is there a recommended approach to bridge existing ManagedTagProvider implementations with OPC-UA device interfaces?

My current implementation structure:

 // Simplified example
  public class CustomDriverGatewayHook extends AbstractGatewayModuleHook {
      private DeviceTagManager tagManager;
      private ManagedTagProvider mainTagProvider;

      @Override
      public void startup(LicenseState activationState) {
          ProviderConfiguration config = new ProviderConfiguration("CustomDevices");
          mainTagProvider = gatewayContext.getTagManager().getOrCreateManagedProvider(config);
          // ... device management and polling logic
      }
  }

I'm wondering if I should be extending different base classes or implementing additional interfaces to integrate with the OPC-UA device framework.

Any guidance on the proper approach to device driver development would be greatly appreciated.
TIA

These APIs are so different, including different datatypes, as to make this idea a non-starter, IMNSHO. You will need to extract your external communication functionality and erect a completely new scaffold around it.

I can't help with your build problems--I still use ant (highly customized), pointing at zip installer JARs. Do look at the device example in the SDK examples repo, and at Kevin Herron's Modbus server example. I suspect you will find what you need in those.

I don't know where you got this from, but the dependency you're looking for has coordinates like this:

        <dependency>
            <groupId>com.inductiveautomation.ignitionsdk</groupId>
            <artifactId>driver-api</artifactId>
            <version>${ignition-sdk-version}</version>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>

See these examples Phil mentioned:

There is a never-to-be-resolved issue with the Javadocs for some of the device APIs not being published for 8.1.x because the interfaces were written in Kotlin and our build can't seem to merge and publish the docs. Fixed for 8.3. There's barely anything to these interfaces though - the bulk of the implementation is in implementing Milo's AddressSpace API, which does have docs in any version.

1 Like