# General

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

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

**Page:** 536

---

## [Write variables in MSSQL](https://discourse.nodered.org/t/write-variables-in-mssql/47372)

<div class="topic-metadata">

**Author:** [@wagullo](https://discourse.nodered.org/u/wagullo)\
**Replies:** 4\
**Last updated:** [20 June 2021 12:34 UTC](https://discourse.nodered.org/t/write-variables-in-mssql/47372 "2021-06-20T12:34:52Z")

</div>

Hi, I'm new to the forum and to this Node-red, I am creating a flow that writes me 2 variables (one from the PLC and another given in node red) in a MSSQL database. I have a problem when defining the given variable in n…

---

## [Finding devices connected t a router using node red](https://discourse.nodered.org/t/finding-devices-connected-t-a-router-using-node-red/47388)

<div class="topic-metadata">

**Author:** [@Faizan123](https://discourse.nodered.org/u/Faizan123)\
**Replies:** 10\
**Last updated:** [20 June 2021 12:18 UTC](https://discourse.nodered.org/t/finding-devices-connected-t-a-router-using-node-red/47388 "2021-06-20T12:18:33Z")

</div>

Hi, I am new on this forum and on Node red platform. I am looking for a node which can find out number of devices connected to the a specific router or network. Basically, I want to determine the number of occupants in …

---

## [Function node, payload change text](https://discourse.nodered.org/t/function-node-payload-change-text/47337)

<div class="topic-metadata">

**Author:** [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Replies:** 7\
**Last updated:** [20 June 2021 09:27 UTC](https://discourse.nodered.org/t/function-node-payload-change-text/47337 "2021-06-20T09:27:18Z")

</div>

Hello i have a function node writing msg.payload = { status: msg.payload.crc\_error } return msg; the Output if error, is then status: false is there a way to on the fly msg.payload.crc\_error if false write "CRC …

---

## [Can not save changes in inject node with repeat option](https://discourse.nodered.org/t/can-not-save-changes-in-inject-node-with-repeat-option/47376)

<div class="topic-metadata">

**Author:** [@riker65](https://discourse.nodered.org/u/riker65)\
**Replies:** 15\
**Last updated:** [20 June 2021 08:23 UTC](https://discourse.nodered.org/t/can-not-save-changes-in-inject-node-with-repeat-option/47376 "2021-06-20T08:23:45Z")

</div>

Hi can not save inject node with repeat option. After setting the option at specific time, saving it. Reopening it, changes are not saved. What did I miss? aqnyone having similar issue? Do not see an error message.,…

---

## [MQTT OUT (IN) Diagnosis of connection + Client ID](https://discourse.nodered.org/t/mqtt-out-in-diagnosis-of-connection-client-id/47284)

<div class="topic-metadata">

**Author:** [@lostbits](https://discourse.nodered.org/u/lostbits)\
**Replies:** 9\
**Last updated:** [20 June 2021 07:10 UTC](https://discourse.nodered.org/t/mqtt-out-in-diagnosis-of-connection-client-id/47284 "2021-06-20T07:10:42Z")

</div>

Hi, Node RED v1.3.5 I am using the MQTT IN and OUT nodes for different tasks. The most complicated thing is to identify, why a node can't subscribe or send. Sending by an ivalid topic or bad Client ID result in a disc…

---

## [Python 3 function & Node-red disconnected](https://discourse.nodered.org/t/python-3-function-node-red-disconnected/7275)

<div class="topic-metadata">

**Author:** [@emspe](https://discourse.nodered.org/u/emspe)\
**Replies:** 24\
**Last updated:** [20 June 2021 01:35 UTC](https://discourse.nodered.org/t/python-3-function-node-red-disconnected/7275 "2021-06-20T01:35:57Z")

</div>

Hello, I installed python 3 using npm install -g node-red-contrib-python3-function & just inject a simple code to print 'hello'. Suddenly node-red disconnected with below message in PowerShell. Though I tried to run no…

---

## [Returning asyc function (mysql select query)](https://discourse.nodered.org/t/returning-asyc-function-mysql-select-query/47381)

<div class="topic-metadata">

**Author:** [@Ricardo-Miguel-Calde](https://discourse.nodered.org/u/Ricardo-Miguel-Calde)\
**Replies:** 8\
**Last updated:** [20 June 2021 01:08 UTC](https://discourse.nodered.org/t/returning-asyc-function-mysql-select-query/47381 "2021-06-20T01:08:38Z")

</div>

Hello and TIA for anyone that could lead me to a solution.. I'm trying to make a SELECT query to a mysql database using mysql2 but the result when calling the function is always a promisse. I do manage to get data from…

---

## [Function node - creating uuid in the code](https://discourse.nodered.org/t/function-node-creating-uuid-in-the-code/47358)

<div class="topic-metadata">

**Author:** [@rudaNode](https://discourse.nodered.org/u/rudaNode)\
**Replies:** 5\
**Last updated:** [19 June 2021 19:10 UTC](https://discourse.nodered.org/t/function-node-creating-uuid-in-the-code/47358 "2021-06-19T19:10:21Z")

</div>

I am new to node-red and am trying to experiment with following code in a function node: var ce = {}; ce.id = "a8fd123d-5ac6-44bb-a146-898959a1812e"; msg.payload = ce; return msg; Except that I want to generate a ne…

---

## [Usb camera image sent to email with preview](https://discourse.nodered.org/t/usb-camera-image-sent-to-email-with-preview/47371)

<div class="topic-metadata">

**Author:** [@Rain](https://discourse.nodered.org/u/Rain)\
**Replies:** 0\
**Last updated:** [19 June 2021 16:26 UTC](https://discourse.nodered.org/t/usb-camera-image-sent-to-email-with-preview/47371 "2021-06-19T16:26:56Z")

</div>

Hi, I got this flow so far, managed to send the image from the usbcamera to email, but the image is corrupted and can't be previewed. \[{"id":"f2af706c.c79d","type":"tab","label":"Flow 1","disabled":false,"info":""},{"i…

---

## [Telegram paragraphs](https://discourse.nodered.org/t/telegram-paragraphs/47366)

<div class="topic-metadata">

**Author:** [@automati](https://discourse.nodered.org/u/automati)\
**Replies:** 17\
**Last updated:** [19 June 2021 15:55 UTC](https://discourse.nodered.org/t/telegram-paragraphs/47366 "2021-06-19T15:55:35Z")

</div>

Hello everybody Does anyone know what the function node has to look like if I want individual paragraphs in the message? So for example: Status: on Music: off So far I've only managed to send status: on, for exam…

---

## [Help with htpasswd file to UI List](https://discourse.nodered.org/t/help-with-htpasswd-file-to-ui-list/47362)

<div class="topic-metadata">

**Author:** [@leftymuller](https://discourse.nodered.org/u/leftymuller)\
**Replies:** 0\
**Last updated:** [19 June 2021 09:00 UTC](https://discourse.nodered.org/t/help-with-htpasswd-file-to-ui-list/47362 "2021-06-19T09:00:23Z")

</div>

Hello all! Just trying to read htpasswd file and display it in a list on dashboard. Not having much luck.. can somebody assist or suggest a better way to do it? \[{"id":"400b685b.9e7728","type":"exec","z":"9f18fd18.1b7…

---

## [Mysql lost connection after INSERT](https://discourse.nodered.org/t/mysql-lost-connection-after-insert/47325)

<div class="topic-metadata">

**Author:** [@AK51](https://discourse.nodered.org/u/AK51)\
**Replies:** 16\
**Last updated:** [19 June 2021 08:55 UTC](https://discourse.nodered.org/t/mysql-lost-connection-after-insert/47325 "2021-06-19T08:55:51Z")

</div>

Hi, I have played with mysql and it worked before last year. However, last week, I create a simple flow and the the node-red crash after the INSERT. I have tried in a win-32 system and raspberry pi system, same problem. …

---

## [Modbus Slave device PI](https://discourse.nodered.org/t/modbus-slave-device-pi/12483)

<div class="topic-metadata">

**Author:** [@fordarn](https://discourse.nodered.org/u/fordarn)\
**Replies:** 13\
**Last updated:** [19 June 2021 07:37 UTC](https://discourse.nodered.org/t/modbus-slave-device-pi/12483 "2021-06-19T07:37:51Z")

</div>

Hi All Just wondering if anyone has came across a node set for the PI to act as a Modbus slave? All the Modbus nodes I have came across seem to be Master type arrangements Thanks

---

## [Default project on start](https://discourse.nodered.org/t/default-project-on-start/4327)

<div class="topic-metadata">

**Author:** [@sragneau](https://discourse.nodered.org/u/sragneau)\
**Replies:** 2\
**Last updated:** [19 June 2021 06:27 UTC](https://discourse.nodered.org/t/default-project-on-start/4327 "2021-06-19T06:27:39Z")

</div>

Hi everyone, I'm looking for creating a new docker of nodered with the project feature. In my dockerfile i clone my existing nodered project (flow, package.json ...) into the directory projects. /projects/myproject/ B…

---

## [Sonos via NodeRed](https://discourse.nodered.org/t/sonos-via-nodered/47009)

<div class="topic-metadata">

**Author:** [@automati](https://discourse.nodered.org/u/automati)\
**Replies:** 4\
**Last updated:** [19 June 2021 05:56 UTC](https://discourse.nodered.org/t/sonos-via-nodered/47009 "2021-06-19T05:56:30Z")

</div>

Hello everybody Does anyone know how I can play an MP3 file on my Sonos amp via Nodered? Many Thanks

---

## [Uibuilder output](https://discourse.nodered.org/t/uibuilder-output/47322)

<div class="topic-metadata">

**Author:** [@Joker](https://discourse.nodered.org/u/Joker)\
**Replies:** 4\
**Last updated:** [19 June 2021 01:50 UTC](https://discourse.nodered.org/t/uibuilder-output/47322 "2021-06-19T01:50:02Z")

</div>

Hi everyone, May I know how to create a "button" using pure javascript? I've created one using html, css and javascript but I am having issues with sending the output. I tried with uibuilder.send but nothing showed up i…

---

## [Split sensor output](https://discourse.nodered.org/t/split-sensor-output/47256)

<div class="topic-metadata">

**Author:** [@jonchargreaves](https://discourse.nodered.org/u/jonchargreaves)\
**Replies:** 4\
**Last updated:** [18 June 2021 20:16 UTC](https://discourse.nodered.org/t/split-sensor-output/47256 "2021-06-18T20:16:39Z")

</div>

I currently have a sensor that outputs the following :- {"CurrentTemperature":32.8,"AirPressure":255} I want to split this into 2 messages of 32.8 and 255 can anyone give me some assistance please?

---

## [MQTT Messages to \*.CSV?](https://discourse.nodered.org/t/mqtt-messages-to-csv/47313)

<div class="topic-metadata">

**Author:** [@Steinspiel](https://discourse.nodered.org/u/Steinspiel)\
**Replies:** 4\
**Last updated:** [18 June 2021 20:13 UTC](https://discourse.nodered.org/t/mqtt-messages-to-csv/47313 "2021-06-18T20:13:27Z")

</div>

I want to write MQTT messages in a \* .CSV file to open them with Excel. The MQTT messages contain only words ... Problem 1: The \* .CSV contains {"col1": "A-Word"} or {"col1": "B-Word"}. Can you tell me how I can achiev…

---

## [Node-Red Crashing Upon Opening](https://discourse.nodered.org/t/node-red-crashing-upon-opening/47346)

<div class="topic-metadata">

**Author:** [@psalibe](https://discourse.nodered.org/u/psalibe)\
**Replies:** 6\
**Last updated:** [18 June 2021 19:42 UTC](https://discourse.nodered.org/t/node-red-crashing-upon-opening/47346 "2021-06-18T19:42:26Z")

</div>

Hello, I have a super urgent matter of node-red crashing upon opening. It has been operating completely fine up until about 1 hour ago where now it crashes repeatedly. Below is the error I get. Running on a Raspberry-Pi…

---

## [How Read Data from MongoDB database](https://discourse.nodered.org/t/how-read-data-from-mongodb-database/44582)

<div class="topic-metadata">

**Author:** [@Kartiknodered](https://discourse.nodered.org/u/Kartiknodered)\
**Replies:** 2\
**Last updated:** [18 June 2021 14:14 UTC](https://discourse.nodered.org/t/how-read-data-from-mongodb-database/44582 "2021-06-18T14:14:14Z")

</div>

How to read data from MongoDB database using mongodb2 node. Actually i don't know where to write find query.

---

## [Feature Request: GPIO Node Support Python3 Exclusives](https://discourse.nodered.org/t/feature-request-gpio-node-support-python3-exclusives/47200)

<div class="topic-metadata">

**Author:** [@garrenr14](https://discourse.nodered.org/u/garrenr14)\
**Replies:** 13\
**Last updated:** [18 June 2021 14:02 UTC](https://discourse.nodered.org/t/feature-request-gpio-node-support-python3-exclusives/47200 "2021-06-18T14:02:48Z")

</div>

Hello, I have uninstalled Python2 on my Raspberry Pi and I am using Python3 only. I have an alias for python=python3 in place, which works in most cases. However, I noticed that the GPIO node no longer works as the unde…

---

## [Get GPIO State Node-Red](https://discourse.nodered.org/t/get-gpio-state-node-red/3712)

<div class="topic-metadata">

**Author:** [@b35b5dad43ea282b65d0](https://discourse.nodered.org/u/b35b5dad43ea282b65d0)\
**Replies:** 6\
**Last updated:** [18 June 2021 12:15 UTC](https://discourse.nodered.org/t/get-gpio-state-node-red/3712 "2021-06-18T12:15:32Z")

</div>

Hello, I am running different actors with my Node-Red Flow. Over the GPIO Pins of my Raspberry Pi. Now I would like to make a dashboard to show the actor activity. I tried to use the gpi-gpio in Node but then the mess…

---

## [Password is shown in context of node in plain text](https://discourse.nodered.org/t/password-is-shown-in-context-of-node-in-plain-text/47007)

<div class="topic-metadata">

**Author:** [@kiran007](https://discourse.nodered.org/u/kiran007)\
**Replies:** 9\
**Last updated:** [18 June 2021 11:56 UTC](https://discourse.nodered.org/t/password-is-shown-in-context-of-node-in-plain-text/47007 "2021-06-18T11:56:22Z")

</div>

I have a custom node which accepts username and password, if the user submits the details and click on node to view node info/content information then password field is displayed in clear text. please refer to the image …

---

## [How to delete all numbers after point](https://discourse.nodered.org/t/how-to-delete-all-numbers-after-point/11449)

<div class="topic-metadata">

**Author:** [@muharremsari](https://discourse.nodered.org/u/muharremsari)\
**Replies:** 5\
**Last updated:** [18 June 2021 10:43 UTC](https://discourse.nodered.org/t/how-to-delete-all-numbers-after-point/11449 "2021-06-18T10:43:40Z")

</div>

How can I do this with Math.round() or some function. My result looking like this 26.200000762939453

---

## [Does anyone have an example of a Mikrotik router](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683)

<div class="topic-metadata">

**Author:** [@tashbee](https://discourse.nodered.org/u/tashbee)\
**Replies:** 7\
**Last updated:** [18 June 2021 10:42 UTC](https://discourse.nodered.org/t/does-anyone-have-an-example-of-a-mikrotik-router/12683 "2021-06-18T10:42:46Z")

</div>

Hi, I wonder if anyone out there can give me a syntax example of how to use the raw input to the node-red-contrib-mikrotik For example how would I do the equivalent of /ip firewall filter enable numbers=1 Have looked…

---

## ["Deploy failed: No response from server" when inserting into MySQL](https://discourse.nodered.org/t/deploy-failed-no-response-from-server-when-inserting-into-mysql/18822)

<div class="topic-metadata">

**Author:** [@Sagar](https://discourse.nodered.org/u/Sagar)\
**Replies:** 38\
**Last updated:** [18 June 2021 10:18 UTC](https://discourse.nodered.org/t/deploy-failed-no-response-from-server-when-inserting-into-mysql/18822 "2021-06-18T10:18:44Z")

</div>

I am getting "Deploy failed: No response from server" when I am trying to Insert the data coming from real-time sensors in JSON format. All the other queries except the Insert query is running fine. Below is the Insert…

---

## [GPSD appears to prevent system from loading](https://discourse.nodered.org/t/gpsd-appears-to-prevent-system-from-loading/45726)

<div class="topic-metadata">

**Author:** [@NPT](https://discourse.nodered.org/u/NPT)\
**Replies:** 16\
**Last updated:** [18 June 2021 07:20 UTC](https://discourse.nodered.org/t/gpsd-appears-to-prevent-system-from-loading/45726 "2021-06-18T07:20:23Z")

</div>

Hi, I am fairly new to Pi despite years of Windows programming and after my first fairly intense day with the totally brilliant Node-RED, am marvelling at its usefulness. Using Palette, I installed GPSD into a very suc…

---

## [Syntax for sending mqtt variable](https://discourse.nodered.org/t/syntax-for-sending-mqtt-variable/47318)

<div class="topic-metadata">

**Author:** [@kenkoknz](https://discourse.nodered.org/u/kenkoknz)\
**Replies:** 1\
**Last updated:** [18 June 2021 05:49 UTC](https://discourse.nodered.org/t/syntax-for-sending-mqtt-variable/47318 "2021-06-18T05:49:36Z")

</div>

Hi, This sould be a simple one. I set up an espeasy connected to a lcd, listening for cmd from mqtt to display data. In NR I use a mqtt node and inject a payload of: lcd,3,1,abc and the lcd display abc, so all good t…

---

## [Embed node red with node JS](https://discourse.nodered.org/t/embed-node-red-with-node-js/47319)

<div class="topic-metadata">

**Author:** [@OmkarNodered](https://discourse.nodered.org/u/OmkarNodered)\
**Replies:** 0\
**Last updated:** [18 June 2021 04:57 UTC](https://discourse.nodered.org/t/embed-node-red-with-node-js/47319 "2021-06-18T04:57:47Z")

</div>

Hello, I have node red flow which I want to embed with node js and run it. Can anyone help me with that how we can use node red and node js together?

---

## [Better way to do this flow?](https://discourse.nodered.org/t/better-way-to-do-this-flow/47269)

<div class="topic-metadata">

**Author:** [@grafix707](https://discourse.nodered.org/u/grafix707)\
**Replies:** 9\
**Last updated:** [18 June 2021 04:47 UTC](https://discourse.nodered.org/t/better-way-to-do-this-flow/47269 "2021-06-18T04:47:07Z")

</div>

I'm trying to cycle through 4 different lights from sunset to sunrise. I'm sure there is a better/cleaner approach to this, looking for someone to point me in the right direction.

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

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