langanjp / PI-NodeRED

Connecting OSIsoft PI to IoT using the PI Web API, Node-RED and the Raspberry PI
Apache License 2.0
6 stars 6 forks source link

Error in importing the template in pi system explorer #1

Closed jmikerq closed 7 years ago

jmikerq commented 7 years ago

When I follow the guide in here: https://github.com/langanjp/PI-NodeRed/wiki/Importing-Node-RED-flows-and-PI-AF

I encountered an error while trying to import the template from your repo:

Error occurred on line 143, column 7, near 'AFAttributeTemplate' while processing Attribute Template 'pressure' in Element Template 'weather_gov_station':The Unit of Measure 'mbar' was not found when processing 'ElementTemplates[weather_gov_station]|pressure'.

It seems weird to me as I thought mbar should be a built-in unit.

I am running Pi System Explorer 2017 SP1 PI AF Server version 2.9.1.8159

I am able to create elements and change system configuration manually, but this error keeps showing up.

When I run the workflow in node-red, I am able to read values of points, but when I try to post data, it leads to an error that

ERRORS: Cannot modify element 'weather_gov' in Element 'externalservices' because the current user does not have write permission

I have "DisableWrites" set to false at element and system level. I am not sure if this issue was caused by the failure of importing the template. Thanks.

jmikerq commented 7 years ago

hi @langanjp , I got support from OSIsoft and got the unit problem figured out, however, I am still not able to import the template. When I import the template, I dont see any attributes added under each element.

langanjp commented 7 years ago

Sorry for the delayed response - I didn't get an email on the first comment. I'll take a look at the weather template - it should have attributes and also will add a uom import in the future..

jmikerq commented 7 years ago

Thanks @langanjp , while I was having problem setting up the template, I also have question at your wiki page where you mentioned about:

add your pi data archive server as the value of the piserver attribute

So, what is this pi data archive server value? where can I find that?

I was also getting errors when the web api crawler tries to get configuration from the server, however, when I was looking at this article from OSIsoft, it says that PI Web API requires to have Kerberos for authentication and I am confused because you were using Basic and Anomynous. At the end, I am still seeing this error in Windows event log and I am not sure how to fix this:

Failed to get the settings for database at OSIsoft.Search.Crawler.SearchProxy.GetCrawlerSettings()

jmikerq commented 7 years ago

at this point, it doesn't seem like the problems are related to my node-red instance, but rather my setup on a windows server.

jmikerq commented 7 years ago

Created a node-red node module to wrap up similar features of this node-red flow https://www.npmjs.com/package/node-red-contrib-osisoft-web-api