node-red-contrib-periph-gas 1.5.1 → 1.5.2
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 +1 -1
- package/examples/ens160/demo.json +1 -1
- package/nodes/ens160/ens160.html +3 -3
- package/nodes/ens160/ens160.js +1 -1
- package/package.json +1 -1
- package/index.js +0 -11
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npm install node-red-contrib-periph-gas
|
|
|
17
17
|
| Node | Kind | Description |
|
|
18
18
|
|------|------|-------------|
|
|
19
19
|
| `ens160-device` | config | Bus configuration for an ENS160 |
|
|
20
|
-
| `
|
|
20
|
+
| `ens160` | input | Reads air quality (AQI, TVOC, eCO2) from an ENS160 digital multi-gas sensor. |
|
|
21
21
|
|
|
22
22
|
## Links
|
|
23
23
|
|
package/nodes/ens160/ens160.html
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
<!-- Read node: trigger → measurements -->
|
|
35
35
|
<script type="text/javascript">
|
|
36
|
-
RED.nodes.registerType('
|
|
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="
|
|
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="
|
|
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
|
|
package/nodes/ens160/ens160.js
CHANGED
package/package.json
CHANGED
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
|
-
};
|