# Developing Nodes

**URL:** https://discourse.nodered.org/c/developing-nodes/15.md?page=14

[Latest](https://discourse.nodered.org/latest.md) · [Categories](https://discourse.nodered.org/categories.md) · [Tags](https://discourse.nodered.org/tags.md)

**Page:** 15

---

## [Unit testing configuration node](https://discourse.nodered.org/t/unit-testing-configuration-node/74360)

<div class="topic-metadata">

**Author:** [@donatelloraphael](https://discourse.nodered.org/u/donatelloraphael)\
**Replies:** 1\
**Last updated:** [10 February 2023 00:47 UTC](https://discourse.nodered.org/t/unit-testing-configuration-node/74360 "2023-02-10T00:47:02Z")

</div>

Is it possible to unit test config nodes in isolation? If so, how do I go about doing it?

---

## [How to add a button to a custom node similar to the Inject node?](https://discourse.nodered.org/t/how-to-add-a-button-to-a-custom-node-similar-to-the-inject-node/74874)

<div class="topic-metadata">

**Author:** [@kakyoism](https://discourse.nodered.org/u/kakyoism)\
**Replies:** 2\
**Last updated:** [8 February 2023 07:20 UTC](https://discourse.nodered.org/t/how-to-add-a-button-to-a-custom-node-similar-to-the-inject-node/74874 "2023-02-08T07:20:38Z")

</div>

I thought that my node would automatically have a button to its left end by giving it no input port. But it turns out that it just becomes non-interactable. How to make it interactable like Inject?

---

## [Help button in node properties](https://discourse.nodered.org/t/help-button-in-node-properties/73727)

<div class="topic-metadata">

**Author:** [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Replies:** 12\
**Last updated:** [3 February 2023 16:10 UTC](https://discourse.nodered.org/t/help-button-in-node-properties/73727 "2023-02-03T16:10:20Z")

</div>

Probably only Flexdash users have seen this, but @tve has added a 'help' button' to the node properties header of the Flexdash nodes, which if clicked, selects & opens the relevant help tab in the sidebar. Perhaps this …

---

## [How to decrypt and pass a credential value in custom node](https://discourse.nodered.org/t/how-to-decrypt-and-pass-a-credential-value-in-custom-node/74584)

<div class="topic-metadata">

**Author:** [@syedhannan](https://discourse.nodered.org/u/syedhannan)\
**Replies:** 1\
**Last updated:** [2 February 2023 09:50 UTC](https://discourse.nodered.org/t/how-to-decrypt-and-pass-a-credential-value-in-custom-node/74584 "2023-02-02T09:50:45Z")

</div>

In my custom node, I fetch the username and password which I have to pass to a function of node-ansible npm package to initiate an ansible playbook. Since I have stored the password under credentials, a value required:…

---

## [Tour API - Can we use it?](https://discourse.nodered.org/t/tour-api-can-we-use-it/74477)

<div class="topic-metadata">

**Author:** [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Replies:** 2\
**Last updated:** [31 January 2023 11:34 UTC](https://discourse.nodered.org/t/tour-api-can-we-use-it/74477 "2023-01-31T11:34:32Z")

</div>

A while ago, I come across a post or video, that mentioned the Tour API will be made available, but for the life of me, I cant re-call where I had seen it. I have looked at welcome.js and given enough experimenting, I …

---

## [A problem of executing bin file generated by C](https://discourse.nodered.org/t/a-problem-of-executing-bin-file-generated-by-c/74341)

<div class="topic-metadata">

**Author:** [@magicfire](https://discourse.nodered.org/u/magicfire)\
**Replies:** 8\
**Last updated:** [30 January 2023 05:47 UTC](https://discourse.nodered.org/t/a-problem-of-executing-bin-file-generated-by-c/74341 "2023-01-30T05:47:24Z")

</div>

We recently attempt to use tuya cloud in Node-red, and we have found out that tuya's SDK is base on C--tuya SDK. After following the instructions, we do compliled and got the executable bin file "subdevice\_basic\_demo". …

---

## [Async await inside a custom node](https://discourse.nodered.org/t/async-await-inside-a-custom-node/74273)

<div class="topic-metadata">

**Author:** [@fuad\_rock](https://discourse.nodered.org/u/fuad_rock)\
**Replies:** 3\
**Last updated:** [28 January 2023 07:44 UTC](https://discourse.nodered.org/t/async-await-inside-a-custom-node/74273 "2023-01-28T07:44:15Z")

</div>

i need to wait for my async function result "on input" event. Here is my code bellow module.exports = function (RED) { const axios = require('axios'); function MyNode(config) { RED.nodes.createNode(this, conf…

---

## [Indoor Navigation Positioning rssi](https://discourse.nodered.org/t/indoor-navigation-positioning-rssi/74123)

<div class="topic-metadata">

**Author:** [@ankit.prasad](https://discourse.nodered.org/u/ankit.prasad)\
**Replies:** 2\
**Last updated:** [26 January 2023 09:07 UTC](https://discourse.nodered.org/t/indoor-navigation-positioning-rssi/74123 "2023-01-26T09:07:19Z")

</div>

If we have more than 4 bluetooth ble beacons and we have placed it in a room on 4 different walls, using rssi value can we find the user position inside a room , having a mobile app scanning all 4 beacons rssi ? Is ther…

---

## [Multiline RED.notify?](https://discourse.nodered.org/t/multiline-red-notify/74146)

<div class="topic-metadata">

**Author:** [@chris.willing](https://discourse.nodered.org/u/chris.willing)\
**Replies:** 2\
**Last updated:** [25 January 2023 14:49 UTC](https://discourse.nodered.org/t/multiline-red-notify/74146 "2023-01-25T14:49:25Z")

</div>

In oneditsave, I use RED.notify to warn if the node has been misconfigured in a particular way. It works fine but I'd like to spread the message across two lines. Is that possible? Thanks, chris

---

## [How to check if cred encryption is turned off when using projects?](https://discourse.nodered.org/t/how-to-check-if-cred-encryption-is-turned-off-when-using-projects/74014)

<div class="topic-metadata">

**Author:** [@kevinGodell](https://discourse.nodered.org/u/kevinGodell)\
**Replies:** 2\
**Last updated:** [24 January 2023 22:47 UTC](https://discourse.nodered.org/t/how-to-check-if-cred-encryption-is-turned-off-when-using-projects/74014 "2023-01-24T22:47:17Z")

</div>

I am working on a little auth middleware experiment and I want to enforce some settings before enabling the middleware, such as https and cred encryption. When not using projects, I can simply check if RED.settings.cred…

---

## [How to use node status to display error for empty input](https://discourse.nodered.org/t/how-to-use-node-status-to-display-error-for-empty-input/74113)

<div class="topic-metadata">

**Author:** [@syedhannan](https://discourse.nodered.org/u/syedhannan)\
**Replies:** 1\
**Last updated:** [24 January 2023 10:33 UTC](https://discourse.nodered.org/t/how-to-use-node-status-to-display-error-for-empty-input/74113 "2023-01-24T10:33:38Z")

</div>

I wanted to know how to add the node status if any of text input in the editor is blank. Got this code from docs but not sure how to use it in the html file. this.status({fill:"red",shape:"ring",text:"disconnected"});

---

## [Oneditsave not Saving Field](https://discourse.nodered.org/t/oneditsave-not-saving-field/73978)

<div class="topic-metadata">

**Author:** [@Flachmann](https://discourse.nodered.org/u/Flachmann)\
**Replies:** 6\
**Last updated:** [23 January 2023 15:54 UTC](https://discourse.nodered.org/t/oneditsave-not-saving-field/73978 "2023-01-23T15:54:56Z")

</div>

Hi, in addition to Fetch Backend Data I got another problem. I guess I'm simply doing this wrong. :wink: But I simply can't store the fetched data in the node. I have an httpAdmin.get('/environ-val/:key', ...) deliveri…

---

## [Is RED.tray public? and general custom tab discussion](https://discourse.nodered.org/t/is-red-tray-public-and-general-custom-tab-discussion/73983)

<div class="topic-metadata">

**Author:** [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Replies:** 4\
**Last updated:** [20 January 2023 23:16 UTC](https://discourse.nodered.org/t/is-red-tray-public-and-general-custom-tab-discussion/73983 "2023-01-20T23:16:09Z")

</div>

So... I am working on a MASSIVE refactor, and want to ensure I use API's that are designed for custom nodes. to date, I use: RED.tabs RED.comms My custom tab opens up jQuery dialogs, but I am always cautions, if thi…

---

## [Fetch Backend Data in Foreground](https://discourse.nodered.org/t/fetch-backend-data-in-foreground/73955)

<div class="topic-metadata">

**Author:** [@Flachmann](https://discourse.nodered.org/u/Flachmann)\
**Replies:** 5\
**Last updated:** [20 January 2023 13:15 UTC](https://discourse.nodered.org/t/fetch-backend-data-in-foreground/73955 "2023-01-20T13:15:29Z")

</div>

Hi, I like to fetch an environment variable in oneditsave() and wonder if this is possible. I think that the problem is, that we're on the browser, but need to get data from the NR-flow. Something like: //... oneditsa…

---

## [Should I have big change in my created node?](https://discourse.nodered.org/t/should-i-have-big-change-in-my-created-node/73926)

<div class="topic-metadata">

**Author:** [@studiobox](https://discourse.nodered.org/u/studiobox)\
**Replies:** 1\
**Last updated:** [19 January 2023 16:33 UTC](https://discourse.nodered.org/t/should-i-have-big-change-in-my-created-node/73926 "2023-01-19T16:33:37Z")

</div>

Hi, I have new idea for my created node. But it maybe have many change, such as separate a node to new created node package. Moreover, it maybe seprate some input in a created node, to new a created node. So, it maybe …

---

## [Not able to pre fill value in text input stored in defaults](https://discourse.nodered.org/t/not-able-to-pre-fill-value-in-text-input-stored-in-defaults/73899)

<div class="topic-metadata">

**Author:** [@syedhannan](https://discourse.nodered.org/u/syedhannan)\
**Replies:** 2\
**Last updated:** [19 January 2023 10:50 UTC](https://discourse.nodered.org/t/not-able-to-pre-fill-value-in-text-input-stored-in-defaults/73899 "2023-01-19T10:50:16Z")

</div>

I have stored a value in defaults which I want to pre fill in the editor but it doesn't show up. defaults: { name: { value: "" }, hs\_Timezone: { value: "" }, hs\_IP: { value: "12345" }, //not shown…

---

## [Data From HTML -\> JS To Send data](https://discourse.nodered.org/t/data-from-html-js-to-send-data/73843)

<div class="topic-metadata">

**Author:** [@fostm](https://discourse.nodered.org/u/fostm)\
**Replies:** 2\
**Last updated:** [19 January 2023 00:16 UTC](https://discourse.nodered.org/t/data-from-html-js-to-send-data/73843 "2023-01-19T00:16:45Z")

</div>

Hi, I'm Yeon Data From HTML -\> JS To Send data Is there any other way to send it besides the input element? For example, as shown in the picture below, Instead of using input elements, you can use the I would like t…

---

## [Forked Node-Red Package Fails upon minor change (1 to 2)](https://discourse.nodered.org/t/forked-node-red-package-fails-upon-minor-change-1-to-2/73879)

<div class="topic-metadata">

**Author:** [@stokes776](https://discourse.nodered.org/u/stokes776)\
**Replies:** 9\
**Last updated:** [18 January 2023 22:55 UTC](https://discourse.nodered.org/t/forked-node-red-package-fails-upon-minor-change-1-to-2/73879 "2023-01-18T22:55:40Z")

</div>

Hello, EDIT: I have posted on the issues page of the original repo, on a thread where someone was asking for a similar feature years ago, but there has been no response. Im using a package that works exactly the way I …

---

## [When are config nodes defined in the flow editor?](https://discourse.nodered.org/t/when-are-config-nodes-defined-in-the-flow-editor/73769)

<div class="topic-metadata">

**Author:** [@tve](https://discourse.nodered.org/u/tve)\
**Replies:** 11\
**Last updated:** [17 January 2023 12:31 UTC](https://discourse.nodered.org/t/when-are-config-nodes-defined-in-the-flow-editor/73769 "2023-01-17T12:31:13Z")

</div>

From another thread: I think the question here is what do you need this for, because there may be better ways to organize things. Waiting for the runtime-state event is not cool because you assume that the runtime wil…

---

## [Save inject interval time (resetting everytime)](https://discourse.nodered.org/t/save-inject-interval-time-resetting-everytime/73759)

<div class="topic-metadata">

**Author:** [@nivong](https://discourse.nodered.org/u/nivong)\
**Replies:** 4\
**Last updated:** [16 January 2023 21:57 UTC](https://discourse.nodered.org/t/save-inject-interval-time-resetting-everytime/73759 "2023-01-16T21:57:03Z")

</div>

So I have this inject node, injecting every 12 minutes with Home Assistant node red addon. The only thing is it has to keep injecting every 12 minutes and should not be any longer or shorter, even after a reboot it shoul…

---

## [Programmatic checkbox entries](https://discourse.nodered.org/t/programmatic-checkbox-entries/73731)

<div class="topic-metadata">

**Author:** [@chris.willing](https://discourse.nodered.org/u/chris.willing)\
**Replies:** 2\
**Last updated:** [16 January 2023 03:44 UTC](https://discourse.nodered.org/t/programmatic-checkbox-entries/73731 "2023-01-16T03:44:35Z")

</div>

There was an interesting example given here (thanks @marcus-j-davies), showing how to create varying numbers of checkbox items when configuring a node. That thread is closed, therefore this new question. I'd like to do …

---

## [Function variables vs custom properties in 'node' objects](https://discourse.nodered.org/t/function-variables-vs-custom-properties-in-node-objects/73589)

<div class="topic-metadata">

**Author:** [@omrid](https://discourse.nodered.org/u/omrid)\
**Replies:** 8\
**Last updated:** [15 January 2023 13:45 UTC](https://discourse.nodered.org/t/function-variables-vs-custom-properties-in-node-objects/73589 "2023-01-15T13:45:30Z")

</div>

Hi experts, In my custom-developed nodes, I maintain & work with local (per node instance) properties. What would be the difference (and better way of doing this): Option 1: as function variables module.exports = fun…

---

## [Google home, start a flow using vocal commands](https://discourse.nodered.org/t/google-home-start-a-flow-using-vocal-commands/73607)

<div class="topic-metadata">

**Author:** [@ronyn77](https://discourse.nodered.org/u/ronyn77)\
**Replies:** 5\
**Last updated:** [13 January 2023 13:46 UTC](https://discourse.nodered.org/t/google-home-start-a-flow-using-vocal-commands/73607 "2023-01-13T13:46:13Z")

</div>

Hello, Is there any way to convert a flow of nodes into an entity, so it could be used later to be integrated into google home integration that will permit me to use vocal commands to execute the created flow/entity?

---

## [How to accessing defaults variable in oneditprepare](https://discourse.nodered.org/t/how-to-accessing-defaults-variable-in-oneditprepare/73623)

<div class="topic-metadata">

**Author:** [@syedhannan](https://discourse.nodered.org/u/syedhannan)\
**Replies:** 2\
**Last updated:** [13 January 2023 10:47 UTC](https://discourse.nodered.org/t/how-to-accessing-defaults-variable-in-oneditprepare/73623 "2023-01-13T10:47:27Z")

</div>

I want to access a variable defined in my html file in defaults inside my oneditprepare function. RED.nodes.registerType("myNode", { category: "Custom", color: "#07950D", defaults: { name: { value: "…

---

## [How to re render a list in select tag in editor](https://discourse.nodered.org/t/how-to-re-render-a-list-in-select-tag-in-editor/73576)

<div class="topic-metadata">

**Author:** [@syedhannan](https://discourse.nodered.org/u/syedhannan)\
**Replies:** 6\
**Last updated:** [12 January 2023 17:44 UTC](https://discourse.nodered.org/t/how-to-re-render-a-list-in-select-tag-in-editor/73576 "2023-01-12T17:44:07Z")

</div>

I am fetching a list of files from FTP and displaying it in the typedInput select tag. So the first time I access the path of FTP I am able to fetch the files and display it in the select tag as well as in the console. …

---

## [How can I get object from RED.\_() function?](https://discourse.nodered.org/t/how-can-i-get-object-from-red-function/73550)

<div class="topic-metadata">

**Author:** [@studiobox](https://discourse.nodered.org/u/studiobox)\
**Replies:** 6\
**Last updated:** [12 January 2023 16:51 UTC](https://discourse.nodered.org/t/how-can-i-get-object-from-red-function/73550 "2023-01-12T16:51:51Z")

</div>

Hi, I use RED.\_("node.myKey") but the result is below. key 'node.myKey (en-US)' returned an object instead of string. How can I get object from RED.\_() function? Because I want to get object from "Internationalisation…

---

## [Add Credential Files to Configuration Node](https://discourse.nodered.org/t/add-credential-files-to-configuration-node/73310)

<div class="topic-metadata">

**Author:** [@Flachmann](https://discourse.nodered.org/u/Flachmann)\
**Replies:** 10\
**Last updated:** [12 January 2023 12:24 UTC](https://discourse.nodered.org/t/add-credential-files-to-configuration-node/73310 "2023-01-12T12:24:26Z")

</div>

Hi, I developed my first configuration node, following Configuration nodes. Similar to the MQTT node, I need to store TLS certificates. So, in the mask it is e.g. \<input type="file" id="node-config-input-rootCrt"\> An…

---

## [Retaining the options of select list after reopening of editor](https://discourse.nodered.org/t/retaining-the-options-of-select-list-after-reopening-of-editor/73524)

<div class="topic-metadata">

**Author:** [@syedhannan](https://discourse.nodered.org/u/syedhannan)\
**Replies:** 4\
**Last updated:** [11 January 2023 10:59 UTC](https://discourse.nodered.org/t/retaining-the-options-of-select-list-after-reopening-of-editor/73524 "2023-01-11T10:59:46Z")

</div>

In my custom node editor I am fetching a list of files from FTP server and using typedInput select tag for displaying the same. Once I select a value and then close the editor and then reopen it then I don't get the …

---

## [Node-red-node-test-helper does not support multiple upstream output ports?](https://discourse.nodered.org/t/node-red-node-test-helper-does-not-support-multiple-upstream-output-ports/73395)

<div class="topic-metadata">

**Author:** [@kakyoism](https://discourse.nodered.org/u/kakyoism)\
**Replies:** 4\
**Last updated:** [9 January 2023 10:52 UTC](https://discourse.nodered.org/t/node-red-node-test-helper-does-not-support-multiple-upstream-output-ports/73395 "2023-01-09T10:52:12Z")

</div>

Repro define a node myNode, with multiple output ports at the end of its node.on('input', ...), call node.send(\[msg1, msg2, ...\]); hook this node up with node-red-node-test-helper, like this let flow = \[ { id: 'n1', …

---

## [How to use variables entered in editor inside httpadmin function](https://discourse.nodered.org/t/how-to-use-variables-entered-in-editor-inside-httpadmin-function/73194)

<div class="topic-metadata">

**Author:** [@syedhannan](https://discourse.nodered.org/u/syedhannan)\
**Replies:** 6\
**Last updated:** [9 January 2023 09:39 UTC](https://discourse.nodered.org/t/how-to-use-variables-entered-in-editor-inside-httpadmin-function/73194 "2023-01-09T09:39:45Z")

</div>

I am trying to display a list of files from FTP server after successful authentication using basic-ftp package. I want to use the variables entered in the editor inside the httpadmin function which makes a ftp call in…

[Previous page](https://discourse.nodered.org/c/developing-nodes/15.md?page=13)

[Next page](https://discourse.nodered.org/c/developing-nodes/15.md?page=15)
