Skip to content

getRawDatapoints

Get raw stored points between a start and end time.

getRawDatapoints(tags, start, end, maxpoints=1000, output="json")

  • tags (str | list[str])
  • start (str | int | float | datetime)
  • end (str | int | float | datetime)
  • maxpoints (int, default: 1000)
  • output (str): json (default), df, raw, string
  • tags: Tag name or list of tags to read raw points for.
  • start: Start of time window.
  • end: End of time window.
  • maxpoints: Maximum number of points returned.
  • output: Output format selector.
raw_points = hm.getRawDatapoints(
"DEMO_02TI301.PV",
"2024-01-01 00:00:00",
"2024-01-01 12:00:00",
maxpoints=1000,
)

Output:

[
{ "timestamp": "2024-01-01T00:01:03Z", "value": 38.0, "status": "OK" },
{ "timestamp": "2024-01-01T00:02:05Z", "value": 38.1, "status": "OK" }
]
raw_df = hm.getRawDatapoints(
["DEMO_02TI301.PV", "DEMO_02TI201.PV"],
"2024-01-01 00:00:00",
"2024-01-01 01:00:00",
maxpoints=200,
output="df",
)

Output (df):

DEMO_02TI301.PV DEMO_02TI201.PV
2024-01-01 00:01:03 38.0 42.1
2024-01-01 00:02:05 38.1 42.0