node-red-contrib-uos-nats 1.3.3 → 1.3.5
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 +2 -2
- package/nodes/datahub-input.html +2 -10
- package/nodes/datahub-write.html +17 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,8 +94,8 @@ Publishes your own data to the Data Hub.
|
|
|
94
94
|
- **Provider not visible?** Ensure **Provider ID** matches your **Client ID**. Easiest way: Leave Provider ID empty in the node.
|
|
95
95
|
- **Connection Failed?** Check Host/IP and ensure Client ID/Secret are correct.
|
|
96
96
|
- **Variable ID "undefined" or "ERR"?**
|
|
97
|
-
-
|
|
98
|
-
-
|
|
97
|
+
- The ID column is hidden by default to avoid confusion. The node handles ID resolution automatically.
|
|
98
|
+
- If a variable fails, check if the Key (name) is correct on the Data Hub.
|
|
99
99
|
- **Write not working?** Ensure your OAuth client has `hub.variables.readwrite` scope.
|
|
100
100
|
- **Debug:** Check the Node-RED "Debug" sidebar for error messages.
|
|
101
101
|
|
package/nodes/datahub-input.html
CHANGED
|
@@ -247,7 +247,6 @@
|
|
|
247
247
|
|
|
248
248
|
<div style="display:grid; grid-template-columns: 30px 1fr; background:#eee; font-size:11px; font-weight:bold; padding:4px 0; border-bottom:1px solid #ccc;">
|
|
249
249
|
<div style="text-align:center;"><i class="fa fa-check-square-o"></i></div>
|
|
250
|
-
<!-- ID Column Removed -->
|
|
251
250
|
<div style="padding-left:10px;">Name</div>
|
|
252
251
|
</div>
|
|
253
252
|
|
|
@@ -317,18 +316,11 @@
|
|
|
317
316
|
Use the <b>Load Variables</b> button to browse and select variables from the provider.
|
|
318
317
|
Selected variables are automatically added to the list.
|
|
319
318
|
</p>
|
|
320
|
-
|
|
321
|
-
The table maps Variable Keys (names) to their IDs.
|
|
322
|
-
</p>
|
|
323
|
-
|
|
319
|
+
|
|
324
320
|
<h5>Manual Entry (Fallback)</h5>
|
|
325
321
|
<p>
|
|
326
|
-
If the "Load Variables" feature is unavailable, you can manually add variables
|
|
322
|
+
If the "Load Variables" feature is unavailable, you can manually add variables by editing the <code>manualVariables</code> property (Advanced).
|
|
327
323
|
</p>
|
|
328
|
-
<ul>
|
|
329
|
-
<li><b>Variable Key:</b> The name (e.g. <code>machine.temp</code>)</li>
|
|
330
|
-
<li><b>Variable ID:</b> The numeric ID (e.g. <code>5</code>)</li>
|
|
331
|
-
</ul>
|
|
332
324
|
|
|
333
325
|
<h4>4. Trigger Mode</h4>
|
|
334
326
|
<dl>
|
package/nodes/datahub-write.html
CHANGED
|
@@ -175,7 +175,21 @@
|
|
|
175
175
|
});
|
|
176
176
|
|
|
177
177
|
// Initial state
|
|
178
|
-
$
|
|
178
|
+
const initId = $inputId.val();
|
|
179
|
+
const initKey = $inputKey.val();
|
|
180
|
+
|
|
181
|
+
if (initId || initKey) {
|
|
182
|
+
// Show dummy entry for currently selected variable
|
|
183
|
+
const dummy = [{
|
|
184
|
+
id: initId || '?',
|
|
185
|
+
// If ID is missing, key is enough. If Key is missing, show ID.
|
|
186
|
+
key: initKey || `ID: ${initId}`
|
|
187
|
+
}];
|
|
188
|
+
renderList(dummy);
|
|
189
|
+
$statusMsg.text('Selected variable shown. Load again to refresh.').css('color', '#888');
|
|
190
|
+
} else {
|
|
191
|
+
$listContainer.html('<div style="padding:20px; text-align:center; color:#999;">Click <b>Load Variables</b> to browse.</div>');
|
|
192
|
+
}
|
|
179
193
|
|
|
180
194
|
// Set initial display (Removed updateSelectionDisplay call)
|
|
181
195
|
// But we might want to manually populate inputs if they are empty? No, defaults handle that.
|
|
@@ -304,8 +318,8 @@
|
|
|
304
318
|
<pre><code>{
|
|
305
319
|
"success": true,
|
|
306
320
|
"providerId": "u_os_adm",
|
|
307
|
-
"
|
|
308
|
-
"
|
|
321
|
+
"count": 1,
|
|
322
|
+
"firstValue": false
|
|
309
323
|
}</code></pre>
|
|
310
324
|
|
|
311
325
|
<h3>Example Flow</h3>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-uos-nats",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "Node-RED nodes for Weidmüller u-OS Data Hub. Read, write, and provide variables via NATS protocol with OAuth2 authentication. Features: Variable Key resolution, custom icons, example flows, and provider definition caching.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "IoTUeli",
|