Problems building a custom driver

With the exellent WeatherDriver example from the SDK I managed to build a custom driver for Ignition and the OPC-Server.
This driver could be installed and started in Ignition without visible errors and the provided devices could be added to the OPC server.

But when I look at the device status page, I see this driver being “disconnected” and no button to connect it.

Trying the same with the WeatherDriver example from the sdk, it looks identically - the driver and device install correct but the WeatherDevice stays “disconnected”.

What am I doing wrong? Or where is the connect button?

Greetings
Robert Ehmann

Were there any errors in the console?

This seems odd because the weather driver is supposed to just move into the connected state right away. There is no “connect” button, drivers get connect() called on them when they are initialized.

The weather driver simply calls super.connect() and then registers its update task. Does it status stay disconnected even after refreshing the page on the gateway?

No there are no visible errors, even in the log file.

Here are the corresponding lines from the log:

Starting up module weather

Requested load of resource bundle ‘com/inductiveautomation/weather/driver/WeatherDriver’ for locale ‘de_DE’, received bundle for ‘’

Shutting down module “weather”…

Shutdown of module “weather” completed in 2 ms

That’s it, no errors, but the weather device stays disconnected all the time.

FYI: I’m running the evalution version of Ignition with a developer cd-key. But that should be no reason?

If just my own driver wouldn’t work, I would blame it on my own code - but if the sample code doesn’t work too… I’m a little helpless.

Well it’s showing disconnected because it looks like the module is being shutdown immediately after being started up. Not sure why yet…

What environment are you using? OS, locale, Ignition version? I’ll see if I can replicate it.

Sorry that my reply comes a little late, i’ve been off-site for some days.

My configuration is:
Debian Lenny Linux with kernel 2.6.30-2-686
Ignition version 7.1.4 (b5476)
LC_ALL=de_DE.UTF-8

Status of the weather driver:
(X) Disconnected
Driver Properties
Name Weather Driver
Company Inductive Automation
Version 1.1.3-beta1 (b1234)
Release Date 01.07.10 13:44:00

I added the gateway logfile - even I could not find any helpful information in it.
gateway.log (86.1 KB)

I see a NullPointerException being thrown by your driver:

java.lang.NullPointerException at de.atggera.opc.accesspoint.driver.provider.AccesspointProvider.initialize(AccesspointProvider.java:50) at de.atggera.opc.accesspoint.driver.provider.AccesspointProvider.<init>(AccesspointProvider.java:45) at de.atggera.opc.accesspoint.driver.AccesspointDriver.initialize(AccesspointDriver.java:36) at com.inductiveautomation.xopc.driver.common.nodemap.NodeMapDriver.initializeInternal(Unknown Source) at com.inductiveautomation.xopc.driver.api.AbstractDriver.initialize(Unknown Source) at com.inductiveautomation.xopc.server.devices.AbstractDevice.initialize(Unknown Source) at com.inductiveautomation.xopc.server.devices.DeviceManagerImpl$3.run(Unknown Source) at java.lang.Thread.run(Thread.java:619)

AccesspointProvider.java, line 50.

Also I suppose I should step in and ask about what kind of driver you are writing? I know this isn’t made clear at all in any of the sparse documentation available or by the sample driver, NodeMapDriver is really geared to be used by really simple driver implementations – things like drivers that pull data from the web or other performance-insensitive uses.

If you intend to talk to a PLC or other device via ethernet you should be extending from AbstractNioDriver and doing management of the nodes in a way that is efficient for that particular driver.

Unfortunately we don’t have a sample driver available that uses AbstractNioDriver yet. We do intend to open source our Modbus driver in the future though as an example.