nHaystack Configuration

Preparation Process

To prepare for your CopperTree service and ensure a quick and easy installation please complete and return the Onboarding Packet provided by your CopperTree account representative.

Getting Your Niagara Station Ready

Download the nHaystack distribution for your version of Niagara. Here are some useful links:

https://stackhub.org/package/nHaystack
https://stackhub.org/package/nHaystack/versions

Note: If you are running something older than 4.10 you will need to download the older version of nHaystack. Refer to the version number and list of versions available from the above link.

JAR Files Install

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 ‘\modules’ folder and restart your workbench.

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.

  1. Download latest nhaystack.jar module(s) below depending on version of Niagara you have.

    • AX – AX has only one module nhaystack (download).
    • N4 – N4 has two modules nhaystack-rt and nhaystack-wb (download).

  2. Drag the nhaystack.jar into your modules folder (you may need to close/stop your station/workbench to add them)
  3. Drag the NHaystackService from your Palette into your Services
  4. Restart your station because its required for the changes to take effect
  5. Once station is running, run the Initialize Haystack, Rebuild Cache, and Remove Broken Refs actions on the NHaystack service.

Note: You can test the connection by typing /haystack/about into your browser

Below is an example of what you should receive. After a few moments, if you don’t get a successful connection, click here to troubleshoot haystack.

Example of successful haystack connection

Niagara Platform User Config and Setup

The nHaystack driver we are deploying requires a user account with at least “read-only operator” permissions. This user must also be assigned the “HTTPBasicAuthentication” scheme. Recent versions of the N4 platform do not come with this scheme loaded by default.

  1. To add the HTTPBasicAuthentication scheme, you must be logged into the N4 platform with sufficient privileges.
  2. In the system palette view, enter the Platform service, then navigate to Authentication Schemes.
  3. In the slot view you will click the + button to add a new scheme.
  4. With the object type “baja” selected, navigate the right hand drop down to find “HTTPBasicScheme”
  5. Then with this selected, add this scheme to the platform by clicking “add”.
  6. Now create the special machine to machine user account which the K-Link nHaystack driver will use while collecting data.
  7. Under the N4 platform, select the User service from the Palette, click the button to add a user.
  8. CopperTree will provide a user and password that can be used for this user.

Note: Give the user “Operator or Read-Only” permissions. It must be given some permissions, none are selected by default. If you forget to assign a role, the integration will fail to read the data.