Novant

Documentation

Sign in

Values & Trends

Values

Returns current values for all points on a source, asset, or space. One of source_id, source_ids, asset_id, or space_id is required. If multiple are specified, precedence is source_id, then source_ids, then asset_id, then space_id.

values(source_id=None, source_ids=None, asset_id=None, space_id=None,
       point_ids=None, point_types=None)
Argument Default Description
source_id None Parent source ID
source_ids None List of parent source ID strings (max 10)
asset_id None Parent asset ID
space_id None Parent space ID
point_ids None Optional list of point ID strings to filter
point_types None Optional list of point type strings to filter

Returns

ValueList with the following container-level attributes. Which fields are populated depends on the parent used in the request:

Attribute Type Description
values list[PointValue] Point values in the response
source_id str Set when scoped by source_id
asset_id str Set when scoped by asset_id
space_id str Set when scoped by space_id
source_ids list[str] Set when scoped by source_ids, asset_id, or space_id

Each PointValue has the following attributes:

Attribute Type Description
id str Point ID
val Any Current value
status str Point status

Example

# All values for a source
for v in client.values(source_id="s.2"):
    print(v.id, v.val, v.status)

# Values across multiple sources (max 10)
for v in client.values(source_ids=["s.2", "s.3"]):
    print(v.id, v.val, v.status)

# All values for a space
for v in client.values(space_id="sp.1"):
    print(v.id, v.val, v.status)

# Filter by point type
for v in client.values(
    space_id="sp.1",
    point_types=["zone_air_temp_sensor"]):
    print(v.id, v.val)

# Lookup a single point value
values = client.values(source_id="s.2")
v = values.point("s.2.4")
print(v.val)

Returns historical trend data for a list of points. Either date or start_date + end_date is required.

trends(point_ids, start_date=None, end_date=None, date=None,
       tz=None, interval=None, aggregate=None)
Argument Default Description
point_ids List of point ID strings (required)
date None Single date as YYYY-MM-DD (takes precedence over start/end)
start_date None Start date as YYYY-MM-DD
end_date None End date as YYYY-MM-DD
tz None Timezone for results (defaults to project timezone)
interval None Resample interval: auto 5min 15min 30min 1hr 1day 1mo raw
aggregate None Aggregation function: auto mean sum min max diff

Returns

TrendData with the following attributes:

Attribute Type Description
start str Start timestamp
end str End timestamp
tz str Timezone of results
interval str Interval used
aggregate str Aggregation function used
point_ids list[str] Point IDs in the response

Each row in TrendData is a TrendRow with:

Attribute Type Description
ts str Timestamp for this interval
values dict Map of point ID to value

Example

# Single day
trends = client.trends(point_ids=["s.2.4", "s.2.5"], date="2026-03-09")
for row in trends:
    print(row.ts, row.values)

# Date range with hourly interval
trends = client.trends(
    point_ids=["s.2.4"],
    start_date="2026-03-01",
    end_date="2026-03-09",
    interval="1hr",
    aggregate="mean",
)
print(trends.interval)   # "1hr"
print(trends.aggregate)  # "mean"