Hi!
Just want to share a bit of knowledge we have been dealing with.
We have a Front Gateway and N number of backend gateways (this one are only used to connect via opc and to historize tags, no extra work).
We needed to get the historian data of the back end gateways to the front gateways. We made it so the remote providers use historian-database instead of the gateway network.
However, if you need to build a historian path (for a component like a powertable) like this one: histprov:Historian01:/drv:ignition-gateway:prueba:/tag:test/tag you would need to know the historian for that tag.
We found a way of doing this:
# Returns all historians
historians = system.tag.browseHistoricalTags().getResults() # deprecated but no way of doing this in 8.3 version
historian_path = None
for hist in historians:
# We get the path for that historian
h = system.historian.browse(hist.getPath().toString()).getResults()[0]
prov = h.getPath().toString()[len("histprov:"):(h.getPath().toString().index(":/"))]
if prov == provider_for_the_tag.lower():
historian_path = h.getPath().toString()
break
In this way we are able to get the provider with the gateway data for a specific provider.
This has some limitations so be careful!
Hope this help someone