Skip to content
esanderson edited this page May 22, 2021 · 3 revisions

NHaystack

NHaystack is an open-source Niagara4 module that enables Niagara stations (JACE and WebSupervisor) to act as either servers or clients in the Project Haystack format, via a RESTful protocol. Using NHaystack, external applications receive data that includes essential meta data (tags) to describe the meaning of the data.

When acting as a server, NHaystack automatically generates standard tags for all the ControlPoints in your system. This feature allows for connecting immediately to the Niagara Station via Haystack once the NHaystack module has been installed, without requiring any further configuration. It makes discovering the points in your station as easy as issuing a simple query.

NHaystack-as-a-server also streamlines the process of adding user-specified Haystack tags to Niagara systems, by providing a GUI tool that allows users to add the tags directly to Niagara components. Once tags have been defined, the data associated with the Niagara components, including the tags, are available over the REST communications interface. This combination of the tagging tool and the Haystack protocol "engine" reduces the effort involved in connecting Niagara data to external software applications.

NHaystack can also act as a Haystack client, via a Niagara 4 driver that models remote servers as Niagara devices. This allows Haystack devices to exist "underneath" stations. See Section 7 of this document for an explanation of how that works.

NHaystack is licensed under the Academic Free License ("AFL") v. 3.0.

The development of NHaystack has been funded by J2 Innovations and Conserve It and Tridium.

Further contributions have been made by:

  • Christian Tremblay, Servisys Inc.
  • Stuart Longland, VRT Systems
  • Bryant Holland, CBRE|ESI
  • Eric Anderson, Tridium
  • Andy Saunders, Tridium

Benefits

  • The ability to include meta data tags as part of Niagara data structures allows external applications to automatically interpret the meaning of data acquired from a Niagara system.
  • The Haystack HTTP protocol is efficient and includes features that coalesce requests to minimize network traffic and message size.
  • The NHaystack module includes extensive features under the covers to unify real time and historical data structures in Niagara, which greatly simplifies access to data, and presentation in third party applications.
  • The Haystack REST API tightly defines the relationship between client and server machines, allowing for third-parties to integrate easily with your equipment and data.

Key Features

  • Provides drop-in support for the Haystack REST API on a Niagara 4 system.
  • Unifies the Component and History namespaces
  • Allows for arbitrary queries of the station based on Haystack tags
  • Makes it easy to create a Site-Equip-Point Hierarchy view of your system.
  • Provides a standard Niagara 4 driver so that remote Haystack servers can be modelled inside of N4.

Usage

The nhaystack distribution archive comes with 2 modules and a patched 'haystack-rt.jar' file for a number of different version of Niagara 4:

  • nhaystack-rt.jar
  • nhaystack-wb.jar

First of all, drop both of these jar files into your '<niagara_home>\modules' folder and restart your workbench.

Next, select the patched version of the 'haystack-rt.jar' file that corresponds to the version of Niagara 4 you are using. The new version of 'nhaystack' is not supported before version 4.4.93.40. If you are using a later version and a patched 'haystack-rt.jar' file is not available then most likely this means that the version you are using already has the appropriate modifications to that module.

If the Niagara 4 installation is a Web Supervisor then all you need to do is restart any running stations on the platform, connect to the stations and drop the NHaystackService into the running station.

For use on a "Jace" style platform the minimum installation required is for the 'nhaystack-rt.jar' file to be installed. Only install 'nhaystack-wb.jar' if you intend to access the Java based built-in workbench through a web browser. To install the modules on a "Jace" type of platform, use the standard Niagara Workbench tools. As indicated above, a patched version of the 'haystack-rt.jar' file is required. This must also be installed on the target platform.

Clone this wiki locally