Releases: equinor/tagreader-python
Allow host + port specification
For some installations, the relevant Windows registry entries containing mapping from ODBC datasource to host and port do not exist. E.g. servers or old installations.
This release allows the user to explicitly specify the parameters host and port on client creation, thus skipping the registry search. If only host is provided, port will be set to a default value (10014 for IP21, 5450 for PI).
Added
- Optional arguments
hostandportto IMSClient class. Only relevant for ODBC handlers.
Raw data added
Support for reading raw data.
Due to structural difference in time-vector for raw data compared to fixed-interval data such as INT, VAR etc, the cache is disabled for raw data. The caching mechanism will be rewritten for a later release.
Added
ReaderType.RAWnow supported asread_typefor all handlers.
Changed
- Rewritten tag reading mechanism by moving responsibility for limiting amount of data points returned from client to handler. Client now investigates length of returned result to determine start time of next query, instead of querying predetermined fixed-length intervals. This makes a more unified read algorithm for fixed-length intervals (such as INT) and uneven time series (such as RAW).
- Reduced max rows per query from PI Web API to default value 10000.
Fixed
- Warn instead of crash when user tries to read an invalid tag.
Snapshots added
Support for reading snapshots/final/last values.
Added
ReaderType.SNAPSHOTnow supported asread_typefor all handlers.
Changed
- Renamed the
read()input argumentstop_timetoend_time. This may break some scripts ifstop_timewas used as keyword argument. - The
read()input argumentsstart_time,end_timeandtsare now keyword arguments instead of positional.tshas a default value of 60 seconds, while the time arguments are default null.
Web APIs
The main change in this release is the added support for connecting to PI Web API and AspenTech Process Data REST Web API. This means that in most cases it is no longer required to install the proprietary ODBC drivers, which in many cases turns out to be be quite painful. Simply select one of the two new handlers and connect to the REST APIs. In addition time zone handling has been improved, and the client presents the backends in a more unified way to the user.
Added
- Add two more handlers for the Web APIs:
piwebapiandaspenone. - Add tagreader class method
list_servers()to cover all four handlers. - Add a user manual, reduce amount of content in quickstart.
Changed
- Rename IMSClient method
read_tags()toread(). - Improve handling of timezones when calling
read():- Queries to servers are always done in UTC.
- Time zone aware timestamps are converted to UTC before query.
- Time zone naive timestamps are assumed to belong in the timezone specified by the input argument
tz(default "Europe/Oslo"). - Returned data points are converted to the timezone specified by
tz.
- Aggregated data (AVG, MIN, MAX etc) timestamps are are always anchored at the start of the aggregation interval.
Deprecated
- Deprecate tagreader class methods
list_pi_servers()andlist_aspen_servers()(replaced withlist_servers()). - Deprecate the IMSClient method
read_tags()(renamed toread()).
Better map handling
Improved handling of tags with maps for Aspen IP.21.
Fixed
- Allow tag search with tagname and description.
- Fix fetching of correct unit for tags with map.
- Fix fetching of correct description for tags with map.
v1.0.1
Rename and first release on PyPI
First release on PyPI as tagreader
Changed
- Rename from pyIMS to tagreader to avoid name collision on PyPI
- Move lots of tests to a separate private repository. Those tests need to be run on-site with functioning server connection to PI/IP.21 servers, and are currently handled in Azure Pipelines.