# General

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

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

**Page:** 677

---

## [Editor - project mode - package.json](https://discourse.nodered.org/t/editor-project-mode-package-json/33556)

<div class="topic-metadata">

**Author:** [@rogerjames99](https://discourse.nodered.org/u/rogerjames99)\
**Replies:** 2\
**Last updated:** [30 September 2020 12:12 UTC](https://discourse.nodered.org/t/editor-project-mode-package-json/33556 "2020-09-30T12:12:03Z")

</div>

When running in projects mode a node-red object is added to package.json. "node-red": { "settings": { "flowFile": "mtr-dashboard-flow.json", "credentialsFile": "mtr-dashboard-flow\_cred.json" } } Wha…

---

## [Can to create database using node-red?](https://discourse.nodered.org/t/can-to-create-database-using-node-red/33528)

<div class="topic-metadata">

**Author:** [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Replies:** 7\
**Last updated:** [30 September 2020 08:46 UTC](https://discourse.nodered.org/t/can-to-create-database-using-node-red/33528 "2020-09-30T08:46:42Z")

</div>

Hi, I would like to create database of PostgreSQL using Node-RED, but when searching with "postgre" keyword, all nodes need to configure database name. I tried to use the exec node but don't know what the input command…

---

## [Delay - wait in loop/function](https://discourse.nodered.org/t/delay-wait-in-loop-function/33508)

<div class="topic-metadata">

**Author:** [@RogierQ](https://discourse.nodered.org/u/RogierQ)\
**Replies:** 11\
**Last updated:** [30 September 2020 06:28 UTC](https://discourse.nodered.org/t/delay-wait-in-loop-function/33508 "2020-09-30T06:28:35Z")

</div>

Hi! I need to make a slot machine effect So a running light over 4 outputs the goes slower and slower I thought to do this in a loop but i cannot get the delay working. for example i did this: msg.payload = "test1" …

---

## [Help with reading any context value and the "check not null" option](https://discourse.nodered.org/t/help-with-reading-any-context-value-and-the-check-not-null-option/33484)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 7\
**Last updated:** [30 September 2020 06:22 UTC](https://discourse.nodered.org/t/help-with-reading-any-context-value-and-the-check-not-null-option/33484 "2020-09-30T06:22:56Z")

</div>

I just wasted about 45 minutes on a stupid mistake - again. So, I am reading a context value, and need it to be something rather than undefined. If it is a number, the option is something like: let x = context.get("bl…

---

## [Modbus query SMA Inverter - the right way](https://discourse.nodered.org/t/modbus-query-sma-inverter-the-right-way/33400)

<div class="topic-metadata">

**Author:** [@Becker](https://discourse.nodered.org/u/Becker)\
**Replies:** 33\
**Last updated:** [30 September 2020 06:13 UTC](https://discourse.nodered.org/t/modbus-query-sma-inverter-the-right-way/33400 "2020-09-30T06:13:17Z")

</div>

Hi, this is the continuation of https://discourse.nodered.org/t/adding-two-values/32784/70 thank you @Steve-Mcl and @UnborN for your help so far ! First a make a overview of my registers: I need help: How can I "D…

---

## [Text wraps in Form node Checkbox element](https://discourse.nodered.org/t/text-wraps-in-form-node-checkbox-element/31392)

<div class="topic-metadata">

**Author:** [@notnice](https://discourse.nodered.org/u/notnice)\
**Replies:** 9\
**Last updated:** [30 September 2020 05:44 UTC](https://discourse.nodered.org/t/text-wraps-in-form-node-checkbox-element/31392 "2020-09-30T05:44:43Z")

</div>

When I add a Form node with a Switch element it looks normal on single line: However, when I change it to Checkbox it wraps the line after each word of text: I cleared the text and re-entered it, and tried moving t…

---

## [Goal - export flows plus associated bits](https://discourse.nodered.org/t/goal-export-flows-plus-associated-bits/33402)

<div class="topic-metadata">

**Author:** [@christl](https://discourse.nodered.org/u/christl)\
**Replies:** 6\
**Last updated:** [30 September 2020 00:52 UTC](https://discourse.nodered.org/t/goal-export-flows-plus-associated-bits/33402 "2020-09-30T00:52:59Z")

</div>

... associated bits like config nodes (and credentials), plus sub-flows, plus packages, etc. First I thought I should learn how to use the API and build some routines to go through a given flow and identify config nodes…

---

## [Does a Drum Encoder exist, or Barrel Encoder?](https://discourse.nodered.org/t/does-a-drum-encoder-exist-or-barrel-encoder/33531)

<div class="topic-metadata">

**Author:** [@Alacritous](https://discourse.nodered.org/u/Alacritous)\
**Replies:** 0\
**Last updated:** [29 September 2020 23:46 UTC](https://discourse.nodered.org/t/does-a-drum-encoder-exist-or-barrel-encoder/33531 "2020-09-29T23:46:23Z")

</div>

Was just wondering has anyone made a drum encoder for NR yet? I don't need one. I'm just curious if it's a thing. I used to do ladder logic programming(PTOOEY!!) and the one I used had a drum encoder built into the fun…

---

## [Sound Bar specific volume control help request](https://discourse.nodered.org/t/sound-bar-specific-volume-control-help-request/33486)

<div class="topic-metadata">

**Author:** [@tmichaeltx](https://discourse.nodered.org/u/tmichaeltx)\
**Replies:** 8\
**Last updated:** [29 September 2020 23:39 UTC](https://discourse.nodered.org/t/sound-bar-specific-volume-control-help-request/33486 "2020-09-29T23:39:38Z")

</div>

I am doing a lot smart home control via NR. The most frustrating problem I have is the inability to have definite volume control of my sound bar. I generally use a hoarmony hub/remote. The remote can do volume up and dow…

---

## [Get and Alexa list event only](https://discourse.nodered.org/t/get-and-alexa-list-event-only/33519)

<div class="topic-metadata">

**Author:** [@wecoyote5](https://discourse.nodered.org/u/wecoyote5)\
**Replies:** 2\
**Last updated:** [29 September 2020 20:38 UTC](https://discourse.nodered.org/t/get-and-alexa-list-event-only/33519 "2020-09-29T20:38:47Z")

</div>

Hi all, I've been using Alexa Remote2 for a lot of things but can't find a solution for this one... Is there a way to only get a shopping list event from Alexa? i.e. Whenever Alexa's shopping list is altered an event fir…

---

## [Error when using Google Calendar v3 API](https://discourse.nodered.org/t/error-when-using-google-calendar-v3-api/33054)

<div class="topic-metadata">

**Author:** [@phreaq](https://discourse.nodered.org/u/phreaq)\
**Replies:** 4\
**Last updated:** [29 September 2020 19:06 UTC](https://discourse.nodered.org/t/error-when-using-google-calendar-v3-api/33054 "2020-09-29T19:06:42Z")

</div>

I'm getting a "Error: Bad Request" error when checking the Google Calendar API. I have a working setup, and a broken one, although I don't know where the issue is. My working setup pulls the next 2 events: msg.payload…

---

## [Deploy too long](https://discourse.nodered.org/t/deploy-too-long/19140)

<div class="topic-metadata">

**Author:** [@ramon2k10](https://discourse.nodered.org/u/ramon2k10)\
**Replies:** 8\
**Last updated:** [29 September 2020 16:33 UTC](https://discourse.nodered.org/t/deploy-too-long/19140 "2020-09-29T16:33:46Z")

</div>

Hi since a few months when I deploy a flows it takes too long, about 25 secs. Does anybody know what could be the reason?

---

## [How to access msg content and use "if"](https://discourse.nodered.org/t/how-to-access-msg-content-and-use-if/33475)

<div class="topic-metadata">

**Author:** [@loeten](https://discourse.nodered.org/u/loeten)\
**Replies:** 8\
**Last updated:** [29 September 2020 14:41 UTC](https://discourse.nodered.org/t/how-to-access-msg-content-and-use-if/33475 "2020-09-29T14:41:54Z")

</div>

Hi there, I did not find a proper tutorial for this yet: I have an IR sensor that gives this json via MQTT: zigbee2mqtt/IrSensor : msg.payload : string\[104\] "{"battery":100,"illuminance":26,"illuminance\_lux":26,"linkqu…

---

## [Xml node. remove declaration](https://discourse.nodered.org/t/xml-node-remove-declaration/33490)

<div class="topic-metadata">

**Author:** [@crester](https://discourse.nodered.org/u/crester)\
**Replies:** 3\
**Last updated:** [29 September 2020 12:23 UTC](https://discourse.nodered.org/t/xml-node-remove-declaration/33490 "2020-09-29T12:23:15Z")

</div>

Hello could be possible to remove the xml declaration to the output of the xml node? "\<?xml version="1.0" encoding="UTF-8" standalone="yes"?\> or perhaps a simple way to do this? Thank you

---

## [HTTP requests and functions](https://discourse.nodered.org/t/http-requests-and-functions/33494)

<div class="topic-metadata">

**Author:** [@chloroquine](https://discourse.nodered.org/u/chloroquine)\
**Replies:** 3\
**Last updated:** [29 September 2020 08:53 UTC](https://discourse.nodered.org/t/http-requests-and-functions/33494 "2020-09-29T08:53:26Z")

</div>

Hello! I use the following code inside a function: var url = msg.payload.url; var urlEncoded = encodeURIComponent(url); var requestUrl = 'https://opengraph.io/api/1.1/site/' + urlEncoded + '?accept\_lang=auto&cache\_ok=f…

---

## [Controlling Smart Ikea Blinds via NR](https://discourse.nodered.org/t/controlling-smart-ikea-blinds-via-nr/33479)

<div class="topic-metadata">

**Author:** [@terminus](https://discourse.nodered.org/u/terminus)\
**Replies:** 0\
**Last updated:** [28 September 2020 21:53 UTC](https://discourse.nodered.org/t/controlling-smart-ikea-blinds-via-nr/33479 "2020-09-28T21:53:39Z")

</div>

Hi folks, I bought a IKEA Tradfri Fyrtur blackout blind recently. I'm running HASS.IO and access the blind via deConz software. Im curious how I can implement the shutter in my NR Automations. For example: I have the u…

---

## [Pulse output dynamic time for relais](https://discourse.nodered.org/t/pulse-output-dynamic-time-for-relais/33467)

<div class="topic-metadata">

**Author:** [@Jurg1505](https://discourse.nodered.org/u/Jurg1505)\
**Replies:** 2\
**Last updated:** [28 September 2020 19:18 UTC](https://discourse.nodered.org/t/pulse-output-dynamic-time-for-relais/33467 "2020-09-28T19:18:22Z")

</div>

Hello, How to make a pulse output where the 1 time is 250 milli seconds and the 0 time is dynamic. The 0 time can variate from 0.75 seconds to 5 seconds. The output is for a diaphragm pump. Or set the frequency on…

---

## [Divide 2 values in a function](https://discourse.nodered.org/t/divide-2-values-in-a-function/33443)

<div class="topic-metadata">

**Author:** [@Jurg1505](https://discourse.nodered.org/u/Jurg1505)\
**Replies:** 2\
**Last updated:** [28 September 2020 18:29 UTC](https://discourse.nodered.org/t/divide-2-values-in-a-function/33443 "2020-09-28T18:29:53Z")

</div>

How can i divide 2 values in a function ? var Fan = context.get('Fan') || 0; // Value 0 - 100 step 5 var Pomp = context.get('Pomp') || 0; // Value 1 - 10 step 0.1 if (msg.topic == 'Fan') { Fan = {payload: msg.paylo…

---

## [Calculate precentage](https://discourse.nodered.org/t/calculate-precentage/33446)

<div class="topic-metadata">

**Author:** [@dowermyr](https://discourse.nodered.org/u/dowermyr)\
**Replies:** 4\
**Last updated:** [28 September 2020 17:58 UTC](https://discourse.nodered.org/t/calculate-precentage/33446 "2020-09-28T17:58:43Z")

</div>

Hi! I wan't to calculate the precentage between two msg.payload numbers. If i use the join node, I can join the two to an array, but then I am lost :slight\_smile: Often, the values are lik 0.75 and 0.18 How do I get …

---

## [Interesting Mqtt Issue](https://discourse.nodered.org/t/interesting-mqtt-issue/33466)

<div class="topic-metadata">

**Author:** [@NC16](https://discourse.nodered.org/u/NC16)\
**Replies:** 2\
**Last updated:** [28 September 2020 17:52 UTC](https://discourse.nodered.org/t/interesting-mqtt-issue/33466 "2020-09-28T17:52:28Z")

</div>

Hello, So I'm having a somewhat weird issue that I was looking to get some light shed upon. Background: I'm using roughly 50 MQTT output nodes that I would like to keep generic. Instead of changing them each individual…

---

## [Serial communication problem](https://discourse.nodered.org/t/serial-communication-problem/33407)

<div class="topic-metadata">

**Author:** [@jw\_te\_r](https://discourse.nodered.org/u/jw_te_r)\
**Replies:** 9\
**Last updated:** [28 September 2020 17:27 UTC](https://discourse.nodered.org/t/serial-communication-problem/33407 "2020-09-28T17:27:15Z")

</div>

I'm using Node-Red to connect a laptop to a Mitsubishi Alpha-2 microcontroller via an usb-serial cable. The communication doesn't start immediately when I fire up my laptop. Initially I suspected a permissions issue in…

---

## [Issue with GIT repository using ssh-keys](https://discourse.nodered.org/t/issue-with-git-repository-using-ssh-keys/33030)

<div class="topic-metadata">

**Author:** [@crackytsi](https://discourse.nodered.org/u/crackytsi)\
**Replies:** 6\
**Last updated:** [28 September 2020 15:03 UTC](https://discourse.nodered.org/t/issue-with-git-repository-using-ssh-keys/33030 "2020-09-28T15:03:48Z")

</div>

Hi, I'm stuck integrating a GIT repository using ssh-keys. I have the NodeRed 1.1.3 (latest now) and a gitea Installation 1.12.4 (latest now) When I try to clone a repo from the GIT server it failes. I'm using the G…

---

## [JSON to XML. xml truncated](https://discourse.nodered.org/t/json-to-xml-xml-truncated/33448)

<div class="topic-metadata">

**Author:** [@crester](https://discourse.nodered.org/u/crester)\
**Replies:** 2\
**Last updated:** [28 September 2020 14:34 UTC](https://discourse.nodered.org/t/json-to-xml-xml-truncated/33448 "2020-09-28T14:34:36Z")

</div>

Hello I am trying to convert a JSON string to XML but it doesn't work I haven't good knowledge of JSON nor XML but when I parse this string, the XML truncates at last and I am unable to find out what is the problem S…

---

## [Checking multiple String/numbers in if-statement](https://discourse.nodered.org/t/checking-multiple-string-numbers-in-if-statement/33445)

<div class="topic-metadata">

**Author:** [@ZsomborPiros](https://discourse.nodered.org/u/ZsomborPiros)\
**Replies:** 4\
**Last updated:** [28 September 2020 12:38 UTC](https://discourse.nodered.org/t/checking-multiple-string-numbers-in-if-statement/33445 "2020-09-28T12:38:41Z")

</div>

Hi. Im struggling since over 1 day with my if statements. i tried anything i know from java but it doesn´t works please help me. Here´s my function node: var valueFromTrigger1 = parseInt(msg.payload.Trig0); var valueFr…

---

## [Grief with the switch node](https://discourse.nodered.org/t/grief-with-the-switch-node/33442)

<div class="topic-metadata">

**Author:** [@little\_rich](https://discourse.nodered.org/u/little_rich)\
**Replies:** 4\
**Last updated:** [28 September 2020 12:23 UTC](https://discourse.nodered.org/t/grief-with-the-switch-node/33442 "2020-09-28T12:23:25Z")

</div>

Hi, I have some data feeding into the switch node which is in this format msg.payload.rows\[0\].current\_price msg.payload.rows\[0\].ref\_price msg.payload.rows\[0\].quantity I am trying to use the switch command to filter …

---

## [InfluxDB errors - q-gate and check InfluxDB write is completed OK](https://discourse.nodered.org/t/influxdb-errors-q-gate-and-check-influxdb-write-is-completed-ok/33283)

<div class="topic-metadata">

**Author:** [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Replies:** 7\
**Last updated:** [28 September 2020 12:02 UTC](https://discourse.nodered.org/t/influxdb-errors-q-gate-and-check-influxdb-write-is-completed-ok/33283 "2020-09-28T12:02:42Z")

</div>

Hi, I am looking for some pointers if possible please. As my Home Control flow application has got more complicated, I am suffering more and more from errors with InfluxDB. \[error\] \[influxdb in:bf343c7a.e41d4\] Error: …

---

## [Access-Control-Allow-Origin](https://discourse.nodered.org/t/access-control-allow-origin/32984)

<div class="topic-metadata">

**Author:** [@Devbrat](https://discourse.nodered.org/u/Devbrat)\
**Replies:** 8\
**Last updated:** [28 September 2020 10:14 UTC](https://discourse.nodered.org/t/access-control-allow-origin/32984 "2020-09-28T10:14:37Z")

</div>

I have added below code in RED.js to enables header for Node-RED. But Access-Control-Allow-Origin header is not coming as http://google.com/ . its coming as \*. Other headers are reflecting in node-red. app.use(function…

---

## [Doorbell via google assistent](https://discourse.nodered.org/t/doorbell-via-google-assistent/32637)

<div class="topic-metadata">

**Author:** [@KoenH](https://discourse.nodered.org/u/KoenH)\
**Replies:** 2\
**Last updated:** [28 September 2020 08:24 UTC](https://discourse.nodered.org/t/doorbell-via-google-assistent/32637 "2020-09-28T08:24:29Z")

</div>

hello all, I want to purchase a video doorbell, that i want to couple to my domotic system. I already have a NodeRed in the system, that is working well. I see a lot of doorbells having a google assistent interface. …

---

## [Node-red Status Indicator not updating after deploy](https://discourse.nodered.org/t/node-red-status-indicator-not-updating-after-deploy/33413)

<div class="topic-metadata">

**Author:** [@rholmesa](https://discourse.nodered.org/u/rholmesa)\
**Replies:** 3\
**Last updated:** [28 September 2020 07:33 UTC](https://discourse.nodered.org/t/node-red-status-indicator-not-updating-after-deploy/33413 "2020-09-28T07:33:41Z")

</div>

I have a newly created RasPi on Raspian running the latest version of Node-Red and Mosquitto - all freshly installed. Everything is operating fine BUT ... When I deploy a change, the status indicators on the MQTT nodes…

---

## [How to create an unique node ID](https://discourse.nodered.org/t/how-to-create-an-unique-node-id/33434)

<div class="topic-metadata">

**Author:** [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Replies:** 4\
**Last updated:** [28 September 2020 07:31 UTC](https://discourse.nodered.org/t/how-to-create-an-unique-node-id/33434 "2020-09-28T07:31:00Z")

</div>

Hi, I create a flow ＞ export to json file. Then import this flow on another PC and the node id is changed. How do I make the node id unique when creating a flow, immutable when importing flow on another PC? Thanks…

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

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