Applicable to OS V1.9
The Haystack service enables the Haystack data modelling based on tagging. The Haystack service provides a Haystack dictionary of tags available to add to Data Points and the Equipment components.
The nano EDGE ENGINE implementation is based on the Haystack HTTP API, which defines a simple mechanism to exchange Haystack tagged data over HTTP. The Haystack HTTP API server executes operations: receives requests and returns responses. Operations are pluggable, which means the API can be further enhanced, and the implementation includes a pluggable authentication protocol.
The Haystack service is automatically available in the Services container once the Haystack library is installed on the device. The Haystack library is a default part of the nano EDGE ENGINE from the OS V1.9 and is not compatible with earlier versions.
The Haystack service has the following slots:
-
Status: indicates the current status of the component. If the component works properly, its status is OK; however, it changes accordingly when values in other slots are adjusted.
-
Available information: disabled (the Enabled slot is set to false), OK;
-
-
Info: informs about a required device restart after changing the port’s number;
-
HTTP Port: shows the set communication port number.
The Haystack service has the following action:
-
Set HTTP Port: allows to change the HTTP communication port.
The Set HTTP Port action is available also in the iFnet component and Web service.
Warning!
Changing the HTTP port affects the iFnet communication port number and will disable connecting with the controller using the current iFnet port number.
The HTTP port number can be changed by the user using the Set HTTP Port action. Changing the HTTP port number affects the communication port used to connect to the device, Haystack service, and connection to the nanoWebUI™ interface. The following notification is displayed before changing the port number:
Once the change is introduced, it requires saving and restarting the device. Before saving, the component displays a notice in the Info slot:
HTTP API
The Haystack HTTP API has been implemented to facilitate exchanging data between servers and devices. The Haystack HTTP API server executes operations: receives requests and returns responses.
Haystack HTTP API
To learn more about the Haystack HTTP API, please visit: Project Haystack - HTTP API.
The nano EDGE ENGINE implementation supports the following version:
-
API Protocol: Haystack Protocol (haystack-core 3.0.3).
Supported Requests
-
/haystack/about/
-
/haystack/read/
-
/haystack/watchSub/
-
/haystack/watchPoll/
The auto-refresh mechanism is set to 5 minutes.