Skip to content

getInterpolatedPoints

Get interpolated values for one or more tags at specific timestamps.

getInterpolatedPoints(tags, timestamps, output="json")

  • tags (str | list[str])
  • timestamps (str | int | float | datetime | list[…])
  • output (str): json (default), df, raw, string
  • tags: Tag name or list of tags to interpolate.
  • timestamps: One or more timestamps to query.
  • output: Output format selector.
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" }
]
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" }]
}
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.PV
2024-01-01 00:00:00 38.0 42.0
2024-01-01 01:00:00 37.5 41.7