Anyone able and willing to give me a quick video-call intro into Ignition? (Willing to promise to work an Open-Source Apache PLC4X driver package in exchange)

So I've managed to get my module to be listet as provider in the "add historian" dialog and I was able to configure it. However the adapter stays in status "Disabled" ... I guess now I have to add the "store-and-forward" sink right?

Thank you for this ... this should be pretty much what I had been looking for ... will investigate.

Hi all,

so it seems that since 7.9 some things have changed, or simply this is what has been referred to "overengineering" things. So I already had my TagHistoryProvider which seems to use my AbstractSink, however as I see it, all this is registered, once the TagHistoryProviderType.createHistoyProvide method is called ... however this doesn't seem to happen.

I've taken the liberty to simply put my code in a public github repo, so I can show you what I'm working on. It's available at: GitHub - chrisdutz/ignition-iotdb-historian ... I'd be really happy if anyone could possibly help me here. I don't want anyone to build anything finished, what I'd simply like to have, would be something that simply logs incoming data or prints it with System.out.print or whatever. I don't think that I'm too far away from this, but I admittedly feel a bit worn out digging through this. The earlier I've got this working, the earlier I can build other cool open-source tools for ignition :wink:

Ok ... so it seems I fixed another problem and now I can see my Historian being marked as "Running" and I could see my Sink being initialized.
I've pushed my changes to the public github repo, if this is of any help to anyone.

Now I have to figgure out how to get data there.

Select your new historian as the storage provider for a tag (turn on history).

So if I create a tag for an S7 variable I have, I can enable "History Enabled", in Storage Provider however I can't select my connection ... if I add an PostgreSQL connection in Databases, I can select that.

Then something went wrong when you created an instance of your provider.

So I've reset my Ignition installation and setup things again.

So if I add my dummy historian, it is reported to me as enabled and Running under "Tags/History".
However under "Databases/Store and Forward" I can only see the default SQL-lite.

I wouldn't expect anything to show there for a non-database historian.

Open the tag browser, create a memory tag. Turn on history for it. Then click on the storage provider dropdown. If you don't see your historian instance as an option there, then it didn't get created/registered correctly. (I don't know the precise sequence yet--you're ahead of me on this.)

Nope ... my historian doesn't show up there :frowning:

Does your historian report that it can store history? (Needed in multiple spots, I noticed.)

Here's my project:

Consider replacing your getStatusInformation method with this:

    @Override
    public TagHistoryProviderInformation getStatusInformation() {
        return TagHistoryProviderInformation.newBuilder()
                .name(getName())
                .status(getStatus())
                .allowsStorage(true)
                .build();
    }

Tried that, rebuilt it, re-installed Ignition in order to re-start from a clean state, however nothing changed :frowning:

So I have this In my ProvideTye:

    public boolean supportsStorage() {
        return true;
    }

In my Sink, the acceotsData is the only method besides the Constructor that is called. And this only when viewing the Status page:

    @Override
    public boolean acceptsData(HistoryFlavor historyFlavor) {
        System.out.println("IoTDBHistorySink.acceptsData");
        return true;
    }

I haven't even gotten to creating my shell of a Sink yet, so you are blazing a trail. Maybe someone else will pop in.

I took another look. I don't see you registering your new provider in startup and unregistering it in shutdown. Like so:

    @Override
    public void startup() {
        context.getTagHistoryManager().registerTagHistoryProvider(this);
    }

    @Override
    public void shutdown() {
        context.getTagHistoryManager().unregisterTagHistoryProvider(providerName);
    }

{ Plus your sink. }

This should be in my IoTDBHistoryProvider type?
If I do that, it goes into an infinite loop as every time I call "registerTagHistoryProvider" it call the "startup" method again. I did add something similar to my Hook.

There I call this in the setup:

 context.getTagHistoryManager().addTagHistoryProviderType(ioTDBHistorianProviderType);

Huh. Ok, I misunderstood that pair of methods.

Hi all,

so a colleague of mine managed to get what I had been working on into something that actually seems to be working.

I'll be cleaning things up a bit and then will update my public repository so anyone can profit from that.

Thanks to all that helped me get there :slight_smile: Hope my small additions help others a bit.

5 Likes