# Developing Nodes

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

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

**Page:** 27

---

## [Sending messages from a callback function in a custom node is not working properly after some time](https://discourse.nodered.org/t/sending-messages-from-a-callback-function-in-a-custom-node-is-not-working-properly-after-some-time/51709)

<div class="topic-metadata">

**Author:** [@antoine-em](https://discourse.nodered.org/u/antoine-em)\
**Replies:** 9\
**Last updated:** [11 October 2021 01:46 UTC](https://discourse.nodered.org/t/sending-messages-from-a-callback-function-in-a-custom-node-is-not-working-properly-after-some-time/51709 "2021-10-11T01:46:58Z")

</div>

Good afternoon, I am (re-)opening a new discussion as this one is quite old but I am facing a similar issue I think. Context: - Node-RED version : 2.0.6 - NodeJS version: 16 I have developed a custom node which contai…

---

## [Using $.getJSON in oneditsave](https://discourse.nodered.org/t/using-getjson-in-oneditsave/52051)

<div class="topic-metadata">

**Author:** [@chris.willing](https://discourse.nodered.org/u/chris.willing)\
**Replies:** 10\
**Last updated:** [10 October 2021 13:04 UTC](https://discourse.nodered.org/t/using-getjson-in-oneditsave/52051 "2021-10-10T13:04:38Z")

</div>

When closing the config editor, I'd like to automatically set one of the available fields based on what the user has selected in another field i.e. if a particular device has been selected, then I want to set an appropri…

---

## [Discusion about node basics... (What should a group of nodes have?)](https://discourse.nodered.org/t/discusion-about-node-basics-what-should-a-group-of-nodes-have/51879)

<div class="topic-metadata">

**Author:** [@lizzardguki](https://discourse.nodered.org/u/lizzardguki)\
**Replies:** 3\
**Last updated:** [6 October 2021 08:03 UTC](https://discourse.nodered.org/t/discusion-about-node-basics-what-should-a-group-of-nodes-have/51879 "2021-10-06T08:03:05Z")

</div>

So after about one year of the last developed node, a new client stumbled upon me to create a node for a specific domain register website. They do have the API and this will be very easy to code... I want to deliver as …

---

## [Re-writing the turf node -- turf functions](https://discourse.nodered.org/t/re-writing-the-turf-node-turf-functions/51272)

<div class="topic-metadata">

**Author:** [@bloigge](https://discourse.nodered.org/u/bloigge)\
**Replies:** 4\
**Last updated:** [5 October 2021 10:29 UTC](https://discourse.nodered.org/t/re-writing-the-turf-node-turf-functions/51272 "2021-10-05T10:29:53Z")

</div>

Hi, After the update of the node-red-contrib-turf repo I thought about re-writing the whole repo or creating a new repo where every turf function gets its own node. I have create a mockup repo here: node-red-contrib-tur…

---

## [Using markdown directly to document the nodes](https://discourse.nodered.org/t/using-markdown-directly-to-document-the-nodes/49592)

<div class="topic-metadata">

**Author:** [@mannharleen](https://discourse.nodered.org/u/mannharleen)\
**Replies:** 18\
**Last updated:** [4 October 2021 22:12 UTC](https://discourse.nodered.org/t/using-markdown-directly-to-document-the-nodes/49592 "2021-10-04T22:12:03Z")

</div>

Issue: I find using the help style guide (Node help style guide : Node-RED) cumbersome. It takes time to document about the node using html tags. Ask: Since the documentation is converted into markdown anyway, is there …

---

## [How can I access global context in tests?](https://discourse.nodered.org/t/how-can-i-access-global-context-in-tests/51820)

<div class="topic-metadata">

**Author:** [@Roman](https://discourse.nodered.org/u/Roman)\
**Replies:** 2\
**Last updated:** [4 October 2021 08:06 UTC](https://discourse.nodered.org/t/how-can-i-access-global-context-in-tests/51820 "2021-10-04T08:06:32Z")

</div>

I'm using node-red-node-test-helper for tests of my nodes. During work nodes change global context and I should text this changes. Here is my code: let n1 = helper.getNode("n1"); n1.on('input', function(msg){ let gc…

---

## [Generate flow from code](https://discourse.nodered.org/t/generate-flow-from-code/51787)

<div class="topic-metadata">

**Author:** [@p1swk](https://discourse.nodered.org/u/p1swk)\
**Replies:** 3\
**Last updated:** [3 October 2021 23:15 UTC](https://discourse.nodered.org/t/generate-flow-from-code/51787 "2021-10-03T23:15:54Z")

</div>

Node-RED creates code from a flow. Is there a way to generate flow from code? This would help me convert a teensy 3.1 routine to tennsy 4.0

---

## [Truenas jail to notify node-red](https://discourse.nodered.org/t/truenas-jail-to-notify-node-red/51799)

<div class="topic-metadata">

**Author:** [@aihysp](https://discourse.nodered.org/u/aihysp)\
**Replies:** 0\
**Last updated:** [3 October 2021 12:26 UTC](https://discourse.nodered.org/t/truenas-jail-to-notify-node-red/51799 "2021-10-03T12:26:09Z")

</div>

Hello i am trying to do a small telegram flow that will... once a download is completed on torrent jail on truenas i will send a msg to node-red i have tried... send mqtt from console , but i am not able to find mo…

---

## [Can't import demo examples for node-red-contrib-homekit-bridged](https://discourse.nodered.org/t/cant-import-demo-examples-for-node-red-contrib-homekit-bridged/51630)

<div class="topic-metadata">

**Author:** [@pawihd](https://discourse.nodered.org/u/pawihd)\
**Replies:** 3\
**Last updated:** [3 October 2021 03:58 UTC](https://discourse.nodered.org/t/cant-import-demo-examples-for-node-red-contrib-homekit-bridged/51630 "2021-10-03T03:58:18Z")

</div>

Always get error message: type not recognized!? What can i do?

---

## [Enigma2 Receiver Alexa](https://discourse.nodered.org/t/enigma2-receiver-alexa/51531)

<div class="topic-metadata">

**Author:** [@Rufus\_0815](https://discourse.nodered.org/u/Rufus_0815)\
**Replies:** 3\
**Last updated:** [2 October 2021 07:16 UTC](https://discourse.nodered.org/t/enigma2-receiver-alexa/51531 "2021-10-02T07:16:43Z")

</div>

Hi i own a Amazon Cube with Alexa and use it for little playings like my garden irrigation flow. Now I´m looking for a way to control my Gigablue Receiver (Enigma2 Box) with Alexa, just to mute, change volume and chann…

---

## [HTTP POST Request on /flows - just get ´unexpected\_error´ / ´config.forEach is not a function´](https://discourse.nodered.org/t/http-post-request-on-flows-just-get-unexpected-error-config-foreach-is-not-a-function/51757)

<div class="topic-metadata">

**Author:** [@bfxnapnxpv](https://discourse.nodered.org/u/bfxnapnxpv)\
**Replies:** 1\
**Last updated:** [1 October 2021 14:20 UTC](https://discourse.nodered.org/t/http-post-request-on-flows-just-get-unexpected-error-config-foreach-is-not-a-function/51757 "2021-10-01T14:20:48Z")

</div>

Hi there, i need to do a POST request to http://HOSTNAME:1880/flows - to reach a click on the "Deploy" button via machine-to-machine communication... (to simulate the humam user clicks in browser) Somebody told me a PO…

---

## [Where does Node-Red save it's definitions ("Nodes") - on what directory location is the .xml (or .json) file?](https://discourse.nodered.org/t/where-does-node-red-save-its-definitions-nodes-on-what-directory-location-is-the-xml-or-json-file/51467)

<div class="topic-metadata">

**Author:** [@bfxnapnxpv](https://discourse.nodered.org/u/bfxnapnxpv)\
**Replies:** 6\
**Last updated:** [1 October 2021 14:09 UTC](https://discourse.nodered.org/t/where-does-node-red-save-its-definitions-nodes-on-what-directory-location-is-the-xml-or-json-file/51467 "2021-10-01T14:09:08Z")

</div>

Hi there I can see where it is on Linux (Raspbian), but i can't find it on Windows 10 Pro x64... Somewhere on ´C:\\Users\\USER\_NAME\\AppData\\Roaming\\npm\\node\_modules\\node-red´ ? Maybe somebody can help me? Thank you ver…

---

## [Is there a multi select dropdown widget available in the editor](https://discourse.nodered.org/t/is-there-a-multi-select-dropdown-widget-available-in-the-editor/51498)

<div class="topic-metadata">

**Author:** [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)\
**Replies:** 7\
**Last updated:** [30 September 2021 17:24 UTC](https://discourse.nodered.org/t/is-there-a-multi-select-dropdown-widget-available-in-the-editor/51498 "2021-09-30T17:24:04Z")

</div>

Hi, to save the some of the limited space of the config dialog I'm looking for a multi select drop down widget for the editor. (as far as I found out themultiple attribute only works on select lists and not dropdowns) …

---

## [Node-red-contrib-proxmox - need a starting point](https://discourse.nodered.org/t/node-red-contrib-proxmox-need-a-starting-point/51592)

<div class="topic-metadata">

**Author:** [@ChristophCaina](https://discourse.nodered.org/u/ChristophCaina)\
**Replies:** 3\
**Last updated:** [29 September 2021 10:36 UTC](https://discourse.nodered.org/t/node-red-contrib-proxmox-need-a-starting-point/51592 "2021-09-29T10:36:06Z")

</div>

Hi all, is anyone here using the node-red-contrib-proxmox to collect API information from a Server running Proxmox? I am trying to setup some kind of montioring (getting basic information such as Disk usage, uptime, et…

---

## [How can I set the error indicator (little red triangle) of a node in the editor?](https://discourse.nodered.org/t/how-can-i-set-the-error-indicator-little-red-triangle-of-a-node-in-the-editor/51481)

<div class="topic-metadata">

**Author:** [@rozek](https://discourse.nodered.org/u/rozek)\
**Replies:** 24\
**Last updated:** [29 September 2021 09:34 UTC](https://discourse.nodered.org/t/how-can-i-set-the-error-indicator-little-red-triangle-of-a-node-in-the-editor/51481 "2021-09-29T09:34:03Z")

</div>

Is it possible to set the error indicator of a node from within an editor event handler (in order to indicate that a change in another node causes unwanted side effects in the marked one)?

---

## [Fix nodes that aren't broken?](https://discourse.nodered.org/t/fix-nodes-that-arent-broken/51644)

<div class="topic-metadata">

**Author:** [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Replies:** 7\
**Last updated:** [29 September 2021 08:12 UTC](https://discourse.nodered.org/t/fix-nodes-that-arent-broken/51644 "2021-09-29T08:12:48Z")

</div>

I am doing some maintenance and renovation work on nodes I published long ago, about the time of NR version 0.17. I wonder whether it would be worthwhile to update the JS file to use the features introduced in version 1.…

---

## [How to set node status from within Editor](https://discourse.nodered.org/t/how-to-set-node-status-from-within-editor/51605)

<div class="topic-metadata">

**Author:** [@rozek](https://discourse.nodered.org/u/rozek)\
**Replies:** 25\
**Last updated:** [28 September 2021 20:28 UTC](https://discourse.nodered.org/t/how-to-set-node-status-from-within-editor/51605 "2021-09-28T20:28:43Z")

</div>

Is it possible to set a node's status from within the editor? Simply invoking node.status(...) does not seem to work.

---

## [Accessing and manipulating data stored in context().global from nodejs modules](https://discourse.nodered.org/t/accessing-and-manipulating-data-stored-in-context-global-from-nodejs-modules/51562)

<div class="topic-metadata">

**Author:** [@tomaszt762](https://discourse.nodered.org/u/tomaszt762)\
**Replies:** 5\
**Last updated:** [28 September 2021 12:36 UTC](https://discourse.nodered.org/t/accessing-and-manipulating-data-stored-in-context-global-from-nodejs-modules/51562 "2021-09-28T12:36:41Z")

</div>

Hi, I have a question regarding accessing and manipulating data stored in context().global from nodejs modules. For example a node “15virtual-device-start.js” node-red-contrib-iot-virtual-device/15virtual-device-start.j…

---

## [Spinner input field width](https://discourse.nodered.org/t/spinner-input-field-width/51533)

<div class="topic-metadata">

**Author:** [@jens\_rossbach](https://discourse.nodered.org/u/jens_rossbach)\
**Replies:** 0\
**Last updated:** [26 September 2021 12:16 UTC](https://discourse.nodered.org/t/spinner-input-field-width/51533 "2021-09-26T12:16:24Z")

</div>

Hello, in the current version of Node-RED with default theme, the width of a spinner input field on node's configuration pages cannot be set anymore via CSS properties. This worked in the past (I don't know with which e…

---

## [Allowing user to edit a list variable of a custom node](https://discourse.nodered.org/t/allowing-user-to-edit-a-list-variable-of-a-custom-node/51524)

<div class="topic-metadata">

**Author:** [@kakyoism](https://discourse.nodered.org/u/kakyoism)\
**Replies:** 1\
**Last updated:** [26 September 2021 07:25 UTC](https://discourse.nodered.org/t/allowing-user-to-edit-a-list-variable-of-a-custom-node/51524 "2021-09-26T07:25:49Z")

</div>

I've been able to specify node configuration UI using the standard input HTML elements, but when it comes to a variable that is a list itself, what is a standard way of building its node-config UI? For example, through…

---

## [How to detect change in a flow or global variable](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454)

<div class="topic-metadata">

**Author:** [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Replies:** 25\
**Last updated:** [29 May 2020 22:57 UTC](https://discourse.nodered.org/t/how-to-detect-change-in-a-flow-or-global-variable/5454 "2020-05-29T22:57:49Z")

</div>

Is it possible for a custom node to react immediately to a change in a flow/global variable? Is there an event emitted when a function node executes something like global.set("global","value") or when a change node modif…

---

## [Where do I find docs for RED.nodes.createNode/getNode/eachNode/](https://discourse.nodered.org/t/where-do-i-find-docs-for-red-nodes-createnode-getnode-eachnode/51478)

<div class="topic-metadata">

**Author:** [@rozek](https://discourse.nodered.org/u/rozek)\
**Replies:** 4\
**Last updated:** [25 September 2021 09:41 UTC](https://discourse.nodered.org/t/where-do-i-find-docs-for-red-nodes-createnode-getnode-eachnode/51478 "2021-09-25T09:41:01Z")

</div>

Trying to build my own Node-RED nodes, I looked for any documentation on RED.nodes.createNode() RED.nodes.getNode() RED.nodes.eachNode() RED.nodes.originaFlow() On stackoverflow, I've been told that now such docs woul…

---

## [Filter a msg.payload](https://discourse.nodered.org/t/filter-a-msg-payload/51496)

<div class="topic-metadata">

**Author:** [@droidblast](https://discourse.nodered.org/u/droidblast)\
**Replies:** 1\
**Last updated:** [25 September 2021 07:12 UTC](https://discourse.nodered.org/t/filter-a-msg-payload/51496 "2021-09-25T07:12:20Z")

</div>

Using the Unifi Node and I need to understand how to filter a msg.payload please, for example filter the last five alarms/alerts. Thanks in advance for any guidance... So in the Unifi UI it has Admin Admin username log …

---

## [Where do I find docs for "onpaletteadd and "onpaletteremove" events?](https://discourse.nodered.org/t/where-do-i-find-docs-for-onpaletteadd-and-onpaletteremove-events/51480)

<div class="topic-metadata">

**Author:** [@rozek](https://discourse.nodered.org/u/rozek)\
**Replies:** 6\
**Last updated:** [25 September 2021 05:10 UTC](https://discourse.nodered.org/t/where-do-i-find-docs-for-onpaletteadd-and-onpaletteremove-events/51480 "2021-09-25T05:10:04Z")

</div>

While these events (or more precisely: their handlers) are briefly mentioned in the "Creating Nodes" section of the Node-RED docs, I cannot find more detailed information about them, in particular when are these events…

---

## [How to specify the default value for a vector data in custom node HTML?](https://discourse.nodered.org/t/how-to-specify-the-default-value-for-a-vector-data-in-custom-node-html/51459)

<div class="topic-metadata">

**Author:** [@kakyoism](https://discourse.nodered.org/u/kakyoism)\
**Replies:** 1\
**Last updated:** [24 September 2021 05:49 UTC](https://discourse.nodered.org/t/how-to-specify-the-default-value-for-a-vector-data-in-custom-node-html/51459 "2021-09-24T05:49:40Z")

</div>

For a custom node definition like this \<script type="text/javascript"\> RED.nodes.registerType('hello\_world',{ category: 'function', color: '#a6bbcf', defaults: { single: {value: "…

---

## [Sidebar Internationalization](https://discourse.nodered.org/t/sidebar-internationalization/51337)

<div class="topic-metadata">

**Author:** [@Vinzenz](https://discourse.nodered.org/u/Vinzenz)\
**Replies:** 1\
**Last updated:** [21 September 2021 13:06 UTC](https://discourse.nodered.org/t/sidebar-internationalization/51337 "2021-09-21T13:06:06Z")

</div>

Hi, I developed a sidebar in Node-Red which can control a robot. Now I would like to translate this Sidebar. However, this seems not to work the same way as it did in the custom nodes I developed. When I try to add a t…

---

## [Adding a robot control pallet](https://discourse.nodered.org/t/adding-a-robot-control-pallet/51164)

<div class="topic-metadata">

**Author:** [@Vinzenz](https://discourse.nodered.org/u/Vinzenz)\
**Replies:** 2\
**Last updated:** [21 September 2021 09:08 UTC](https://discourse.nodered.org/t/adding-a-robot-control-pallet/51164 "2021-09-21T09:08:15Z")

</div>

Hi, I am writing nodes to control a robot. Therefore I am including a robot control pallet. Is it possible to subscribe to RED.events in the onpaletteadd function so that I can update the color of the buttons accordin…

---

## [Using js file with imported modules in html](https://discourse.nodered.org/t/using-js-file-with-imported-modules-in-html/51165)

<div class="topic-metadata">

**Author:** [@psykoloGG](https://discourse.nodered.org/u/psykoloGG)\
**Replies:** 10\
**Last updated:** [18 September 2021 17:54 UTC](https://discourse.nodered.org/t/using-js-file-with-imported-modules-in-html/51165 "2021-09-18T17:54:38Z")

</div>

In my node's html file I included script file This file imports/requires npm packages, which I have listed in dependencies and I know they exist. When I try loading this up in Node-RED it give's me error that it ca…

---

## [Authenticating before sending requests](https://discourse.nodered.org/t/authenticating-before-sending-requests/51162)

<div class="topic-metadata">

**Author:** [@sd\_dracula](https://discourse.nodered.org/u/sd_dracula)\
**Replies:** 5\
**Last updated:** [18 September 2021 16:06 UTC](https://discourse.nodered.org/t/authenticating-before-sending-requests/51162 "2021-09-18T16:06:19Z")

</div>

I am trying to connect and pull data from a url and I have no idea how to even begin for the login/authentication part. This will pull data from a url via HTTP POST I was hoping someone here with the correct know how ca…

---

## [Reclaiming memory from Nodes](https://discourse.nodered.org/t/reclaiming-memory-from-nodes/49554)

<div class="topic-metadata">

**Author:** [@BShashwat](https://discourse.nodered.org/u/BShashwat)\
**Replies:** 21\
**Last updated:** [17 September 2021 10:08 UTC](https://discourse.nodered.org/t/reclaiming-memory-from-nodes/49554 "2021-09-17T10:08:53Z")

</div>

Hi All, I am facing an issue where the custom nodes written by me (they constantly poll s3 to watch for latest files & also polls database to look for change in file ingestion status after running ETL Jobs on files) are…

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

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