...
List all installed Eigen Ingenuity Factory Types
list_data_source_types()
List Instances of a Specific Data Source
List the instances for a specified Eigen Ingenuity Factory Type Returns None if there are no instances
...
from eigeningenuity.core import list_data_sources
allhistorians = list_data_sources("historian")
Get Default Instance of Data Source Type
Returns the name of the default instance for a specified Eigen Ingenuity Factory Type Returns None if no default instance can be found
...
List all installed Eigen Apps
list_apps()
Get App Url
Find the base URL for a specified Eigen Ingenuity apps. Note this is something like "historian-servlet" not "trend" or "jsonbridgehistorian". Think "module" rather than "tool". Returns None if the app is not installed.
get_app_url(appname)
List Feature Properties
Request information about installed Eigen Ingenuity Feature Properties
list_feature_properties()
Get Feature Property
Get the value of the specified Eigen Ingenuity Feature Property
get_feature_property(property)
Supported Historian Methods
After importing the historian code and declaring a historian instance,
...
The following methods are available:
List DataTags
List all tags in Historian, or those matching the wildcard if one is given
h.listDataTags(wildcards(optional))
Get Raw Points
Get Range of Raw DataPoints for Tags. This returns (maxpoints) raw datapoints for tags:
...
h.getRawDataPoints(tags, start, end, maxpoints (defaults to 1000))
Count Points
Returns the number of raw datapoints in the given time range for each tag
h.countPoints(tags, start, end)
Unsupported Historian Methods
Warning: these are alpha code. Use at your own risk!
Get Current DataPoint for Tags
Return latest data point for each tag
...
h.getInterpolatedRange(tags, start, end, count)
Get Aggregates
Returns min, max, avg, sum, numgood, numnotgood, stddev and variance
...
{'tagname1': [DataPoint1, DataPoint2, ...],
'tagname2': [...]
}
Write DataPoints (from Json)
Write data entered in json (currently DISABLED)
...
{'write':
{'tagname': [
{"value":value1, "timestamp": epochms, "status":status},
{"value":value2, "timestamp": epochms, "status":status}
],
'tagname2': [
{...}
]
}
}
Example: {"write":{"testtag1":[{"value":20,"timestamp":1462886123000,"status":"OK"}]}}
Sample Python Program
Here's a sample program which gets list the tags on a historian instance called "dev1-influxdb"
...