Fetch multiple recordings through pythonAPI

Hi,

I am recording multiple parameters through open historian, but when I am using the pythonAPI script to fetch the data it only returns frequency.

image



P.S. The data archiving was not happening when I took the screenshot from openhistorian

Kindly requesting your assistance.

Thanks,
Bhaskar

The Python API allows you specify what points you want to query. The sample code just picks frequencies:

# Lookup measurements that represent frequency values
records = metadata.GetMeasurementsBySignalType(SignalType.FREQ, instance.Name)

Thanks Ritchie for this guidance, I was able to modify the code to read Voltage Magnitude.
I am recording currently 2PMU’s, could you help me to understand how to control the PMU data I want to read?

You could try something like this:

# Lookup measurements by PMU name
records = metadata.GetMeasurementsByTextSearch("PMUNAME", instance.Name)

All metadata is available and may be searched, more deterministically, if desired. See this code:

Hi Ritchie,

I am trying to pass the PMU name through this argument but it returns an error:


image

Well, that’s annoying. The field name is actually DeviceAcronym - apparently Python doesn’t validate if the field actually exists.

That’s a bug. Looks easy enough to fix.

Thanks Ritchie. Requesting your guidance on this.

OK - bug fixed (I hope :slight_smile: ), new package, v1.0.5, uploaded to PyPi:

1 Like

Thanks Ritchie, the fix works, I can now query two seperate PMU’s