8.3, Issue Providing Device Extension Points

I'm updating an existing module to 8.3 and am struggling to get my device types to appear in the Create Device Connection page, using ignition-sdk-examples/opc-ua-device as an example.

Here's my extension point:

class SnmpV1ExtensionPoint :
    DeviceExtensionPoint<SnmpV1DeviceConfig>(
        "embr-snmp-v1",
        "Snmp.device.SnmpV1Device.DisplayName",
        "Snmp.device.SnmpV1Device.Description",
        SnmpV1DeviceConfig::class.java,
    ) {
    override fun createDevice(
        context: DeviceContext,
        deviceConfig: DeviceProfileConfig,
        snmpConfig: SnmpV1DeviceConfig,
    ): Device {
        val snmpContext = SnmpV1Context(context, deviceConfig, snmpConfig)
        return SnmpDeviceImpl(snmpContext)
    }

    override fun getWebUiComponent(type: ExtensionPoint.ComponentType): Optional<WebUiComponent> {
        return Optional.of(
            ExtensionPointResourceForm(
                DEVICE_RESOURCE_TYPE,
                "Device Connection",
                this.typeId,
                SchemaUtil.fromType(DeviceProfileConfig::class.java),
                SchemaUtil.fromType(SnmpV1DeviceConfig::class.java),
                mutableSetOf<String>(),
            )
        )
    }
}

And then I'm returning a list of extension points in my gateway hook (that extends AbstractDeviceModuleHook):

override fun getDeviceExtensionPoints(): List<DeviceExtensionPoint<*>> {
    return listOf(SnmpV1ExtensionPoint(), SnmpV2CExtensionPoint(), SnmpV3ExtensionPoint())
}

I'm not seeing anything in the Create Device Connection page or in the logs :confused:.

getDeviceExtensionPoints() is called before the module hook's setup(). Make sure you aren't caught by that.

1 Like

Sanity check - module is installed, running, not faulted, post gateway restart? Can you add a log statement to make sure that getDeviceExtensionPoints is being called?

1 Like

:tada:

Yup, that was it.

I omitted it from my post for brevity, but I was storing my list of extension points in object that wasn't initialized until the module hook's setup call.

Posts like this are why I have trust issues :sweat_smile:

3 Likes

Yeah, that's my bad :headstone: