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.
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:
#******************************************************************************************************
# metadataCache.py - Gbtc
#
# Copyright © 2021, Grid Protection Alliance. All Rights Reserved.
#
# Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
# the NOTICE file distributed with this work for additional information regarding copyright ownership.
# The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
# file except in compliance with the License. You may obtain a copy of the License at:
#
# http://opensource.org/licenses/MIT
#
# Unless agreed to in writing, the subject software distributed under the License is distributed on an
# "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
# License for the specific language governing permissions and limitations.
#
# Code Modification History:
# ----------------------------------------------------------------------------------------------------
# 02/07/2021 - J. Ritchie Carroll
# Generated original version of source code.
This file has been truncated. show original
Hi Ritchie,
I am trying to pass the PMU name through this argument but it returns an error:
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 ), new package, v1.0.5, uploaded to PyPi:
openHistorian Python API
1 Like
Thanks Ritchie, the fix works, I can now query two seperate PMU’s