getInterpolatedPoints
Get interpolated values for one or more tags at specific timestamps.
Signature
Section titled “Signature”getInterpolatedPoints(tags, timestamps, output="json")
tags(str | list[str])timestamps(str | int | float | datetime | list[…])output(str):json(default),df,raw,string
Inputs
Section titled “Inputs”tags: Tag name or list of tags to interpolate.timestamps: One or more timestamps to query.output: Output format selector.
Examples
Section titled “Examples”JSON output (single tag)
Section titled “JSON output (single tag)”points = hm.getInterpolatedPoints( "DEMO_02TI301.PV", ["2024-01-01 00:00:00", "2024-01-01 01:00:00"],)Output:
[ { "timestamp": "2024-01-01T00:00:00Z", "value": 38.0, "status": "OK" }, { "timestamp": "2024-01-01T01:00:00Z", "value": 37.5, "status": "OK" }]JSON output (multiple tags)
Section titled “JSON output (multiple tags)”points = hm.getInterpolatedPoints( ["DEMO_02TI301.PV", "DEMO_02TI201.PV"], "2024-01-01 00:00:00",)Output:
{ "DEMO_02TI301.PV": [{ "timestamp": "2024-01-01T00:00:00Z", "value": 38.0, "status": "OK" }], "DEMO_02TI201.PV": [{ "timestamp": "2024-01-01T00:00:00Z", "value": 42.0, "status": "OK" }]}DataFrame output (multiple tags)
Section titled “DataFrame output (multiple tags)”points_df = hm.getInterpolatedPoints( ["DEMO_02TI301.PV", "DEMO_02TI201.PV"], ["2024-01-01 00:00:00", "2024-01-01 01:00:00"], output="df",)Output (df):
DEMO_02TI301.PV DEMO_02TI201.PV2024-01-01 00:00:00 38.0 42.02024-01-01 01:00:00 37.5 41.7