# General

**URL:** https://discourse.nodered.org/c/general/7.md?page=82

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

**Page:** 83

---

## [Flow-timer questions](https://discourse.nodered.org/t/flow-timer-questions/91230)

<div class="topic-metadata">

**Author:** [@OriolFM](https://discourse.nodered.org/u/OriolFM)\
**Replies:** 3\
**Last updated:** [25 September 2024 12:52 UTC](https://discourse.nodered.org/t/flow-timer-questions/91230 "2024-09-25T12:52:50Z")

</div>

Hi, I want to monitor production time on several machines, based on the machine status (run, error, maintenance, job finished). Basically, a timer that would start for a given batch (based on the program name that is r…

---

## [How to use the "Add IO File" feature in modbus node](https://discourse.nodered.org/t/how-to-use-the-add-io-file-feature-in-modbus-node/91252)

<div class="topic-metadata">

**Author:** [@pbhanu368](https://discourse.nodered.org/u/pbhanu368)\
**Replies:** 0\
**Last updated:** [25 September 2024 12:22 UTC](https://discourse.nodered.org/t/how-to-use-the-add-io-file-feature-in-modbus-node/91252 "2024-09-25T12:22:20Z")

</div>

Is anyone help me to know how to use this IO file feature in modbus in node red

---

## [Access files from outside nodered](https://discourse.nodered.org/t/access-files-from-outside-nodered/91251)

<div class="topic-metadata">

**Author:** [@f3rpand0](https://discourse.nodered.org/u/f3rpand0)\
**Replies:** 2\
**Last updated:** [25 September 2024 12:06 UTC](https://discourse.nodered.org/t/access-files-from-outside-nodered/91251 "2024-09-25T12:06:26Z")

</div>

Hello, I have an HTLM node that gets a binary file as a repsonse. The file is located in something like: /data/folder/file.mp3 Is there a way to get access to that file from outside nodered? (same network) With http…

---

## [Implementing Context Menu for Polyline Endpoints Name in Node-RED Worldmap](https://discourse.nodered.org/t/implementing-context-menu-for-polyline-endpoints-name-in-node-red-worldmap/91248)

<div class="topic-metadata">

**Author:** [@LoganathanSambath](https://discourse.nodered.org/u/LoganathanSambath)\
**Replies:** 0\
**Last updated:** [25 September 2024 10:25 UTC](https://discourse.nodered.org/t/implementing-context-menu-for-polyline-endpoints-name-in-node-red-worldmap/91248 "2024-09-25T10:25:17Z")

</div>

\-I'm working on a Node-RED Worldmap project and want to create a context menu that appears when clicking on the polylines. -The context menu should display the names of the two endpoints (source and target) of the clic…

---

## [Global context variable in http request headers?](https://discourse.nodered.org/t/global-context-variable-in-http-request-headers/91246)

<div class="topic-metadata">

**Author:** [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Replies:** 4\
**Last updated:** [25 September 2024 10:20 UTC](https://discourse.nodered.org/t/global-context-variable-in-http-request-headers/91246 "2024-09-25T10:20:11Z")

</div>

Is it possible to use context variables in http request header fields? Like this: Because I can't get it to work (results in 401 unauthorized). Instead, I add msg.token in a function node before http request to get …

---

## [Flooding - early warning system](https://discourse.nodered.org/t/flooding-early-warning-system/91196)

<div class="topic-metadata">

**Author:** [@hazymat](https://discourse.nodered.org/u/hazymat)\
**Replies:** 54\
**Last updated:** [25 September 2024 09:21 UTC](https://discourse.nodered.org/t/flooding-early-warning-system/91196 "2024-09-25T09:21:55Z")

</div>

Hello, this is an urgent and real world problem which I'd like to try to alleviate with Node-RED! note: I realised after posting this, that I'm very lucky compared to some people in mainland europe right now who have be…

---

## [Help: Lost & confused](https://discourse.nodered.org/t/help-lost-confused/91236)

<div class="topic-metadata">

**Author:** [@Ragonz](https://discourse.nodered.org/u/Ragonz)\
**Replies:** 3\
**Last updated:** [25 September 2024 07:17 UTC](https://discourse.nodered.org/t/help-lost-confused/91236 "2024-09-25T07:17:57Z")

</div>

I am trying to create a node red flow on Home assistant that will do the following Check battery % of car Check current electricity cost Based on the above 2 turn on the car charger Then switch off the car charger if…

---

## [Autocomplete with input from custom node](https://discourse.nodered.org/t/autocomplete-with-input-from-custom-node/91225)

<div class="topic-metadata">

**Author:** [@ellisdp](https://discourse.nodered.org/u/ellisdp)\
**Replies:** 2\
**Last updated:** [25 September 2024 06:54 UTC](https://discourse.nodered.org/t/autocomplete-with-input-from-custom-node/91225 "2024-09-25T06:54:27Z")

</div>

With our integration we have some custom input and output node types with data formats described by a schema, e.g. we have a Request input node which might have a location type schema of {"latitude" : "double", "longitud…

---

## [Loading palette nodes too SLOW](https://discourse.nodered.org/t/loading-palette-nodes-too-slow/91200)

<div class="topic-metadata">

**Author:** [@xty19](https://discourse.nodered.org/u/xty19)\
**Replies:** 5\
**Last updated:** [24 September 2024 23:20 UTC](https://discourse.nodered.org/t/loading-palette-nodes-too-slow/91200 "2024-09-24T23:20:39Z")

</div>

Node-Red Version 4.0.2 Node Version V18.20.4 Electron Version No response Platform windows11 WSL-Linux 5.15.153 ubuntu Architecture x64 Sorry to bother everyone, but when running node red using WSL on Windows 1…

---

## [Split string into object array or variables](https://discourse.nodered.org/t/split-string-into-object-array-or-variables/91226)

<div class="topic-metadata">

**Author:** [@Wally](https://discourse.nodered.org/u/Wally)\
**Replies:** 7\
**Last updated:** [24 September 2024 19:13 UTC](https://discourse.nodered.org/t/split-string-into-object-array-or-variables/91226 "2024-09-24T19:13:39Z")

</div>

Hi I get the type of string below returned to me from a mqtt server, always 5 elements, it cannot be modified. receipt=xxxxxxr5wfe51zkxxrow97nsox4xxxx&acknowledged=1&acknowledged\_at=1727167256&acknowledged\_by=xxxxxxnum…

---

## [Zwave devices not connected](https://discourse.nodered.org/t/zwave-devices-not-connected/91227)

<div class="topic-metadata">

**Author:** [@daak](https://discourse.nodered.org/u/daak)\
**Replies:** 1\
**Last updated:** [24 September 2024 10:18 UTC](https://discourse.nodered.org/t/zwave-devices-not-connected/91227 "2024-09-24T10:18:32Z")

</div>

Hello, I created a Z Wave program but the problem is that the AEOTEC does not vote all the devices even though they are powered and have been for a week. Thank you

---

## [Enabling the Project Feature in setting.js - Crashes Node red](https://discourse.nodered.org/t/enabling-the-project-feature-in-setting-js-crashes-node-red/91214)

<div class="topic-metadata">

**Author:** [@bereket-09](https://discourse.nodered.org/u/bereket-09)\
**Replies:** 3\
**Last updated:** [24 September 2024 09:17 UTC](https://discourse.nodered.org/t/enabling-the-project-feature-in-setting-js-crashes-node-red/91214 "2024-09-24T09:17:41Z")

</div>

Hey , When I enable the Projects feature in Node Red , It crashes and freezing in the initial loading screen. But when i disable back that option it starts working fine. Checked the Other Closed Topics too but no help …

---

## [Help how to change the icon depending on value](https://discourse.nodered.org/t/help-how-to-change-the-icon-depending-on-value/91204)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 18\
**Last updated:** [24 September 2024 02:10 UTC](https://discourse.nodered.org/t/help-how-to-change-the-icon-depending-on-value/91204 "2024-09-24T02:10:14Z")

</div>

This is an extract from my code: if (pstate \> 2) { msg2 = { payload: '\<font color = "green"\> \<i class="fa fa-bullseye fa-2x" \>\</i\>\</font\>', colour: "green" }; } Which works. What I want to …

---

## [How to upgrade NR from 3.0.2 to 3.1.5](https://discourse.nodered.org/t/how-to-upgrade-nr-from-3-0-2-to-3-1-5/91173)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 11\
**Last updated:** [24 September 2024 01:44 UTC](https://discourse.nodered.org/t/how-to-upgrade-nr-from-3-0-2-to-3-1-5/91173 "2024-09-24T01:44:46Z")

</div>

I may need to update NR on my 3 RasPis. They have NR 3.0.2 They need 3.1.5 so they are the same version as this machine. Sorry, how would I do that?

---

## [Warning in systemd / journalctl: referenced but unset environment](https://discourse.nodered.org/t/warning-in-systemd-journalctl-referenced-but-unset-environment/91190)

<div class="topic-metadata">

**Author:** [@Becker](https://discourse.nodered.org/u/Becker)\
**Replies:** 3\
**Last updated:** [23 September 2024 19:50 UTC](https://discourse.nodered.org/t/warning-in-systemd-journalctl-referenced-but-unset-environment/91190 "2024-09-23T19:50:18Z")

</div>

Hi, I saw in journalctl the following warning message nodered.service: Referenced but unset environment variable evaluates to an empty string: NODE\_RED\_OPTIONS in both of my Ubuntu VM. Can you tell me what is the prob…

---

## [R pi PIR triggering playing mp3 file](https://discourse.nodered.org/t/r-pi-pir-triggering-playing-mp3-file/91194)

<div class="topic-metadata">

**Author:** [@thecybo](https://discourse.nodered.org/u/thecybo)\
**Replies:** 3\
**Last updated:** [23 September 2024 15:38 UTC](https://discourse.nodered.org/t/r-pi-pir-triggering-playing-mp3-file/91194 "2024-09-23T15:38:54Z")

</div>

I am new to node-red and have spent days trying to get a simple project to play a sound file when triggered from a PIR and turn on a light with a Raspberry Pi. I have tried all the nodes that deal with audio. Even tr…

---

## [Facing an issue of connecting modbus TCP](https://discourse.nodered.org/t/facing-an-issue-of-connecting-modbus-tcp/91203)

<div class="topic-metadata">

**Author:** [@Rajmohan](https://discourse.nodered.org/u/Rajmohan)\
**Replies:** 1\
**Last updated:** [23 September 2024 09:17 UTC](https://discourse.nodered.org/t/facing-an-issue-of-connecting-modbus-tcp/91203 "2024-09-23T09:17:12Z")

</div>

hi myself Rajmohan iam using the following version of node v22.4.1 and npm 10.8.1 Recently i connected Modbus TCP of Temperature and Humidity sensor to read the temperature and Humidity data.... I have a created a …

---

## [UDP out cant set host IP](https://discourse.nodered.org/t/udp-out-cant-set-host-ip/90844)

<div class="topic-metadata">

**Author:** [@xty19](https://discourse.nodered.org/u/xty19)\
**Replies:** 8\
**Last updated:** [23 September 2024 07:38 UTC](https://discourse.nodered.org/t/udp-out-cant-set-host-ip/90844 "2024-09-23T07:38:58Z")

</div>

Node-Red Version 3.0.2 Node Version V18.16.1 (MACOS) Electron Version No response Platform MACOS12.1 Architecture x64 My PC has multiple IP addresses, 192.168.8.47 and 192.168.0.17. I want to use UDP with IP …

---

## [Compare time in string format](https://discourse.nodered.org/t/compare-time-in-string-format/91176)

<div class="topic-metadata">

**Author:** [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Replies:** 2\
**Last updated:** [23 September 2024 06:37 UTC](https://discourse.nodered.org/t/compare-time-in-string-format/91176 "2024-09-23T06:37:45Z")

</div>

Hello i have a variable with time 10:00AM formatted as a string, I need to compare this against the current time. The date function returns integers. if I use parseInt on the string and slice it up, I don't get the lead…

---

## [Reading registers from electricity meters with modbus](https://discourse.nodered.org/t/reading-registers-from-electricity-meters-with-modbus/91168)

<div class="topic-metadata">

**Author:** [@LWfromPY](https://discourse.nodered.org/u/LWfromPY)\
**Replies:** 3\
**Last updated:** [23 September 2024 02:19 UTC](https://discourse.nodered.org/t/reading-registers-from-electricity-meters-with-modbus/91168 "2024-09-23T02:19:51Z")

</div>

Hello everyone, I need help with the following issue. I am trying to read data from a Modbus (RTU) electricity meter with a Raspberry Pi. So far everything is working fine, I can read almost all values, but I am havin…

---

## [Using blockly timer section](https://discourse.nodered.org/t/using-blockly-timer-section/91182)

<div class="topic-metadata">

**Author:** [@magicman](https://discourse.nodered.org/u/magicman)\
**Replies:** 7\
**Last updated:** [22 September 2024 22:05 UTC](https://discourse.nodered.org/t/using-blockly-timer-section/91182 "2024-09-22T22:05:06Z")

</div>

Hi, I am trying to script a timer function using blockly, i can start a timer and stop it using blockly but i need to be able to restart the timer BEFORE it completes its present timer setting. eg 10 seconds into its 30 …

---

## [Node-red-contrib-custom-chatgpt4o Range Error](https://discourse.nodered.org/t/node-red-contrib-custom-chatgpt4o-range-error/91181)

<div class="topic-metadata">

**Author:** [@imperium85](https://discourse.nodered.org/u/imperium85)\
**Replies:** 6\
**Last updated:** [22 September 2024 09:56 UTC](https://discourse.nodered.org/t/node-red-contrib-custom-chatgpt4o-range-error/91181 "2024-09-22T09:56:58Z")

</div>

Hi People, I'm experimenting with Chatgpt in Flow Fuse. I have a Text\_input for asking a question and ui-text to desplay the resoult. In the debug window I see the reply but in the ui text node I'm getting this error an…

---

## [Help with what's (not) happening](https://discourse.nodered.org/t/help-with-whats-not-happening/91177)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 6\
**Last updated:** [22 September 2024 01:52 UTC](https://discourse.nodered.org/t/help-with-whats-not-happening/91177 "2024-09-22T01:52:07Z")

</div>

Seems I am really asking for trouble just now. I am trying to get some stuff working - which I thought was. So, quickly: If I send a DEBUG message it sets a bit and so when messages arrive I get node.warn() stuff. So…

---

## [Function nodes doing different things with different NR versions](https://discourse.nodered.org/t/function-nodes-doing-different-things-with-different-nr-versions/91174)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 3\
**Last updated:** [21 September 2024 23:13 UTC](https://discourse.nodered.org/t/function-nodes-doing-different-things-with-different-nr-versions/91174 "2024-09-21T23:13:28Z")

</div>

Following on from my other question about updating NR from 3.0.2 to 3.1.5.... I made a lump of code in a function node on the 3.1.5 machine. In the on start tab I have: // Code added here will be run once // whenever …

---

## [Node red stopped due to interruption and reconnection of internet connection](https://discourse.nodered.org/t/node-red-stopped-due-to-interruption-and-reconnection-of-internet-connection/91155)

<div class="topic-metadata">

**Author:** [@delei](https://discourse.nodered.org/u/delei)\
**Replies:** 4\
**Last updated:** [21 September 2024 20:42 UTC](https://discourse.nodered.org/t/node-red-stopped-due-to-interruption-and-reconnection-of-internet-connection/91155 "2024-09-21T20:42:30Z")

</div>

I have installed node-red on a windows 11 PC which is running 24/7. Node-red is started by the autostart function of windows. Problem is, node-red will closed automatically without any failure in flows or the installati…

---

## [Issues with udp node. Extra characters are added](https://discourse.nodered.org/t/issues-with-udp-node-extra-characters-are-added/91143)

<div class="topic-metadata">

**Author:** [@ygreq](https://discourse.nodered.org/u/ygreq)\
**Replies:** 3\
**Last updated:** [21 September 2024 09:19 UTC](https://discourse.nodered.org/t/issues-with-udp-node-extra-characters-are-added/91143 "2024-09-21T09:19:24Z")

</div>

Hi folks! I managed to get input from smart switches and send them via Zigbee2MQTT and Node-RED and OSC / UDP to another app (Cycling '74 Max in my case). You can see how in the attached images. Now I am trying to cont…

---

## [This is not working and I don't understand why. (Complicated kinda)](https://discourse.nodered.org/t/this-is-not-working-and-i-dont-understand-why-complicated-kinda/91158)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 7\
**Last updated:** [21 September 2024 09:26 UTC](https://discourse.nodered.org/t/this-is-not-working-and-i-dont-understand-why-complicated-kinda/91158 "2024-09-21T09:26:18Z")

</div>

Yeah, I write dog's breakfast for code. That's who I am. I am TRYING to optimise this code from the already big dog's breakfast. The existing one is convoluted and I've found problems with it. (calling the setBit and…

---

## [How to understand why node-red restarts?](https://discourse.nodered.org/t/how-to-understand-why-node-red-restarts/91146)

<div class="topic-metadata">

**Author:** [@tkreks](https://discourse.nodered.org/u/tkreks)\
**Replies:** 5\
**Last updated:** [21 September 2024 07:35 UTC](https://discourse.nodered.org/t/how-to-understand-why-node-red-restarts/91146 "2024-09-21T07:35:32Z")

</div>

Hello! In one of my projects, I use Node-RED for automation. I'm not a programmer at all, but Node-RED allows me to automate certain things and deepen my understanding. The gist is: I have agents on Selenium, and these a…

---

## [Reading contents of txt file into object](https://discourse.nodered.org/t/reading-contents-of-txt-file-into-object/91157)

<div class="topic-metadata">

**Author:** [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Replies:** 1\
**Last updated:** [21 September 2024 06:13 UTC](https://discourse.nodered.org/t/reading-contents-of-txt-file-into-object/91157 "2024-09-21T06:13:04Z")

</div>

hello I have a payload which has consists of: payload.value1 = abc; payload.value2 = def; payload.value3= hij; I write this to a text file, the text file contains: {"value1":"abc", "value2":"def","value3":"hij"} I…

---

## [Using a global variable in the data/json](https://discourse.nodered.org/t/using-a-global-variable-in-the-data-json/91145)

<div class="topic-metadata">

**Author:** [@Crabsticks](https://discourse.nodered.org/u/Crabsticks)\
**Replies:** 7\
**Last updated:** [20 September 2024 17:11 UTC](https://discourse.nodered.org/t/using-a-global-variable-in-the-data-json/91145 "2024-09-20T17:11:25Z")

</div>

Hello, I'm trying to create a flow to change the brightness of my light, I can set the brightness directly however I can't figure out how to use a global variable I've set elsewhere in the flow. I'm sure I'm just not us…

[Previous page](https://discourse.nodered.org/c/general/7.md?page=81)

[Next page](https://discourse.nodered.org/c/general/7.md?page=83)
