Git Product home page Git Product logo

pi-nodered's Introduction

PI-NodeRED

Project to use Node-RED to connect Raspberry PI and other IOT data sources to OSIsoft PI using the PI Web API

Overview

This project and tutorial show the steps using Node-RED (a node.js / JavaScript based graphical progamming language) to collect and transform data from a Raspberry PI and PI Sense HAT (json) and send it to the OSIsoft PI System. This also explores gathering data from other web sources to send to the PI System, including weather station data (xml) from the National Weather Service (weather.com), and power grid data (html) from ERCOT (ercot.com). This project also demonstrates displaying of OSIsoft PI Data on a Raspberry PI - PI Sense HAT display. Finally, it also offers a simple tutorial on using the PI Sense HAT in Node-RED.

Tutorial

Please refer to this project's Wiki for a tutorial and instructions

Pre-Reqs

  • Raspberry PI 3 (https://www.raspberrypi.org/products/raspberry-pi-3-model-b/)
  • Connected to network, with a known IP address (may need keyboard, mouse and monitor for initial setup)
  • PI Sense Hat (https://www.raspberrypi.org/products/sense-hat/)
  • Access to OSIsoft PI Web API 2016 server or higher
    • Connected to your own (not shared) PI Asset Framework (AF) DB and your own (not shared) PI Data Archive (DA)
    • If you need to share a DA, some AF templates will need to be modified before using to create a user specific AF template to modify the hierarchy and tagnames that will be created by the templates.
  • PI Web API will need "Anonymous" and "Basic" authentication:
    • Anonymous will break PI Coresight searching, so it would ideally be a dedicated PI Web API server
    • Also, it is not advised to leave a PI Web API server in Anonymous if write enabled. Anonymous access is needed for one example of the PI Web API's websocket (or Channels) due to limitations of the Node-RED websocket implementation. Either create a PI Web API server just for Anonymous (and read-only access to certain tags or elements) or plan to remove Anonymous after doing the example exercise.
  • PI Tag pointsource
    • This will automatically create one called IOTED as part of the automated PI tag creation, or modify the AF imports xmls to your own desired pointsource

pi-nodered's People

Contributors

langanjp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pi-nodered's Issues

Error in importing the template in pi system explorer

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.