Novant

Documentation

Sign in

Sources & Points

Sources

Returns all sources for the project. Optionally filter by ID or bound status.

sources(source_ids=None, bound_only=False)

Arguments

Argument Default Description
source_ids None Optional list of source ID strings to filter
bound_only False If True, return only bound sources

Returns

SourceList with the following attributes per Source:

Attribute Type Description
id str Source ID
name str Source name
type str Protocol type (e.g. bacnet, modbus)
addr str Source address
device_id int Device ID if applicable
vendor str Vendor name
model str Model name
enabled bool Whether the source is enabled
bound bool Whether the source is bound
parent_asset_id str Parent asset ID if applicable

Example

# All sources
for source in client.sources():
    print(source.id, source.name, source.type)

# Bound sources only
for source in client.sources(bound_only=True):
    print(source.id, source.bound)

# Lookup by ID
source = client.sources().source("s.2")
print(source.vendor, source.model)

Points

Returns points for a source, asset, or space. One of source_id, asset_id, or space_id is required.

points(source_id=None, asset_id=None, space_id=None,
       point_ids=None, point_types=None)

Arguments

Argument Default Description
source_id None Parent source ID (one of source_id, asset_id, or space_id required)
asset_id None Parent asset ID (one of source_id, asset_id, or space_id required)
space_id None Parent space ID (one of source_id, asset_id, or space_id required)
point_ids None Optional list of point ID strings to filter
point_types None Optional list of point type strings to filter

Returns

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

Attribute Type Description
points list[Point] Points in the response
source_id str Set when scoped by source_id
source_name str Set when scoped by source_id
source_bound bool Set when scoped by source_id
source_enabled bool Set when scoped by source_id
asset_id str Set when scoped by asset_id
asset_name str Set when scoped by asset_id
space_id str Set when scoped by space_id
space_name str Set when scoped by space_id
source_ids list[str] Set when scoped by asset_id or space_id

Each Point has the following attributes:

Attribute Type Description
id str Point ID
name str Point name
type str Point type
addr str Point address
kind str Data kind (e.g. number, bool)
writable bool Whether the point supports writes
unit str Engineering unit if applicable
schedule str Schedule name if applicable
mode str Point mode if applicable
limit str Limit constraint if applicable
enum str Enum type name if applicable
enum_states list[EnumState] Enumeration states if applicable
ontology Ontology Optional ontology classification

Example

# points for a source
for point in client.points(source_id="s.2"):
  print(point.id, point.name, point.kind)

# points for an asset
for point in client.points(asset_id="a.1"):
  print(point.id, point.writable)

# points for a space
points = client.points(space_id="sp.1")
print(points.space_name, points.source_ids)

# filter by point type
for point in client.points(
    space_id="sp.1",
    point_types=["discharge_air_temp_sensor", "zone_air_temp_sensor"]):
  print(point.id, point.type)

# lookup by ID
point = client.points(source_id="s.2").point("s.2.4")
print(point.unit)