# General

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

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

**Page:** 387

---

## [Double switch with mqtt -\> endless loop](https://discourse.nodered.org/t/double-switch-with-mqtt-endless-loop/61741)

<div class="topic-metadata">

**Author:** [@Becker](https://discourse.nodered.org/u/Becker)\
**Replies:** 4\
**Last updated:** [25 April 2022 09:42 UTC](https://discourse.nodered.org/t/double-switch-with-mqtt-endless-loop/61741 "2022-04-25T09:42:41Z")

</div>

Hi, I want to build a very simple switch for both RPi. So I have to send the status (false/true) by mqtt. But I always get a endless loop :woozy\_face: Any idea how to get this work ? (tried switch and slider) I w…

---

## [Error, Json string ends unexpectedly](https://discourse.nodered.org/t/error-json-string-ends-unexpectedly/61726)

<div class="topic-metadata">

**Author:** [@king877](https://discourse.nodered.org/u/king877)\
**Replies:** 4\
**Last updated:** [25 April 2022 08:43 UTC](https://discourse.nodered.org/t/error-json-string-ends-unexpectedly/61726 "2022-04-25T08:43:07Z")

</div>

So I am trying to publish some values to a topic using jsondoc, but unfortunately only some of the values get published. It sends 6 out of the 10. My memory is 256 for the doc here is the code. The output I get in node …

---

## [Help for what term to use to indicate the mode of something](https://discourse.nodered.org/t/help-for-what-term-to-use-to-indicate-the-mode-of-something/61737)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 1\
**Last updated:** [25 April 2022 07:10 UTC](https://discourse.nodered.org/t/help-for-what-term-to-use-to-indicate-the-mode-of-something/61737 "2022-04-25T07:10:34Z")

</div>

What word/something can I use in a subflow ENV setting to control a setting. Alas mode is taken. (Isn't it always the way) :wink: My effort on my version of the filter node (aka RBE) has run into a wall kind of. I …

---

## [Sudo command not found](https://discourse.nodered.org/t/sudo-command-not-found/61572)

<div class="topic-metadata">

**Author:** [@LDP](https://discourse.nodered.org/u/LDP)\
**Replies:** 7\
**Last updated:** [25 April 2022 06:52 UTC](https://discourse.nodered.org/t/sudo-command-not-found/61572 "2022-04-25T06:52:15Z")

</div>

Hi all, I am running windows 11 with Docker Desktop. After start the Node-red container, I accessed to Node-red through command: "docker exec -it mynodered bash". From here, I tried to run command: "npm install -g n" an…

---

## [Can not get files via sftp](https://discourse.nodered.org/t/can-not-get-files-via-sftp/61633)

<div class="topic-metadata">

**Author:** [@smitterer](https://discourse.nodered.org/u/smitterer)\
**Replies:** 7\
**Last updated:** [25 April 2022 06:29 UTC](https://discourse.nodered.org/t/can-not-get-files-via-sftp/61633 "2022-04-25T06:29:14Z")

</div>

Hi, I'm trying to get all files from a folder on a server via sftp and download them into a specific local folder. If possible, I'd only like to download those files that start with XYC. I tried the following flow, bu…

---

## [Load value into function](https://discourse.nodered.org/t/load-value-into-function/60489)

<div class="topic-metadata">

**Author:** [@Pikny](https://discourse.nodered.org/u/Pikny)\
**Replies:** 6\
**Last updated:** [25 April 2022 05:26 UTC](https://discourse.nodered.org/t/load-value-into-function/60489 "2022-04-25T05:26:36Z")

</div>

Hi! I would like to write a function, when initiated by "PLC start mission", will take the value from "robot\_id" and enter it in the appropriate place in the function. Unfortunately, he keeps throwing me an error. Anyon…

---

## [File that looks fine but may be encoded wrong](https://discourse.nodered.org/t/file-that-looks-fine-but-may-be-encoded-wrong/61732)

<div class="topic-metadata">

**Author:** [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Replies:** 2\
**Last updated:** [25 April 2022 00:25 UTC](https://discourse.nodered.org/t/file-that-looks-fine-but-may-be-encoded-wrong/61732 "2022-04-25T00:25:31Z")

</div>

OS: macOS 12.2.1 Node-RED version: v2.2.2 Node.js version: v14.16.0 Darwin 21.3.0 x64 LE Dashboard version 3.1.3 started at /ui So I have a program creating a CSV file. I need to change the order of the items and re…

---

## [Rasberry Pi GPIO pins not switching](https://discourse.nodered.org/t/rasberry-pi-gpio-pins-not-switching/61658)

<div class="topic-metadata">

**Author:** [@Jsimon003](https://discourse.nodered.org/u/Jsimon003)\
**Replies:** 24\
**Last updated:** [24 April 2022 22:54 UTC](https://discourse.nodered.org/t/rasberry-pi-gpio-pins-not-switching/61658 "2022-04-24T22:54:01Z")

</div>

I have a simple GPIO set up where I inject a 1 and a 0 into the standard GPIO node to turn a relay on and off. my GPIO pins will not change state

---

## [Alarm system for portable item](https://discourse.nodered.org/t/alarm-system-for-portable-item/61731)

<div class="topic-metadata">

**Author:** [@smitterer](https://discourse.nodered.org/u/smitterer)\
**Replies:** 0\
**Last updated:** [24 April 2022 20:14 UTC](https://discourse.nodered.org/t/alarm-system-for-portable-item/61731 "2022-04-24T20:14:10Z")

</div>

Hi, I'm planning on creating an alarm system for a portable device. Externally, in Home Assistant, I set an alarm to be on or off. When its state changes to armed, I want Node-Red to take the current location of the de…

---

## [Buffer parser node "LSW / MSW"](https://discourse.nodered.org/t/buffer-parser-node-lsw-msw/61695)

<div class="topic-metadata">

**Author:** [@pararnold](https://discourse.nodered.org/u/pararnold)\
**Replies:** 6\
**Last updated:** [24 April 2022 19:05 UTC](https://discourse.nodered.org/t/buffer-parser-node-lsw-msw/61695 "2022-04-24T19:05:24Z")

</div>

Hi, I found this closed, unsolved topic: https://discourse.nodered.org/t/going-crazy-trying-to-read-signed-int32-from-buffer as I want to parse data from the same device. The problem is that it is providing int32 data …

---

## [Simple (should be) buffer parser question](https://discourse.nodered.org/t/simple-should-be-buffer-parser-question/61727)

<div class="topic-metadata">

**Author:** [@SkyMo](https://discourse.nodered.org/u/SkyMo)\
**Replies:** 2\
**Last updated:** [24 April 2022 17:39 UTC](https://discourse.nodered.org/t/simple-should-be-buffer-parser-question/61727 "2022-04-24T17:39:07Z")

</div>

Hi. I'm reading serial data and its a bunch of hex encoded numbers. For example I might get 30,44,30,33 which is 0x0D03 or 3,331. Seems like a simple matter for buffer parser but I cannot get it to work. My simple…

---

## [Sending simple text to Nextion Display](https://discourse.nodered.org/t/sending-simple-text-to-nextion-display/61713)

<div class="topic-metadata">

**Author:** [@robertebroomfield](https://discourse.nodered.org/u/robertebroomfield)\
**Replies:** 3\
**Last updated:** [24 April 2022 14:31 UTC](https://discourse.nodered.org/t/sending-simple-text-to-nextion-display/61713 "2022-04-24T14:31:30Z")

</div>

Hi All Im deeply frustrated with this. I'm trying to send text to a nextion display using serial. Inject node fires a function with this code msg.payload = 't0.txt="' + msg.payload + '"'; return msg; But alas thi…

---

## [Node-RED install on Ubuntu 22.04 (Jammy Jellyfish) - doesn't](https://discourse.nodered.org/t/node-red-install-on-ubuntu-22-04-jammy-jellyfish-doesnt/61716)

<div class="topic-metadata">

**Author:** [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Replies:** 3\
**Last updated:** [24 April 2022 13:15 UTC](https://discourse.nodered.org/t/node-red-install-on-ubuntu-22-04-jammy-jellyfish-doesnt/61716 "2022-04-24T13:15:14Z")

</div>

Hi at this time of writing (24th April 22) - the nodesource node.js install script does not yet support the latest Ubuntu LTS 22.04 Jammy distribution... This mean that our Node-RED install script will also (sort of) fa…

---

## [One Button Press, cycle through 3 Yeelight Colours](https://discourse.nodered.org/t/one-button-press-cycle-through-3-yeelight-colours/11607)

<div class="topic-metadata">

**Author:** [@brunoap](https://discourse.nodered.org/u/brunoap)\
**Replies:** 11\
**Last updated:** [24 April 2022 10:26 UTC](https://discourse.nodered.org/t/one-button-press-cycle-through-3-yeelight-colours/11607 "2022-04-24T10:26:17Z")

</div>

Hi. I have one RF Button that publishes the same payload on MQTT. How to make every button press, cycle an Yeelight through: White, Green, Purple, OFF and repeat... Input MQTT, example: home/OpenMQTTGateway/RFtoMQTT wi…

---

## [Code adds key:property to global varible](https://discourse.nodered.org/t/code-adds-key-property-to-global-varible/61707)

<div class="topic-metadata">

**Author:** [@homeplayer](https://discourse.nodered.org/u/homeplayer)\
**Replies:** 1\
**Last updated:** [24 April 2022 07:24 UTC](https://discourse.nodered.org/t/code-adds-key-property-to-global-varible/61707 "2022-04-24T07:24:19Z")

</div>

Please help me here why does obj.keys. --- item --- get created ? const obj = global.get("glue." + msg.name + "." + msg.action); // msg.action toggle has run for (var keys in obj) { msg = obj\[keys\]; msg.item = …

---

## [Using Prometheus out node for multiple values](https://discourse.nodered.org/t/using-prometheus-out-node-for-multiple-values/60214)

<div class="topic-metadata">

**Author:** [@astrojav](https://discourse.nodered.org/u/astrojav)\
**Replies:** 10\
**Last updated:** [24 April 2022 07:09 UTC](https://discourse.nodered.org/t/using-prometheus-out-node-for-multiple-values/60214 "2022-04-24T07:09:15Z")

</div>

Hi folks, I have sensor data from an ESP32 being sent to node-red through an MQTT broker. Out of the 38 values been sent from the ESP32, 6 of them will require to be sent to the Prometheus interface and then eventually…

---

## [How to change payload from , to . before sending it to a SQL db](https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698)

<div class="topic-metadata">

**Author:** [@JzzO](https://discourse.nodered.org/u/JzzO)\
**Replies:** 5\
**Last updated:** [23 April 2022 22:16 UTC](https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698 "2022-04-23T22:16:51Z")

</div>

Hi. maybe this has been answered before. I am using different nodes (ds18b20 and rpi-dht22) to get data from sensors. these come with eg. 21,22xxxx values - and when pasting the payload to a MSSQL-Plus node to save the…

---

## [SMA EV Charger get data using curl - how to do this in Node-RED #2?](https://discourse.nodered.org/t/sma-ev-charger-get-data-using-curl-how-to-do-this-in-node-red-2/61641)

<div class="topic-metadata">

**Author:** [@nosered1966](https://discourse.nodered.org/u/nosered1966)\
**Replies:** 10\
**Last updated:** [23 April 2022 21:18 UTC](https://discourse.nodered.org/t/sma-ev-charger-get-data-using-curl-how-to-do-this-in-node-red-2/61641 "2022-04-23T21:18:25Z")

</div>

@Steve-Mcl Hi Stephen, you helped me already a lot to solve this topic: SMA EV Charger get data using curl - how to this in Node-RED? But as I have already announced, I need some more help to read out more data/param…

---

## [Problem while depending of object length](https://discourse.nodered.org/t/problem-while-depending-of-object-length/61678)

<div class="topic-metadata">

**Author:** [@Licky](https://discourse.nodered.org/u/Licky)\
**Replies:** 5\
**Last updated:** [23 April 2022 16:28 UTC](https://discourse.nodered.org/t/problem-while-depending-of-object-length/61678 "2022-04-23T16:28:43Z")

</div>

Hello, i'm receiving data which change in every objects, i'd like to make a loop and send 60 differents msg if there's 60 objects for example. this is the code i've done, i managed to get the amount of objects by usin…

---

## [Send 1st msg, delay from value in context, send second msg](https://discourse.nodered.org/t/send-1st-msg-delay-from-value-in-context-send-second-msg/61688)

<div class="topic-metadata">

**Author:** [@JernejM1](https://discourse.nodered.org/u/JernejM1)\
**Replies:** 0\
**Last updated:** [23 April 2022 16:52 UTC](https://discourse.nodered.org/t/send-1st-msg-delay-from-value-in-context-send-second-msg/61688 "2022-04-23T16:52:30Z")

</div>

Hi all, I am new in visual or real programming, so while I learning java script, I would appreciate some help from your side. I need function node, which will say: send 1st message immediately when arrive to input t…

---

## [Calculate the seconds between two timestamps](https://discourse.nodered.org/t/calculate-the-seconds-between-two-timestamps/61677)

<div class="topic-metadata">

**Author:** [@node2](https://discourse.nodered.org/u/node2)\
**Replies:** 2\
**Last updated:** [23 April 2022 09:46 UTC](https://discourse.nodered.org/t/calculate-the-seconds-between-two-timestamps/61677 "2022-04-23T09:46:05Z")

</div>

i need a function to calculate the difference time in seconds between two clicks, On click and Off click :slight\_smile:

---

## [Calling a REST API from a Function Node](https://discourse.nodered.org/t/calling-a-rest-api-from-a-function-node/61537)

<div class="topic-metadata">

**Author:** [@csmale](https://discourse.nodered.org/u/csmale)\
**Replies:** 9\
**Last updated:** [23 April 2022 20:25 UTC](https://discourse.nodered.org/t/calling-a-rest-api-from-a-function-node/61537 "2022-04-23T20:25:47Z")

</div>

I want to make simple HTTP calls from within a function node. Ideally so I can do: a = get\_value(b); from my code. The function needs to call an external REST API to get the value. The function node needs to make mult…

---

## [Deploy keeps 'running' - NodeRed HomeAssistant](https://discourse.nodered.org/t/deploy-keeps-running-nodered-homeassistant/61611)

<div class="topic-metadata">

**Author:** [@Jroen85](https://discourse.nodered.org/u/Jroen85)\
**Replies:** 6\
**Last updated:** [23 April 2022 15:01 UTC](https://discourse.nodered.org/t/deploy-keeps-running-nodered-homeassistant/61611 "2022-04-23T15:01:29Z")

</div>

Hi All! I have been using NodeRed for a while but suddenly i'm unable to do deployments. After making desired changes to a flow and hitting the deploy button it keeps 'running' and nothing happens. Anyone who is able t…

---

## [Check your bin day (LEEDS ONLY!)](https://discourse.nodered.org/t/check-your-bin-day-leeds-only/61148)

<div class="topic-metadata">

**Author:** [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Replies:** 12\
**Last updated:** [23 April 2022 14:51 UTC](https://discourse.nodered.org/t/check-your-bin-day-leeds-only/61148 "2022-04-23T14:51:30Z")

</div>

@UnborN posted a similar solution to get this info from the Cardiff website. I have tried to use that as a guide to get the same for Leeds, but I'm not getting anywhere. https://www.leeds.gov.uk/residents/bins-and-recy…

---

## [Unable to view NR from ordinary browser window after browser crash](https://discourse.nodered.org/t/unable-to-view-nr-from-ordinary-browser-window-after-browser-crash/61647)

<div class="topic-metadata">

**Author:** [@JayNaire](https://discourse.nodered.org/u/JayNaire)\
**Replies:** 3\
**Last updated:** [23 April 2022 12:19 UTC](https://discourse.nodered.org/t/unable-to-view-nr-from-ordinary-browser-window-after-browser-crash/61647 "2022-04-23T12:19:45Z")

</div>

I can't load NR (from a local rpi server) in a Firefox standard window any more. It still loads fine in a Firefox Private Window or Chrome. The error\* I'm getting suggests corruption in Firefox profiles; ( FF crashed r…

---

## [Backup and Restore](https://discourse.nodered.org/t/backup-and-restore/61632)

<div class="topic-metadata">

**Author:** [@agmacedo](https://discourse.nodered.org/u/agmacedo)\
**Replies:** 7\
**Last updated:** [23 April 2022 11:51 UTC](https://discourse.nodered.org/t/backup-and-restore/61632 "2022-04-23T11:51:57Z")

</div>

I have a node-red application that has been growing for some time. It works on windows 10 and controls several PLCs on a industrial envinorment. I make daily backups of the all application (example: c:\\hmi\_1880), but w…

---

## [How UIBuilder can be integrated in to angular application](https://discourse.nodered.org/t/how-uibuilder-can-be-integrated-in-to-angular-application/61640)

<div class="topic-metadata">

**Author:** [@talha48](https://discourse.nodered.org/u/talha48)\
**Replies:** 7\
**Last updated:** [23 April 2022 11:40 UTC](https://discourse.nodered.org/t/how-uibuilder-can-be-integrated-in-to-angular-application/61640 "2022-04-23T11:40:00Z")

</div>

Hi, We want to integrate just uibuilder into anguler application, there users can create flows and import or export flow as json. I could not find any resources how it could be. Kindly help me. Thanks Mian Talha

---

## [Can we dynamically change the payload of the lora node?](https://discourse.nodered.org/t/can-we-dynamically-change-the-payload-of-the-lora-node/59584)

<div class="topic-metadata">

**Author:** [@hacj](https://discourse.nodered.org/u/hacj)\
**Replies:** 5\
**Last updated:** [23 April 2022 10:53 UTC](https://discourse.nodered.org/t/can-we-dynamically-change-the-payload-of-the-lora-node/59584 "2022-04-23T10:53:19Z")

</div>

Hello, I'm new in node-red and javascript. I created a flow for my project. I have a lorawan gateway. I can develop applications with node red on this gateway. But I'm stuck here. As it can be seen in the picture, I …

---

## [Looking for node - "time between messages"](https://discourse.nodered.org/t/looking-for-node-time-between-messages/61573)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 19\
**Last updated:** [23 April 2022 08:39 UTC](https://discourse.nodered.org/t/looking-for-node-time-between-messages/61573 "2022-04-23T08:39:53Z")

</div>

I shall try to search the library, but as I am not sure of the term to use, I'll ask here too. I am deubgging some stuff and need to find a nominal time for a message to go through the system. bunch of nodes. I am sure…

---

## [Html with javascript to show departure monitor](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933)

<div class="topic-metadata">

**Author:** [@Unglaublich](https://discourse.nodered.org/u/Unglaublich)\
**Replies:** 7\
**Last updated:** [23 April 2022 01:19 UTC](https://discourse.nodered.org/t/html-with-javascript-to-show-departure-monitor/59933 "2022-04-23T01:19:36Z")

</div>

Hello friends, i try to show a departure monitor but the dashboard is blank. Which is the best way, respectively node for showing data from a web service like this: \<div class="mvv-departure-monitor" monitor-configura…

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

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