#1086 N4 nHaystack

Adam Baker Fri 13 Oct 2023

Hi all,

I'm trying to use the n4 nhaystack module to expose Niagara station data via the haystack REST api end point.

I've come across the following issues:

1) my nhaystack module wont generate tags for my n4 data. I have added the nhaystack service to my services. Enabled the servlet. Added a site to my config folder. Added an equip to the correct points folder. > I then clicked, initialize, rebuild cache, and load however it only loaded the site and nothing more. Any ideas on what I'm doing wrong? have i missed a step somewhere

2)I'm having trouble exporting the data via the haystack API. I have added a nhaystack network. I then added a nhaystack server to this network. added a HTTPbasicSheme to my authetification schemes within my authentication service. I then configured a user, giving them admin access, setting the password and changing the authetification scheme name to HTTPbasicScheme. When I then went into the properties of my nhaystackserver and input the new auth credentials and try to ping i get the following error message No suitable auth scheme for: 303 null'. Can anyone advise on what I'm doing wrong? Again have I missed a step or something?

Any advise would be greatly appreciated.

Erik Gatti Mon 16 Oct 2023

Hi, I'm not sure what's the problem for the first part. Are you expecting nHaystack to auto tags your data?

If you're using it for tagging datapoint you have to go to the nHaystackService on your station and click on "Edit your custom Tags -> " followed by the location of your csv file. After you have clicked on that you can write your datapoints/tags association by following the standard "name,markers". Here an example:

name,markers

onOff,run cmd cur his

ambientTemperature,zone air temp sensor cur his

This will be the file that nHaystack will use to tag your datapoints, it's based on the name of the datapoints and the tag you want to assign.

If you write the example I gave you in your csv file and than drag and drop datapoints named like the first column in the "Drag components here to add a haystack slot" in the nHaystackService a marker with the tags will be add to the datapoint. Remember that the tags will be only add to the datapoint if the datapoint isn't already tagged (if it is, you can delete the tags of the point by deleting the haystack slot in the "Slot sheet" view of the point). This won't show the datapoints in the nHaystackService, but you can get this info by a simple queery, I'll leave an example of that too.

http://XXXX/haystack/read?filter=YYYY

XXXX = the ip of your station YYYY = what you are searching for

I'll leave another example

Let's assume that the IP of your station is 192.168.1.2 and you are looking for everything tagged as "temp" on your station

http://192.168.1.2/haystack/read?filter=temp

By writing whis queery of a browser you can get that information.

I'm just a user of nHaystack, so don't take my word for as certainty.

Login or Signup to reply.