node-red-contrib-tapo-p125m 0.1.0 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +101 -0
  2. package/package.json +16 -5
  3. package/package.json.old +0 -17
package/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # node-red-contrib-tapo-p125m
2
+
3
+ Node-RED nodes for reliable **local LAN** control of the **TP-Link Tapo P125M** smart plug using `tp-link-tapo-connect`.
4
+
5
+ ## Why
6
+
7
+ Some existing Tapo Node-RED nodes can read status but fail to toggle the P125M reliably.
8
+ This module provides explicit **ON**, **OFF**, and **STATUS** nodes with a shared configuration node.
9
+
10
+ ## Install
11
+
12
+ From the Node-RED Palette Manager, search for:
13
+
14
+ `node-red-contrib-tapo-p125m`
15
+
16
+ Or install manually:
17
+
18
+ ```bash
19
+ cd ~/.node-red
20
+ npm install node-red-contrib-tapo-p125m
21
+ ```
22
+
23
+ Restart Node-RED after installation.
24
+
25
+ ## Nodes
26
+
27
+ ### Config node: `tapo-device`
28
+
29
+ Stores:
30
+ - Device IP address
31
+ - Credentials (stored securely in Node-RED credential storage)
32
+ OR credentials via environment variables
33
+
34
+ ### Action nodes (category: **Tapo P125M**)
35
+
36
+ - **P125M on**
37
+ - **P125M off**
38
+ - **P125M status**
39
+
40
+ All action nodes reference a `tapo-device` configuration node.
41
+
42
+ ## Credentials
43
+
44
+ ### Option A: Node-RED credential storage (recommended)
45
+
46
+ Enter Email/Password in the `tapo-device` config node.
47
+ Credentials are stored in `flows_cred.json` and are **not included in exported flows**.
48
+
49
+ Recommended setting in `~/.node-red/settings.js`:
50
+
51
+ ```js
52
+ credentialSecret: "your-long-random-string"
53
+ ```
54
+
55
+ ### Option B: Environment variables
56
+
57
+ Enable **Use env vars** in the `tapo-device` config node and define:
58
+
59
+ ```bash
60
+ export TAPO_EMAIL="you@example.com"
61
+ export TAPO_PASSWORD="yourpassword"
62
+ ```
63
+
64
+ ## Example output
65
+
66
+ Success:
67
+
68
+ ```json
69
+ {
70
+ "ok": true,
71
+ "cmd": "on",
72
+ "ip": "192.168.1.11",
73
+ "device_on": true,
74
+ "model": "P125M"
75
+ }
76
+ ```
77
+
78
+ Error:
79
+
80
+ ```json
81
+ {
82
+ "ok": false,
83
+ "cmd": "off",
84
+ "error": "Missing credentials in tapo-device (or env vars)."
85
+ }
86
+ ```
87
+
88
+ ## Example flow
89
+
90
+ See `examples/example-flow.json` in the repository.
91
+
92
+ ## Compatibility
93
+
94
+ - Node-RED >= 3.x
95
+ - Node.js >= 18
96
+ - TP-Link Tapo **P125M**
97
+
98
+ ## License
99
+
100
+ MIT
101
+
package/package.json CHANGED
@@ -1,10 +1,22 @@
1
1
  {
2
2
  "name": "node-red-contrib-tapo-p125m",
3
- "version": "0.1.0",
4
- "description": "Node-RED nodes for TP-Link Tapo (P125M) using tp-link-tapo-connect",
3
+ "version": "0.1.2",
4
+ "description": "Node-RED nodes for TP-Link Tapo P125M smart plug",
5
5
  "license": "MIT",
6
- "main": "tapo.js",
7
- "keywords": ["node-red", "tapo", "tplink", "p125m", "matter"],
6
+ "keywords": [
7
+ "node-red",
8
+ "tapo",
9
+ "tplink",
10
+ "p125m"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/n3bkv/node-red-contrib-tapo-p125m.git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/n3bkv/node-red-contrib-tapo-p125m/issues"
18
+ },
19
+ "homepage": "https://github.com/n3bkv/node-red-contrib-tapo-p125m#readme",
8
20
  "dependencies": {
9
21
  "tp-link-tapo-connect": "^2.0.0"
10
22
  },
@@ -14,4 +26,3 @@
14
26
  }
15
27
  }
16
28
  }
17
-
package/package.json.old DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "name": "node-red-contrib-tapo-p125m",
3
- "version": "0.1.0",
4
- "description": "Node-RED nodes for TP-Link Tapo (P125M) using tp-link-tapo-connect",
5
- "license": "MIT",
6
- "main": "tapo.js",
7
- "keywords": ["node-red", "tapo", "tplink", "p125m", "matter"],
8
- "dependencies": {
9
- "tp-link-tapo-connect": "^2.0.0"
10
- },
11
- "node-red": {
12
- "nodes": {
13
- "tapo-control": "tapo.js"
14
- }
15
- }
16
- }
17
-