From c8f73a727edf1730b5432e1180316dd00666f95a Mon Sep 17 00:00:00 2001 From: iaj2 Date: Thu, 3 Aug 2023 19:16:37 +0100 Subject: [PATCH] update name and readme --- README.md | 55 +++++++++++++++++++++++++++++------------------ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 37 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 0987f82e..26e04d85 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,40 @@ # node-red-edgepi-thermocouple -# Using Node Red -If Node-RED is not yet installed, please see instructions for installing Node-RED at https://github.com/osensa/node-red-edgepi-led-array. - -# Installing this node -1. git clone this repository -2. Change to project directory: $ cd node-red-edgepi-thermocouple -3. Install dependencies: $ npm install -4. Change to .node-red directory: $ cd ~/.node-red -5. $ npm install path_to_project_directory +# node-red-edgepi-thermocouple -# Troubleshooting -* Note: upon being deployed, this node will run a bash executable to install Python module dependencies. The executable may not have the necessary file permissions to perform these operations. If an error related to file permissions is encountered, enter the following in the project directory, in order to give the bash script execute permission: - - `$ chmod +x edgepi-thermocouple` +## Installation: Node-Red on Debian +Install a supported version of Node.js: https://nodered.org/docs/faq/node-versions +``` + $ sudo apt install curl + $ curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - + $ sudo apt install nodejs +``` + Verify Node.js instalthermocouple: +``` +$ node -v +``` + Verify npm instalthermocouple: +``` +$ npm -v +``` +3. Install Node-Red with npm +``` +$ cd ~ +$ sudo npm install -g --unsafe-perm node-red +``` -# About -This node sets up a multiprocessing environment consisting of the following features: -1. Node runs in parent process (where Node-RED is running), and receives as input an injected value. This injected value can be any value, its purpose is only to signal the Node to trigger a "sample temperature" command to the Python script running in the child process. -2. A child process running a Python script which uses code provided by Steven to sample ambient temperature using the RTU-Thermocouple. -3. The parent process communicates with the child process, allowing the node in the parent process to receive temperature readings and display them in Node-RED. +4. Install Node Red Dashboard +``` +$ cd ~/.node-red +$ npm i node-red-dashboard +``` -# Sample Flow and UI Dashboard using thermocouple node and led-trigger node -This sample flow shows the thermocouple node being used to obtain temperature readings, which are then used along with the LED trigger node (https://github.com/osensa/node-red-edgepi-led-array) to toggle an EdgePi LED on/off. Here, the on/off temperature is 24.5 degrees Celsius. -![image](https://user-images.githubusercontent.com/77416463/168688664-a7c5646e-a811-49d5-a6bd-0015b8b9d99d.png) +## Installation of this node +``` +$ npm install @edgepi-cloud/node-red-edgepi-thermocouple +``` -![image](https://user-images.githubusercontent.com/77416463/168688751-14f4eef6-b45b-4bfd-a072-582adcf61c7d.png) +## Running Node-Red +``` +$ node-red +``` \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d87792d8..4ea32e83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "node-red-edgepi-thermocouple", + "name": "@edgepi-cloud/node-red-edgepi-thermocouple", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "node-red-edgepi-thermocouple", + "name": "@edgepi-cloud/node-red-edgepi-thermocouple", "version": "1.0.0", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 764510ce..b3aa18f3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "node-red-edgepi-thermocouple", + "name": "@edgepi-cloud/node-red-edgepi-thermocouple", "version": "1.0.0", "description": "A node-red node for EdgePi thermocouple module", "main": "edgepi-thermocouple.js",