Skip to content

Commit

Permalink
Merge pull request #18 from EdgePi-Cloud/help-info
Browse files Browse the repository at this point in the history
Helper tab for tc node
  • Loading branch information
iaj2 authored Aug 28, 2023
2 parents 047a1fa + 2287592 commit bb4128d
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 50 deletions.
53 changes: 21 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,29 @@
# node-red-edgepi-thermocouple

# node-red-edgepi-thermocouple
## EdgePi thermocouple node

## 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
```
EdgePi thermocouple node that reads temperature on input received.

4. Install Node Red Dashboard
## Install
Install normally through the node-red editor or install with npm in your node-red directory
(typically located at `~/node.red`) by running the following command:
```
$ cd ~/.node-red
$ npm i node-red-dashboard
npm install @edgepi-cloud/node-red-edgepi-digital-thermocouple
```

## Installation of this node
```
$ npm install @edgepi-cloud/node-red-edgepi-thermocouple
```
### Properties
- **RPC Server**: The connection to your EdgePi's RPC Server.
- **Output**: What temperature reading(s) will be sent out through the flow.

## Running Node-Red
```
$ node-red
```
### Inputs
Any message can be used to trigger this node.

### Outputs
- When configured to read only linearized temperature:
- **payload** *number*: Regular temperature reading.

- When configured to read only cold junction temperature:
- **payload** *number*: Temperature reading of the cold junction sensor.

- When configured to read both cold junction and linearized temperature:
- **payload** *array[coldJunctionTemp, linearizedTemp]*: An array containing both the cold junction and linearized temperature.
33 changes: 32 additions & 1 deletion edgepi-thermocouple.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,36 @@
</script>

<script type="text/html" data-help-name="edgepi-thermocouple-node">
<p>A node that handles handles passing commands to RTU Thermocoupler and displaying output</p>
<p>EdgePi thermocouple node that reads temperature on input received.</p>
<h3>Properties</h3>
<dl class="message-properties">
<dt> RPC Server</dt>
<dd>The connection to your EdgePi's RPC Server. </dd>
<dt >Output</dt>
<dd>What temperature reading(s) will be be sent out through the flow.</dd>
</dl>
<h3>Inputs</h3>
<dl class="message-properties">
Any message can be used to trigger this node.
</dl>
<h3>Outputs</h3>
<p>• When configured to read only linearized temperature:</p>
<dl class="message-properties">
<dt>payload <span class="property-type">number</span></dt>
<dd>regular temperature reading.</dd>
</dl>
<p>• When configured to read only cold junction temperature:</p>
<dl class="message-properties">
<dt>payload <span class="property-type">number</span></dt>
<dd>temperature reading of the cold junction sensor.</dd>
</dl>
<p>• When configured to read both cold junction and linearized temperature:</p>
<dl class="message-properties">
<dt>payload <span class="property-type">array[coldJunctionTemp, linearizedTemp]</span></dt>
<dd>an array containing both the cold junction and linearized temperature.</dd>
</dl>
<h3>References</h3>
<ul>
<li><a href="https://github.com/edgepi-cloud/node-red-edgepi-thermocouple">GitHub</a> -the node's github repository </li>
</ul>
</script>
8 changes: 0 additions & 8 deletions edgepi-thermocouple.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ module.exports = function(RED) {
done();
}
})


// handle exit
node.on("close", function(done) {
node.status({fill:"grey", shape:"ring", text:"tc terminated"});

done();
});
}
RED.nodes.registerType("edgepi-thermocouple-node", ThermocoupleNode);
}
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"homepage": "https://github.com/EdgePi-Cloud/node-red-edgepi-thermocouple#readme",
"dependencies": {
"@edgepi-cloud/edgepi-rpc": "^1.0.4"
"@edgepi-cloud/edgepi-rpc": "^1.0.6"
},
"devDependencies": {
"node-red": "^3.0.2"
Expand Down

0 comments on commit bb4128d

Please sign in to comment.