node-red-contrib-periph-gas 1.5.1 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # node-red-contrib-periph-gas
2
2
 
3
- Node-RED nodes for gas sensor chips — part of the [Periph](https://github.com/tuhde/Periph) library.
3
+ Node-RED nodes for gas sensor chips: ENS160 — part of the [Periph](https://github.com/tuhde/Periph) library.
4
+
5
+ **Supported chips (1):** ENS160.
6
+
7
+ Each chip has a sensor/actuator node plus a shared `-device` config node that holds the bus settings. Importable example flows are in [`examples/`](https://github.com/tuhde/Periph/tree/main/nodejs/packages/node-red-contrib-periph-gas/examples).
4
8
 
5
9
  ## Install
6
10
 
@@ -17,7 +21,7 @@ npm install node-red-contrib-periph-gas
17
21
  | Node | Kind | Description |
18
22
  |------|------|-------------|
19
23
  | `ens160-device` | config | Bus configuration for an ENS160 |
20
- | `periph-ens160` | input | Reads air quality (AQI, TVOC, eCO2) from an ENS160 digital multi-gas sensor. |
24
+ | `ens160` | input | Reads air quality (AQI, TVOC, eCO2) from an ENS160 digital multi-gas sensor. |
21
25
 
22
26
  ## Links
23
27
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  {
10
10
  "id": "ens160-read-1",
11
- "type": "periph-ens160",
11
+ "type": "ens160",
12
12
  "name": "ENS160 Air Quality",
13
13
  "device": "ens160-device-1",
14
14
  "wires": [["debug-1", "aqi-function-1"]]
@@ -33,7 +33,7 @@
33
33
 
34
34
  <!-- Read node: trigger → measurements -->
35
35
  <script type="text/javascript">
36
- RED.nodes.registerType('periph-ens160', {
36
+ RED.nodes.registerType('ens160', {
37
37
  category: 'Peripheral',
38
38
  color: '#C084FC',
39
39
  defaults: {
@@ -48,7 +48,7 @@
48
48
  });
49
49
  </script>
50
50
 
51
- <script type="text/html" data-template-name="periph-ens160">
51
+ <script type="text/html" data-template-name="ens160">
52
52
  <div class="form-row">
53
53
  <label for="node-input-device"><i class="fa fa-microchip"></i> Device</label>
54
54
  <input type="text" id="node-input-device">
@@ -59,7 +59,7 @@
59
59
  </div>
60
60
  </script>
61
61
 
62
- <script type="text/html" data-help-name="periph-ens160">
62
+ <script type="text/html" data-help-name="ens160">
63
63
  <p>Reads air quality (AQI, TVOC, eCO2) from an ENS160 digital multi-gas sensor.</p>
64
64
  <p>Any input message triggers a measurement. The device is configured via an <b>ens160-device</b> config node.</p>
65
65
 
@@ -56,5 +56,5 @@ module.exports = function(RED) {
56
56
  }
57
57
  });
58
58
  }
59
- RED.nodes.registerType('periph-ens160', ENS160ReadNode);
59
+ RED.nodes.registerType('ens160', ENS160ReadNode);
60
60
  };
package/package.json CHANGED
@@ -1,16 +1,19 @@
1
1
  {
2
2
  "name": "node-red-contrib-periph-gas",
3
- "version": "1.5.1",
4
- "description": "Node-RED nodes for gas sensor chips",
3
+ "version": "1.5.3",
4
+ "description": "Node-RED nodes for gas sensor chips: ENS160",
5
5
  "keywords": [
6
6
  "node-red",
7
7
  "gas",
8
8
  "i2c",
9
9
  "spi",
10
10
  "sensor",
11
- "peripheral"
11
+ "peripheral",
12
+ "node-red-contrib",
13
+ "ens160"
12
14
  ],
13
15
  "node-red": {
16
+ "version": ">=3.0.0",
14
17
  "nodes": {
15
18
  "ens160": "nodes/ens160/ens160.js"
16
19
  }
package/index.js DELETED
@@ -1,11 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- module.exports = function(RED) {
5
- const nodesDir = path.join(__dirname, 'nodes');
6
- if (!fs.existsSync(nodesDir)) return;
7
- fs.readdirSync(nodesDir).forEach(function(chip) {
8
- const nodeFile = path.join(nodesDir, chip, chip + '.js');
9
- if (fs.existsSync(nodeFile)) require(nodeFile)(RED);
10
- });
11
- };