node-red-contrib-power-genius 0.1.0 → 1.0.0

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.
@@ -1,238 +1,238 @@
1
- [
2
- {
3
- "id": "pg-tab",
4
- "type": "tab",
5
- "label": "Power Genius",
6
- "disabled": false,
7
- "info": "Example flow for node-red-contrib-power-genius.\n\nSet the host of the **power genius** server node to the address of your PowerGenius XL, deploy, and watch the debug sidebar."
8
- },
9
- {
10
- "id": "pg-server",
11
- "type": "power-genius-server",
12
- "host": "192.168.1.100",
13
- "port": 9008,
14
- "autoConnect": true,
15
- "pollInterval": 1000
16
- },
17
- {
18
- "id": "pg-comment-setup",
19
- "type": "comment",
20
- "z": "pg-tab",
21
- "name": "Setup: edit the power genius server node (host), then deploy",
22
- "info": "Double click any Power Genius node, then the pencil next to Server, and enter the host name or IP address of the amplifier. The API port is 9008.",
23
- "x": 280,
24
- "y": 40,
25
- "wires": []
26
- },
27
- {
28
- "id": "pg-comment-monitor",
29
- "type": "comment",
30
- "z": "pg-tab",
31
- "name": "Monitor: the whole status, and one property",
32
- "info": "The first status node emits the whole status as an object. Use it to find out which properties your amplifier reports, then add one status node per property you care about.",
33
- "x": 220,
34
- "y": 100,
35
- "wires": []
36
- },
37
- {
38
- "id": "pg-status-all",
39
- "type": "power-genius-status",
40
- "z": "pg-tab",
41
- "name": "",
42
- "server": "pg-server",
43
- "property": "*",
44
- "onlyChange": true,
45
- "deadband": 0,
46
- "startDelay": 1000,
47
- "x": 150,
48
- "y": 160,
49
- "wires": [["pg-debug-status"]]
50
- },
51
- {
52
- "id": "pg-debug-status",
53
- "type": "debug",
54
- "z": "pg-tab",
55
- "name": "status",
56
- "active": true,
57
- "tosidebar": true,
58
- "console": false,
59
- "tostatus": false,
60
- "complete": "payload",
61
- "targetType": "msg",
62
- "x": 400,
63
- "y": 160,
64
- "wires": []
65
- },
66
- {
67
- "id": "pg-status-state",
68
- "type": "power-genius-status",
69
- "z": "pg-tab",
70
- "name": "",
71
- "server": "pg-server",
72
- "property": "state",
73
- "onlyChange": true,
74
- "deadband": 0,
75
- "startDelay": 1000,
76
- "x": 150,
77
- "y": 220,
78
- "wires": [["pg-debug-state"]]
79
- },
80
- {
81
- "id": "pg-debug-state",
82
- "type": "debug",
83
- "z": "pg-tab",
84
- "name": "state",
85
- "active": true,
86
- "tosidebar": true,
87
- "console": false,
88
- "tostatus": true,
89
- "complete": "payload",
90
- "targetType": "msg",
91
- "statusVal": "payload",
92
- "statusType": "auto",
93
- "x": 400,
94
- "y": 220,
95
- "wires": []
96
- },
97
- {
98
- "id": "pg-comment-info",
99
- "type": "comment",
100
- "z": "pg-tab",
101
- "name": "Info: setup and interface configuration",
102
- "info": "Emits the device info after connecting. Click the inject button to read it again.",
103
- "x": 210,
104
- "y": 280,
105
- "wires": []
106
- },
107
- {
108
- "id": "pg-inject-info",
109
- "type": "inject",
110
- "z": "pg-tab",
111
- "name": "read info",
112
- "props": [{ "p": "payload" }],
113
- "repeat": "",
114
- "crontab": "",
115
- "once": false,
116
- "onceDelay": 0.1,
117
- "topic": "",
118
- "payload": "",
119
- "payloadType": "date",
120
- "x": 120,
121
- "y": 340,
122
- "wires": [["pg-info"]]
123
- },
124
- {
125
- "id": "pg-info",
126
- "type": "power-genius-info",
127
- "z": "pg-tab",
128
- "name": "",
129
- "server": "pg-server",
130
- "property": "*",
131
- "startDelay": 1000,
132
- "x": 280,
133
- "y": 340,
134
- "wires": [["pg-debug-info"]]
135
- },
136
- {
137
- "id": "pg-debug-info",
138
- "type": "debug",
139
- "z": "pg-tab",
140
- "name": "info",
141
- "active": true,
142
- "tosidebar": true,
143
- "console": false,
144
- "tostatus": false,
145
- "complete": "payload",
146
- "targetType": "msg",
147
- "x": 450,
148
- "y": 340,
149
- "wires": []
150
- },
151
- {
152
- "id": "pg-comment-control",
153
- "type": "comment",
154
- "z": "pg-tab",
155
- "name": "Control: operate / standby, or any command",
156
- "info": "The control node takes its action from msg.topic. With topic 'operate' the payload is true/false (or 1/0, on/off) and 'operate=<0|1>' is sent. With topic 'command' the payload is sent as the command, for example 'setup read' or 'ping', and the reply is output. Watch the state property of the status node change between STANDBY and IDLE.",
157
- "x": 190,
158
- "y": 400,
159
- "wires": []
160
- },
161
- {
162
- "id": "pg-inject-operate",
163
- "type": "inject",
164
- "z": "pg-tab",
165
- "name": "operate",
166
- "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }],
167
- "repeat": "",
168
- "crontab": "",
169
- "once": false,
170
- "onceDelay": 0.1,
171
- "topic": "operate",
172
- "payload": "true",
173
- "payloadType": "bool",
174
- "x": 120,
175
- "y": 460,
176
- "wires": [["pg-control"]]
177
- },
178
- {
179
- "id": "pg-inject-standby",
180
- "type": "inject",
181
- "z": "pg-tab",
182
- "name": "standby",
183
- "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }],
184
- "repeat": "",
185
- "crontab": "",
186
- "once": false,
187
- "onceDelay": 0.1,
188
- "topic": "operate",
189
- "payload": "false",
190
- "payloadType": "bool",
191
- "x": 120,
192
- "y": 520,
193
- "wires": [["pg-control"]]
194
- },
195
- {
196
- "id": "pg-inject-command",
197
- "type": "inject",
198
- "z": "pg-tab",
199
- "name": "setup read",
200
- "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }],
201
- "repeat": "",
202
- "crontab": "",
203
- "once": false,
204
- "onceDelay": 0.1,
205
- "topic": "command",
206
- "payload": "setup read",
207
- "payloadType": "str",
208
- "x": 130,
209
- "y": 580,
210
- "wires": [["pg-control"]]
211
- },
212
- {
213
- "id": "pg-control",
214
- "type": "power-genius-control",
215
- "z": "pg-tab",
216
- "name": "",
217
- "server": "pg-server",
218
- "action": "",
219
- "x": 300,
220
- "y": 520,
221
- "wires": [["pg-debug-reply"]]
222
- },
223
- {
224
- "id": "pg-debug-reply",
225
- "type": "debug",
226
- "z": "pg-tab",
227
- "name": "reply",
228
- "active": true,
229
- "tosidebar": true,
230
- "console": false,
231
- "tostatus": false,
232
- "complete": "payload",
233
- "targetType": "msg",
234
- "x": 470,
235
- "y": 520,
236
- "wires": []
237
- }
238
- ]
1
+ [
2
+ {
3
+ "id": "pg-tab",
4
+ "type": "tab",
5
+ "label": "Power Genius",
6
+ "disabled": false,
7
+ "info": "Example flow for node-red-contrib-power-genius.\n\nSet the host of the **power genius** server node to the address of your PowerGenius XL, deploy, and watch the debug sidebar."
8
+ },
9
+ {
10
+ "id": "pg-server",
11
+ "type": "power-genius-server",
12
+ "host": "192.168.1.100",
13
+ "port": 9008,
14
+ "autoConnect": true,
15
+ "pollInterval": 1000
16
+ },
17
+ {
18
+ "id": "pg-comment-setup",
19
+ "type": "comment",
20
+ "z": "pg-tab",
21
+ "name": "Setup: edit the power genius server node (host), then deploy",
22
+ "info": "Double click any Power Genius node, then the pencil next to Server, and enter the host name or IP address of the amplifier. The API port is 9008.",
23
+ "x": 280,
24
+ "y": 40,
25
+ "wires": []
26
+ },
27
+ {
28
+ "id": "pg-comment-monitor",
29
+ "type": "comment",
30
+ "z": "pg-tab",
31
+ "name": "Monitor: the whole status, and one property",
32
+ "info": "The first status node emits the whole status as an object. Use it to find out which properties your amplifier reports, then add one status node per property you care about.",
33
+ "x": 220,
34
+ "y": 100,
35
+ "wires": []
36
+ },
37
+ {
38
+ "id": "pg-status-all",
39
+ "type": "power-genius-status",
40
+ "z": "pg-tab",
41
+ "name": "",
42
+ "server": "pg-server",
43
+ "property": "*",
44
+ "onlyChange": true,
45
+ "deadband": 0,
46
+ "startDelay": 1000,
47
+ "x": 150,
48
+ "y": 160,
49
+ "wires": [["pg-debug-status"]]
50
+ },
51
+ {
52
+ "id": "pg-debug-status",
53
+ "type": "debug",
54
+ "z": "pg-tab",
55
+ "name": "status",
56
+ "active": true,
57
+ "tosidebar": true,
58
+ "console": false,
59
+ "tostatus": false,
60
+ "complete": "payload",
61
+ "targetType": "msg",
62
+ "x": 400,
63
+ "y": 160,
64
+ "wires": []
65
+ },
66
+ {
67
+ "id": "pg-status-state",
68
+ "type": "power-genius-status",
69
+ "z": "pg-tab",
70
+ "name": "",
71
+ "server": "pg-server",
72
+ "property": "state",
73
+ "onlyChange": true,
74
+ "deadband": 0,
75
+ "startDelay": 1000,
76
+ "x": 150,
77
+ "y": 220,
78
+ "wires": [["pg-debug-state"]]
79
+ },
80
+ {
81
+ "id": "pg-debug-state",
82
+ "type": "debug",
83
+ "z": "pg-tab",
84
+ "name": "state",
85
+ "active": true,
86
+ "tosidebar": true,
87
+ "console": false,
88
+ "tostatus": true,
89
+ "complete": "payload",
90
+ "targetType": "msg",
91
+ "statusVal": "payload",
92
+ "statusType": "auto",
93
+ "x": 400,
94
+ "y": 220,
95
+ "wires": []
96
+ },
97
+ {
98
+ "id": "pg-comment-info",
99
+ "type": "comment",
100
+ "z": "pg-tab",
101
+ "name": "Info: setup and interface configuration",
102
+ "info": "Emits the device info after connecting. Click the inject button to read it again.",
103
+ "x": 210,
104
+ "y": 280,
105
+ "wires": []
106
+ },
107
+ {
108
+ "id": "pg-inject-info",
109
+ "type": "inject",
110
+ "z": "pg-tab",
111
+ "name": "read info",
112
+ "props": [{ "p": "payload" }],
113
+ "repeat": "",
114
+ "crontab": "",
115
+ "once": false,
116
+ "onceDelay": 0.1,
117
+ "topic": "",
118
+ "payload": "",
119
+ "payloadType": "date",
120
+ "x": 120,
121
+ "y": 340,
122
+ "wires": [["pg-info"]]
123
+ },
124
+ {
125
+ "id": "pg-info",
126
+ "type": "power-genius-info",
127
+ "z": "pg-tab",
128
+ "name": "",
129
+ "server": "pg-server",
130
+ "property": "*",
131
+ "startDelay": 1000,
132
+ "x": 280,
133
+ "y": 340,
134
+ "wires": [["pg-debug-info"]]
135
+ },
136
+ {
137
+ "id": "pg-debug-info",
138
+ "type": "debug",
139
+ "z": "pg-tab",
140
+ "name": "info",
141
+ "active": true,
142
+ "tosidebar": true,
143
+ "console": false,
144
+ "tostatus": false,
145
+ "complete": "payload",
146
+ "targetType": "msg",
147
+ "x": 450,
148
+ "y": 340,
149
+ "wires": []
150
+ },
151
+ {
152
+ "id": "pg-comment-control",
153
+ "type": "comment",
154
+ "z": "pg-tab",
155
+ "name": "Control: operate / standby, or any command",
156
+ "info": "The control node takes its action from msg.topic. With topic 'operate' the payload is true/false (or 1/0, on/off) and 'operate=<0|1>' is sent. With topic 'command' the payload is sent as the command, for example 'setup read' or 'ping', and the reply is output. Watch the state property of the status node change between STANDBY and IDLE.",
157
+ "x": 190,
158
+ "y": 400,
159
+ "wires": []
160
+ },
161
+ {
162
+ "id": "pg-inject-operate",
163
+ "type": "inject",
164
+ "z": "pg-tab",
165
+ "name": "operate",
166
+ "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }],
167
+ "repeat": "",
168
+ "crontab": "",
169
+ "once": false,
170
+ "onceDelay": 0.1,
171
+ "topic": "operate",
172
+ "payload": "true",
173
+ "payloadType": "bool",
174
+ "x": 120,
175
+ "y": 460,
176
+ "wires": [["pg-control"]]
177
+ },
178
+ {
179
+ "id": "pg-inject-standby",
180
+ "type": "inject",
181
+ "z": "pg-tab",
182
+ "name": "standby",
183
+ "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }],
184
+ "repeat": "",
185
+ "crontab": "",
186
+ "once": false,
187
+ "onceDelay": 0.1,
188
+ "topic": "operate",
189
+ "payload": "false",
190
+ "payloadType": "bool",
191
+ "x": 120,
192
+ "y": 520,
193
+ "wires": [["pg-control"]]
194
+ },
195
+ {
196
+ "id": "pg-inject-command",
197
+ "type": "inject",
198
+ "z": "pg-tab",
199
+ "name": "setup read",
200
+ "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }],
201
+ "repeat": "",
202
+ "crontab": "",
203
+ "once": false,
204
+ "onceDelay": 0.1,
205
+ "topic": "command",
206
+ "payload": "setup read",
207
+ "payloadType": "str",
208
+ "x": 130,
209
+ "y": 580,
210
+ "wires": [["pg-control"]]
211
+ },
212
+ {
213
+ "id": "pg-control",
214
+ "type": "power-genius-control",
215
+ "z": "pg-tab",
216
+ "name": "",
217
+ "server": "pg-server",
218
+ "action": "",
219
+ "x": 300,
220
+ "y": 520,
221
+ "wires": [["pg-debug-reply"]]
222
+ },
223
+ {
224
+ "id": "pg-debug-reply",
225
+ "type": "debug",
226
+ "z": "pg-tab",
227
+ "name": "reply",
228
+ "active": true,
229
+ "tosidebar": true,
230
+ "console": false,
231
+ "tostatus": false,
232
+ "complete": "payload",
233
+ "targetType": "msg",
234
+ "x": 470,
235
+ "y": 520,
236
+ "wires": []
237
+ }
238
+ ]
package/package.json CHANGED
@@ -1,59 +1,61 @@
1
- {
2
- "name": "node-red-contrib-power-genius",
3
- "version": "0.1.0",
4
- "description": "Power Genius XL Control and Monitoring Nodes",
5
- "keywords": [
6
- "node-red",
7
- "power genius",
8
- "pgxl",
9
- "4o3a",
10
- "flexradio",
11
- "ham radio"
12
- ],
13
- "scripts": {
14
- "test": "jest --coverage",
15
- "watch": "jest --watch",
16
- "preversion": "npm test"
17
- },
18
- "repository": {
19
- "type": "git",
20
- "url": "git+https://github.com/sm6srw/node-red-contrib-power-genius.git"
21
- },
22
- "author": "Jorgen Dahl",
23
- "license": "MIT",
24
- "bugs": {
25
- "url": "https://github.com/sm6srw/node-red-contrib-power-genius/issues"
26
- },
27
- "homepage": "https://github.com/sm6srw/node-red-contrib-power-genius#readme",
28
- "engines": {
29
- "node": ">=18"
30
- },
31
- "files": [
32
- "*.js",
33
- "*.html",
34
- "examples"
35
- ],
36
- "node-red": {
37
- "version": ">=3.1.0",
38
- "nodes": {
39
- "power-genius-server": "power-genius-server.js",
40
- "power-genius-status": "power-genius-status.js",
41
- "power-genius-info": "power-genius-info.js",
42
- "power-genius-control": "power-genius-control.js"
43
- }
44
- },
45
- "dependencies": {},
46
- "devDependencies": {
47
- "auto-dist-tag": "^2.1.1",
48
- "jest": "^28.1.3",
49
- "node-red": "^5.0.0",
50
- "node-red-node-test-helper": "^0.3.6"
51
- },
52
- "overrides": {
53
- "multer": "^2.5.0",
54
- "body-parser": "^1.20.9"
55
- },
56
- "jest": {
57
- "verbose": true
58
- }
59
- }
1
+ {
2
+ "name": "node-red-contrib-power-genius",
3
+ "version": "1.0.0",
4
+ "description": "Power Genius XL Control and Monitoring Nodes",
5
+ "keywords": [
6
+ "node-red",
7
+ "power genius",
8
+ "pgxl",
9
+ "4o3a",
10
+ "flexradio",
11
+ "ham radio",
12
+ "sm6srw",
13
+ "nu1t"
14
+ ],
15
+ "scripts": {
16
+ "test": "jest --coverage",
17
+ "watch": "jest --watch",
18
+ "preversion": "npm test"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/sm6srw/node-red-contrib-power-genius.git"
23
+ },
24
+ "author": "Jorgen Dahl",
25
+ "license": "MIT",
26
+ "bugs": {
27
+ "url": "https://github.com/sm6srw/node-red-contrib-power-genius/issues"
28
+ },
29
+ "homepage": "https://github.com/sm6srw/node-red-contrib-power-genius#readme",
30
+ "engines": {
31
+ "node": ">=18"
32
+ },
33
+ "files": [
34
+ "*.js",
35
+ "*.html",
36
+ "examples"
37
+ ],
38
+ "node-red": {
39
+ "version": ">=3.1.0",
40
+ "nodes": {
41
+ "power-genius-server": "power-genius-server.js",
42
+ "power-genius-status": "power-genius-status.js",
43
+ "power-genius-info": "power-genius-info.js",
44
+ "power-genius-control": "power-genius-control.js"
45
+ }
46
+ },
47
+ "dependencies": {},
48
+ "devDependencies": {
49
+ "auto-dist-tag": "^2.1.1",
50
+ "jest": "^28.1.3",
51
+ "node-red": "^5.0.0",
52
+ "node-red-node-test-helper": "^0.3.6"
53
+ },
54
+ "overrides": {
55
+ "multer": "^2.5.0",
56
+ "body-parser": "^1.20.9"
57
+ },
58
+ "jest": {
59
+ "verbose": true
60
+ }
61
+ }