Driver won't be added to Drivers List

Hello.

I’m currently creating a driver in order to expose tags on the Ignition OPCUA Server from an external source.
I made a first draft version to have the communications running correctly and now, I would like to make a clean version the would fit in the Gateway webpage as a driver. And that is driving me crazy.

The module installs without error (even if it is around 25Mb !?) and starts correctly but my devices list does not show my new driver.

Here is the code is used for this driver:

ModuleHook

public class ModuleHook extends AbstractDriverModuleHook{
    private Logger logger = LoggerFactory.getLogger(getClass());
    private static final List<DriverType> DRIVER_TYPES = new ArrayList();

    static {
        DRIVER_TYPES.add(new MiosBoxTcpDriverType());
    }

    private GatewayContext context;

    @Override
    public void setup(GatewayContext gatewayContext) {
        logger.info("MiosBox Driver : setup()");
        this.context = gatewayContext;
        BundleUtil.get().addBundle("MiosBoxDriver", getClass(), "MiosBoxDriver");
        super.setup(context);
        logger.info("MiosBox Driver : setup() - END");
    }

    @Override
         public void startup(LicenseState activationState) {
        logger.info("MiosBox Driver : startup()");
        super.startup(activationState);
        logger.info("MiosBox Driver : startup() - END");
    }

    @Override
    public void shutdown() {
        logger.info("MiosBox Driver : shutdown()");
        BundleUtil.get().removeBundle("MiosBoxDriver");
        super.shutdown();
    }

    @Override
    public void serviceReady(Class<?> serviceClass) {
        logger.info("ServiceReady pour : " + serviceClass.toString());
        super.serviceReady(serviceClass);
        logger.info("ServiceReady - END");
    }

    @Override
    protected List<DriverType> getDriverTypes() {
        logger.info("getDriverTypes(): Liste des drivers : " + DRIVER_TYPES.toString());
        return DRIVER_TYPES;
    }

    @Override
    protected int getExpectedAPIVersion() {
        logger.info("getExpectedAPIVersion Called.");
        return 4;
    }
}

The MiosBoxTcpDriverType extends from DriverType.

The initialization seems good but the overridden method serviceReady() is never called and I cannot figure why.

Here are the logs after an install/restart of the driver:

 	Time	Logger	Message
(I)	18:07:44	ModuleHook	MiosBox Driver : startup() - END
(I)	18:07:44	ModuleHook	getExpectedAPIVersion Called.
(I)	18:07:44	ModuleHook	MiosBox Driver : startup()
(I)	18:07:44	ModuleManager	Starting up module 'MiosBoxDriver' v1.0.0 (b0)...
(I)	18:07:44	ModuleHook	MiosBox Driver : setup() - END
(I)	18:07:44	ModuleHook	getDriverTypes(): Liste des drivers : [com.mios.MiosBoxDriverGateway.settings.MiosBoxTcpDriverType@190a7a23]
(I)	18:07:44	ModuleHook	MiosBox Driver : setup()
(I)	18:07:36	ModuleManager	Starting up module 'MiosBoxDriver' (v1.0.0 (b0))...
(I)	18:07:35	ModuleManager	Installing module: "MiosBoxDriver"

I cannot figure why the driver is not added to the drivers list (under OPC > Devices > Add).

I can provide more code and/or clarifications if needed, do not hesitate to ask.

Is your module setup to depend on XOPC?

Are you building this with the new maven plugin? What version of Ignition?

Yes. I’m using ignition-maven-plugin version 1.0.9 (set in the build pom.xml) and I have this dependency in the gateway pom.xml

The Ignition version is 7.7.5 and it is a fresh install.

What does your build module’s pom.xml file look like?

Kevin,

Thanks for the reply.

Here are the pom files from my project. I can send the whole skeleton project if needed (IntelliJ based).
pom.xml (1.82 KB)
pom.xml (2.29 KB)
pom.xml (1.56 KB)

Kevin, thank you for the clue. My build pom file was indeed not including the xopc dependency.
For reference, I added the following lines in my build pom file and got the driver in the devices list.

                    <depends>
                        <depend>
                            <scope>G</scope>
                            <moduleId>xopc</moduleId>
                        </depend>
                    </depends>

Part of the reason your module is so big is because you’ve got the driver-api jar listed as a dependency.

Remove that, and in its place use this:

<dependency>
	<groupId>com.inductiveautomation.ignitionsdk</groupId>
	<artifactId>driver-api</artifactId>
	<version>7.7.5</version>
	<type>pom</type>
	<scope>provided</scope>
</dependency>