lib haystack

OverviewCurrent PointsWritable PointsHis Sync

Overview

This library provides a client connector for the Haystack HTTP API This connector can be used to communicate with other Haxall and SkySpark systems which all implement the server side of the Haystack API protocol. It is also commonly used to communicate with Niagara via the nHaystack and nhaystackAx modules.

The haystack connector provides full support for the following connector features:

  • Learn tree via the nav op
  • Current value subscription using watches
  • Writable point support using pointWrite op
  • History sync using the hisRead op

Note the haystackCur, haystackWrite, and haystackHis addresses for this connector must all be strings (not refs). This prevents them from being confused as internal references.

Current Points

Haystack proxy points are configured with haystackCur tag. Subscription uses Haystack watches to subscribe to the remote points current value. Watches use a poll for change design; you can tune the poll frequency via the haystackPollFreq connector tag.

Writable Points

Haystack proxy points are configured to write to remote system points via the haystackWrite tag. The priority level to write to in the remote system must be configured via the haystackWriteLevel tag. The following point would write its computed writeVal to level 14 of "remote-point":

point
writable
haystackConnRef: @conn
haystackWrite: "remote-point"
haystackWriteLevel: 14

His Sync

Haystack proxy points are configured for history synchronization via the haystackHis tag. These points use the hisRead op to read history data from the remote system.