# General

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

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

**Page:** 862

---

## [Can you not set context variables by assignment?](https://discourse.nodered.org/t/can-you-not-set-context-variables-by-assignment/13976)

<div class="topic-metadata">

**Author:** [@higbyk](https://discourse.nodered.org/u/higbyk)\
**Replies:** 2\
**Last updated:** [4 August 2019 13:57 UTC](https://discourse.nodered.org/t/can-you-not-set-context-variables-by-assignment/13976 "2019-08-04T13:57:42Z")

</div>

I'm using global context variables to store an authorization token, but I've noticed that the value doesn't appear in the context sidebar unless I assign it using a Change node. In the past I've simply assigned them as …

---

## [Multiple outputs of function node not working](https://discourse.nodered.org/t/multiple-outputs-of-function-node-not-working/13988)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 28\
**Last updated:** [4 August 2019 11:58 UTC](https://discourse.nodered.org/t/multiple-outputs-of-function-node-not-working/13988 "2019-08-04T11:58:04Z")

</div>

I've read my notes on how to construct nodes with multiple outputs, but it isn't working. The idea is that the input cycles from 0 to 3 (numbers). Depending on its value, depends which output is sent a 1. All values a…

---

## [Help with how to get info on USB stick](https://discourse.nodered.org/t/help-with-how-to-get-info-on-usb-stick/13773)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 37\
**Last updated:** [4 August 2019 06:23 UTC](https://discourse.nodered.org/t/help-with-how-to-get-info-on-usb-stick/13773 "2019-08-04T06:23:21Z")

</div>

I am using a USB stick to store data because I have been warned not to do this with the SD card, as this kind of writing to the card is not good for them. But either way, I am stuck getting how much memory is left on th…

---

## [Summing all msg.payload in a month](https://discourse.nodered.org/t/summing-all-msg-payload-in-a-month/13723)

<div class="topic-metadata">

**Author:** [@igrowing](https://discourse.nodered.org/u/igrowing)\
**Replies:** 14\
**Last updated:** [4 August 2019 05:53 UTC](https://discourse.nodered.org/t/summing-all-msg-payload-in-a-month/13723 "2019-08-04T05:53:46Z")

</div>

Hi guys, not sure "General" is correct forum branch, maybe "Dashboard" fits better for the question. I am building UI for She-bear - a monitor and sentinel of house water consumption. Of course, I'll post stable version…

---

## [Nuke it from orbit](https://discourse.nodered.org/t/nuke-it-from-orbit/13963)

<div class="topic-metadata">

**Author:** [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Replies:** 7\
**Last updated:** [3 August 2019 22:54 UTC](https://discourse.nodered.org/t/nuke-it-from-orbit/13963 "2019-08-03T22:54:10Z")

</div>

I'm having problems installing/upgrading Node-RED on an older PiZero (Stretch so not ancient) (Its in the endless loop of saying that its not fully installed and do I want to re-install) I've tried loads of things and …

---

## [Global.get() behavior: intended behavior or bug?](https://discourse.nodered.org/t/global-get-behavior-intended-behavior-or-bug/13971)

<div class="topic-metadata">

**Author:** [@thatcadguy](https://discourse.nodered.org/u/thatcadguy)\
**Replies:** 2\
**Last updated:** [3 August 2019 22:50 UTC](https://discourse.nodered.org/t/global-get-behavior-intended-behavior-or-bug/13971 "2019-08-03T22:50:07Z")

</div>

Noticed something peculiar while coding a project this week...some unexpected behavior that took me an embarrassingly long time to figure out. var a = global.get('this\_doesnt\_exist'); // returns null as it is doesn't ex…

---

## [Add entity value to a mqtt payload](https://discourse.nodered.org/t/add-entity-value-to-a-mqtt-payload/13955)

<div class="topic-metadata">

**Author:** [@LazzaWA](https://discourse.nodered.org/u/LazzaWA)\
**Replies:** 4\
**Last updated:** [3 August 2019 21:58 UTC](https://discourse.nodered.org/t/add-entity-value-to-a-mqtt-payload/13955 "2019-08-03T21:58:08Z")

</div>

hi all, i'm starting to get the hang of the basics of node red however i'm still fresh to understanding it so bare with me :slight\_smile: I'm trying to get my snips voice platform to tell me what the temperature is fro…

---

## [Node red + telegram](https://discourse.nodered.org/t/node-red-telegram/13966)

<div class="topic-metadata">

**Author:** [@fafidio](https://discourse.nodered.org/u/fafidio)\
**Replies:** 4\
**Last updated:** [3 August 2019 19:11 UTC](https://discourse.nodered.org/t/node-red-telegram/13966 "2019-08-03T19:11:46Z")

</div>

hello, i'm Fabio and would use node red for monitoring more sensors. I 'm not very clever with code so I ask your help. I've created a function to send values from sensor to Telegram : but my target is to have the notif…

---

## [Node-red-node-pi-gpiod true/false vs. 0/1](https://discourse.nodered.org/t/node-red-node-pi-gpiod-true-false-vs-0-1/13941)

<div class="topic-metadata">

**Author:** [@kxkayser](https://discourse.nodered.org/u/kxkayser)\
**Replies:** 12\
**Last updated:** [3 August 2019 14:02 UTC](https://discourse.nodered.org/t/node-red-node-pi-gpiod-true-false-vs-0-1/13941 "2019-08-03T14:02:13Z")

</div>

Hi. Am successfully using the these nodes to control a remote RPi. I noticed that injecting a Boolean true or false raises an Assertion error. Works fine with a numeric 0 or 1. Is this part of the design?

---

## [HTTP Request overload per flow?](https://discourse.nodered.org/t/http-request-overload-per-flow/13951)

<div class="topic-metadata">

**Author:** [@OliP](https://discourse.nodered.org/u/OliP)\
**Replies:** 2\
**Last updated:** [3 August 2019 13:51 UTC](https://discourse.nodered.org/t/http-request-overload-per-flow/13951 "2019-08-03T13:51:24Z")

</div>

Hey, first post and only about a week into the node-red rabbit hole. Managed to get my head around building an API of sorts, which allows my homeseer home automation system to trigger node-red to download an image from …

---

## [Workspace background color](https://discourse.nodered.org/t/workspace-background-color/13912)

<div class="topic-metadata">

**Author:** [@greenembrace](https://discourse.nodered.org/u/greenembrace)\
**Replies:** 3\
**Last updated:** [3 August 2019 03:40 UTC](https://discourse.nodered.org/t/workspace-background-color/13912 "2019-08-03T03:40:43Z")

</div>

Hi, I'm sure someone has asked this, but unable to find anything: How to change the background color of the workspace, (not the dashboard) the editor area. I find the white to bright late at night. cheers daniel

---

## [Sending an API Key as a Header (Calling REST)](https://discourse.nodered.org/t/sending-an-api-key-as-a-header-calling-rest/13943)

<div class="topic-metadata">

**Author:** [@leftShark2019](https://discourse.nodered.org/u/leftShark2019)\
**Replies:** 6\
**Last updated:** [2 August 2019 22:53 UTC](https://discourse.nodered.org/t/sending-an-api-key-as-a-header-calling-rest/13943 "2019-08-02T22:53:32Z")

</div>

Hello, I've read this https://discourse.nodered.org/t/calling-rest-api/1089 and know that to query an API requires an inject, change, http request, and debug node. I'm trying to send a GET request to this API, but to …

---

## [Function Arrays from Database](https://discourse.nodered.org/t/function-arrays-from-database/13949)

<div class="topic-metadata">

**Author:** [@biz](https://discourse.nodered.org/u/biz)\
**Replies:** 3\
**Last updated:** [2 August 2019 21:50 UTC](https://discourse.nodered.org/t/function-arrays-from-database/13949 "2019-08-02T21:50:23Z")

</div>

Hello All I am having a bit of trouble with some arrays within a function node. Currently I have a mysql database that returns the last 7 days worth of data. It returns it all within an array. See here After it retur…

---

## [Permission error Copying or Writing to a file in Fileshare remote folder](https://discourse.nodered.org/t/permission-error-copying-or-writing-to-a-file-in-fileshare-remote-folder/13874)

<div class="topic-metadata">

**Author:** [@KevinPamu](https://discourse.nodered.org/u/KevinPamu)\
**Replies:** 13\
**Last updated:** [2 August 2019 16:17 UTC](https://discourse.nodered.org/t/permission-error-copying-or-writing-to-a-file-in-fileshare-remote-folder/13874 "2019-08-02T16:17:42Z")

</div>

This could be a really simple thing I am missing, I am trying to write to a file or copy a file to a remote file share location. I get a permission error when I try to do so. I am not sure what I should be giving permis…

---

## [Sensor log data to Mysql](https://discourse.nodered.org/t/sensor-log-data-to-mysql/13720)

<div class="topic-metadata">

**Author:** [@dksmar](https://discourse.nodered.org/u/dksmar)\
**Replies:** 19\
**Last updated:** [2 August 2019 14:09 UTC](https://discourse.nodered.org/t/sensor-log-data-to-mysql/13720 "2019-08-02T14:09:37Z")

</div>

Good day to all I am new to Nodered and would appreciate some help on the below: I have some soil moisture and temperature sensors that send via MQTT their data and I want to log them in MYSQL. Till now i can plot the …

---

## [Node-RED-Nodes Code](https://discourse.nodered.org/t/node-red-nodes-code/13923)

<div class="topic-metadata">

**Author:** [@bobbyB](https://discourse.nodered.org/u/bobbyB)\
**Replies:** 2\
**Last updated:** [2 August 2019 10:28 UTC](https://discourse.nodered.org/t/node-red-nodes-code/13923 "2019-08-02T10:28:45Z")

</div>

Hey, I was wondering if someone can tell me where i can find the .js and .html files of the standard node-red nodes. Thanks in advance

---

## [Custom Authentication](https://discourse.nodered.org/t/custom-authentication/13919)

<div class="topic-metadata">

**Author:** [@lastm4n](https://discourse.nodered.org/u/lastm4n)\
**Replies:** 0\
**Last updated:** [2 August 2019 08:03 UTC](https://discourse.nodered.org/t/custom-authentication/13919 "2019-08-02T08:03:55Z")

</div>

Hi node-RED community, I would like to develop a custom authentication. The authentication will be a Post Http Request with some form-urlencoded parameters in order to identify the user and then to continue the flow to…

---

## [Calculate the mean of data pairs in an Object](https://discourse.nodered.org/t/calculate-the-mean-of-data-pairs-in-an-object/13890)

<div class="topic-metadata">

**Author:** [@ptamike](https://discourse.nodered.org/u/ptamike)\
**Replies:** 5\
**Last updated:** [2 August 2019 04:54 UTC](https://discourse.nodered.org/t/calculate-the-mean-of-data-pairs-in-an-object/13890 "2019-08-02T04:54:57Z")

</div>

I'm creating a flow to monitor signal levels on a selected radio frequency. The main component is the rtl-power node and this produces output in the format shown at the end of this post. In order to cope with slightly o…

---

## [Stateless Button intergration, MQTT, OpenHab, Node RED](https://discourse.nodered.org/t/stateless-button-intergration-mqtt-openhab-node-red/13914)

<div class="topic-metadata">

**Author:** [@Bedrock](https://discourse.nodered.org/u/Bedrock)\
**Replies:** 0\
**Last updated:** [2 August 2019 04:35 UTC](https://discourse.nodered.org/t/stateless-button-intergration-mqtt-openhab-node-red/13914 "2019-08-02T04:35:54Z")

</div>

Hi guys, i have an arduino button that reports to MQTT in a stateless form of 20-41 for example How could i take this and check the current state of the switch in openhab and and do the opposite. so if light is on turn…

---

## [BigFile Start option](https://discourse.nodered.org/t/bigfile-start-option/13909)

<div class="topic-metadata">

**Author:** [@saramcc](https://discourse.nodered.org/u/saramcc)\
**Replies:** 5\
**Last updated:** [1 August 2019 22:31 UTC](https://discourse.nodered.org/t/bigfile-start-option/13909 "2019-08-01T22:31:32Z")

</div>

Has anyone used the BigFile module (node-red-contrib-bigfile)? And, if so, do you know how to set the start and end options in order to read a range of the file instead of the entire file? I'm passing in a message with…

---

## [How to convert a 16-bit variable to 64-bit](https://discourse.nodered.org/t/how-to-convert-a-16-bit-variable-to-64-bit/13902)

<div class="topic-metadata">

**Author:** [@eduardotodero](https://discourse.nodered.org/u/eduardotodero)\
**Replies:** 1\
**Last updated:** [1 August 2019 18:59 UTC](https://discourse.nodered.org/t/how-to-convert-a-16-bit-variable-to-64-bit/13902 "2019-08-01T18:59:07Z")

</div>

Hello everyone, I am reading registers from a Siemens PAC2200 64 bit, how do I display this value correctly by node red? I need to join the 4-number vector to just one string. Thank you very much

---

## [I need to separate the values from a group](https://discourse.nodered.org/t/i-need-to-separate-the-values-from-a-group/13886)

<div class="topic-metadata">

**Author:** [@alvinstewart](https://discourse.nodered.org/u/alvinstewart)\
**Replies:** 3\
**Last updated:** [1 August 2019 14:09 UTC](https://discourse.nodered.org/t/i-need-to-separate-the-values-from-a-group/13886 "2019-08-01T14:09:05Z")

</div>

I hate having to ask for help when I should be able to make it happen on my own. However, below is an output from my weather station API. This came out of a HTTP Request node. I x'ed out the MAC address. I would like to …

---

## [Set Response header for HTTP Request](https://discourse.nodered.org/t/set-response-header-for-http-request/13887)

<div class="topic-metadata">

**Author:** [@Devbrat](https://discourse.nodered.org/u/Devbrat)\
**Replies:** 5\
**Last updated:** [1 August 2019 13:42 UTC](https://discourse.nodered.org/t/set-response-header-for-http-request/13887 "2019-08-01T13:42:12Z")

</div>

I am trying to send response header in all HTTP request: I tried two way: First by adding below code in settings.js httpNodeMiddleware: function(req,res,next) { res.header("X-Frame-Options", "SAMEORIGIN"); …

---

## [Two USB camera access by node-red](https://discourse.nodered.org/t/two-usb-camera-access-by-node-red/6686)

<div class="topic-metadata">

**Author:** [@gotonodered](https://discourse.nodered.org/u/gotonodered)\
**Replies:** 1\
**Last updated:** [1 August 2019 12:48 UTC](https://discourse.nodered.org/t/two-usb-camera-access-by-node-red/6686 "2019-08-01T12:48:01Z")

</div>

Hi , Anyone try to connect the two or more USB camera with Node-RED? I try with usbcamera node. But only able to access one camera. Thanks

---

## [Dynamic ip on eth0:0?](https://discourse.nodered.org/t/dynamic-ip-on-eth0-0/13894)

<div class="topic-metadata">

**Author:** [@robertocanton](https://discourse.nodered.org/u/robertocanton)\
**Replies:** 4\
**Last updated:** [1 August 2019 09:25 UTC](https://discourse.nodered.org/t/dynamic-ip-on-eth0-0/13894 "2019-08-01T09:25:15Z")

</div>

Hi, i need to switch from dashboard my eth connection from static ip to dynamic ip. I guess i've to setting up my dhcpcd.conf and then using ifup ifdown to switch the mode. ok. for static ip i wrote the following lines…

---

## [Adding a counter](https://discourse.nodered.org/t/adding-a-counter/13892)

<div class="topic-metadata">

**Author:** [@pinkdolphins](https://discourse.nodered.org/u/pinkdolphins)\
**Replies:** 1\
**Last updated:** [1 August 2019 08:21 UTC](https://discourse.nodered.org/t/adding-a-counter/13892 "2019-08-01T08:21:58Z")

</div>

Hello! I am trying to add a counter to my node-red process. I would like it to add one to the counter every time that the whole process runs once. This is because I am accumulating a math value until a certain counter …

---

## [Adding time to my state machine](https://discourse.nodered.org/t/adding-time-to-my-state-machine/13884)

<div class="topic-metadata">

**Author:** [@pinkdolphins](https://discourse.nodered.org/u/pinkdolphins)\
**Replies:** 1\
**Last updated:** [31 July 2019 23:18 UTC](https://discourse.nodered.org/t/adding-time-to-my-state-machine/13884 "2019-07-31T23:18:39Z")

</div>

Hello! I am trying to build a state machine in node red, but the problem is that it keeps going back to 0 before it gets to states 2 and 3. I have implemented it all in one function. I have been trying to add some time …

---

## [Why am I getting this as an error](https://discourse.nodered.org/t/why-am-i-getting-this-as-an-error/13881)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 2\
**Last updated:** [31 July 2019 22:06 UTC](https://discourse.nodered.org/t/why-am-i-getting-this-as-an-error/13881 "2019-07-31T22:06:18Z")

</div>

I have a flow to catch errors. This morning I saw there were a few. Yes, something was happening, but why I got this error is confusing. {"delay":"18000","payload":"2019-8-1 07:39:18 up 27 minutes\\n","\_msgid":"a9dafd…

---

## [Is Node-Red Cookbook downloadable for offline?](https://discourse.nodered.org/t/is-node-red-cookbook-downloadable-for-offline/13880)

<div class="topic-metadata">

**Author:** [@Cathprotech](https://discourse.nodered.org/u/Cathprotech)\
**Replies:** 5\
**Last updated:** [31 July 2019 22:02 UTC](https://discourse.nodered.org/t/is-node-red-cookbook-downloadable-for-offline/13880 "2019-07-31T22:02:12Z")

</div>

Hi, I just came across the Node-Red Cookbook by reading a post somewhere on the forum. Is it downloadable so I can read it off-line or is there a .pdf available. I'm at work on a ship and don't have continuous interne…

---

## [Tcp Input Module Multiple Ports](https://discourse.nodered.org/t/tcp-input-module-multiple-ports/13878)

<div class="topic-metadata">

**Author:** [@saramcc](https://discourse.nodered.org/u/saramcc)\
**Replies:** 0\
**Last updated:** [31 July 2019 21:11 UTC](https://discourse.nodered.org/t/tcp-input-module-multiple-ports/13878 "2019-07-31T21:11:33Z")

</div>

The Tcp Input module has a parameter for a single port. Does anyone know of a tcp input module that will allow setting multiple ports or a range of ports for tcp to listen on? Or when you start node-red, is there a way…

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

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