# General

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

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

**Page:** 650

---

## [Motion sensor and light](https://discourse.nodered.org/t/motion-sensor-and-light/36267)

<div class="topic-metadata">

**Author:** [@Thomas88103](https://discourse.nodered.org/u/Thomas88103)\
**Replies:** 6\
**Last updated:** [22 November 2020 03:22 UTC](https://discourse.nodered.org/t/motion-sensor-and-light/36267 "2020-11-22T03:22:56Z")

</div>

Hey all. I need little help with my node red automation. I have motion sensor in my bathroom. If motion is detect, turned light on and if no motion detect for 10min then turned light off. This works fine. light off afte…

---

## [Hue-Magic - State "On"= false does not work](https://discourse.nodered.org/t/hue-magic-state-on-false-does-not-work/36301)

<div class="topic-metadata">

**Author:** [@TheSoulrester](https://discourse.nodered.org/u/TheSoulrester)\
**Replies:** 5\
**Last updated:** [21 November 2020 22:32 UTC](https://discourse.nodered.org/t/hue-magic-state-on-false-does-not-work/36301 "2020-11-21T22:32:13Z")

</div>

Hey :slight\_smile: i want to temporarly change the light to a 33% brightness red. it should be round about 60s on. after the time it should take the same values as before and moreover the light should be switched off (i…

---

## [Break a byte down to 8 control outputs](https://discourse.nodered.org/t/break-a-byte-down-to-8-control-outputs/36296)

<div class="topic-metadata">

**Author:** [@Brian\_803](https://discourse.nodered.org/u/Brian_803)\
**Replies:** 2\
**Last updated:** [21 November 2020 19:51 UTC](https://discourse.nodered.org/t/break-a-byte-down-to-8-control-outputs/36296 "2020-11-21T19:51:06Z")

</div>

I have Node-Red monitoring and controlling a number of devices over MQTT. So I have a byte that returns the status of 8 relays (on or off). Is there any way to break that down to 8 outputs that can drive indicators on th…

---

## [Node-red-contrib-etekcity-smartplug issues?](https://discourse.nodered.org/t/node-red-contrib-etekcity-smartplug-issues/36297)

<div class="topic-metadata">

**Author:** [@hepcat72](https://discourse.nodered.org/u/hepcat72)\
**Replies:** 0\
**Last updated:** [21 November 2020 19:06 UTC](https://discourse.nodered.org/t/node-red-contrib-etekcity-smartplug-issues/36297 "2020-11-21T19:06:48Z")

</div>

Is there a place to submit issues with node-red-contrib-etekcity-smartplug? Neither the npm or node-red listing link to a repo. @jbardi ? I had submitted an issue on the underlying repo that this is a wrapper for and …

---

## [Constant Node-RED must be restarted to enable upgraded modules](https://discourse.nodered.org/t/constant-node-red-must-be-restarted-to-enable-upgraded-modules/36291)

<div class="topic-metadata">

**Author:** [@grumpazoid](https://discourse.nodered.org/u/grumpazoid)\
**Replies:** 6\
**Last updated:** [21 November 2020 17:16 UTC](https://discourse.nodered.org/t/constant-node-red-must-be-restarted-to-enable-upgraded-modules/36291 "2020-11-21T17:16:57Z")

</div>

I have run into a bit of a problem that I don't know how to resolve. I run on a raspberry pi. I was a couple of versions behind the latest. 1.10 I think I updated the openweathermap node from within pallet manager. Bu…

---

## [Data upload to Mqtt](https://discourse.nodered.org/t/data-upload-to-mqtt/36089)

<div class="topic-metadata">

**Author:** [@Ratsea](https://discourse.nodered.org/u/Ratsea)\
**Replies:** 10\
**Last updated:** [21 November 2020 16:55 UTC](https://discourse.nodered.org/t/data-upload-to-mqtt/36089 "2020-11-21T16:55:24Z")

</div>

This my first project with Node Red and have had some progress with Tado heating data and serial inputs. I am now stuck trying to access some data from a SR04 level sensor (oil tank level). This sensor is remote and bat…

---

## [How to calculate negative modbus value?](https://discourse.nodered.org/t/how-to-calculate-negative-modbus-value/36283)

<div class="topic-metadata">

**Author:** [@syma33](https://discourse.nodered.org/u/syma33)\
**Replies:** 5\
**Last updated:** [21 November 2020 15:53 UTC](https://discourse.nodered.org/t/how-to-calculate-negative-modbus-value/36283 "2020-11-21T15:53:27Z")

</div>

im stuck.. im reading modbus tcp values, when temperature goes -1 and below the graph seems to go bananas at night. Im trying to find out the right formula to calculate negative values passed from the modbus tcp.. i tri…

---

## [How to combine two messages](https://discourse.nodered.org/t/how-to-combine-two-messages/36281)

<div class="topic-metadata">

**Author:** [@John245](https://discourse.nodered.org/u/John245)\
**Replies:** 14\
**Last updated:** [21 November 2020 15:52 UTC](https://discourse.nodered.org/t/how-to-combine-two-messages/36281 "2020-11-21T15:52:59Z")

</div>

I have a message with an array. Using payload\["000104391731"\].state.remainingTime\[0\] and payload\["000104391731"\].state.remainingTime\[1\] I can create two seperate messages. However I want to combine these values a…

---

## [Output on Connect do not work after restart of Home Assistant](https://discourse.nodered.org/t/output-on-connect-do-not-work-after-restart-of-home-assistant/36289)

<div class="topic-metadata">

**Author:** [@ThisisIO](https://discourse.nodered.org/u/ThisisIO)\
**Replies:** 3\
**Last updated:** [21 November 2020 14:17 UTC](https://discourse.nodered.org/t/output-on-connect-do-not-work-after-restart-of-home-assistant/36289 "2020-11-21T14:17:07Z")

</div>

Problem/Motivation, Expected behavior, Actual behavior, Steps to reproduce Hello I used Event Node with any input boolean to detect that HA or Node-Red or both were restarted on connect i get message, send me a tel…

---

## [How to sync timestamp value with machine time during runtime of node-red?](https://discourse.nodered.org/t/how-to-sync-timestamp-value-with-machine-time-during-runtime-of-node-red/35980)

<div class="topic-metadata">

**Author:** [@madironman](https://discourse.nodered.org/u/madironman)\
**Replies:** 22\
**Last updated:** [21 November 2020 13:43 UTC](https://discourse.nodered.org/t/how-to-sync-timestamp-value-with-machine-time-during-runtime-of-node-red/35980 "2020-11-21T13:43:59Z")

</div>

I have a project which involves RTC connected to Raspberry Pi. I update the RTC periodically like once a month or week if it drifts significantly / when I am moving to a new timezone ( travelling ) . The machine is desig…

---

## [Delay timer based on other message](https://discourse.nodered.org/t/delay-timer-based-on-other-message/36219)

<div class="topic-metadata">

**Author:** [@drtorchwood](https://discourse.nodered.org/u/drtorchwood)\
**Replies:** 5\
**Last updated:** [21 November 2020 10:37 UTC](https://discourse.nodered.org/t/delay-timer-based-on-other-message/36219 "2020-11-21T10:37:46Z")

</div>

Hi there, I have a complicated (?) problem with a timer. The situation is as follows: I use the bigtimer node for a regular job. It sends the message "start". A second node sends the message "0" if my cell phone is not…

---

## [String to object](https://discourse.nodered.org/t/string-to-object/36268)

<div class="topic-metadata">

**Author:** [@dmac101](https://discourse.nodered.org/u/dmac101)\
**Replies:** 2\
**Last updated:** [21 November 2020 06:58 UTC](https://discourse.nodered.org/t/string-to-object/36268 "2020-11-21T06:58:26Z")

</div>

Hi Everyone, I have been playing around with Node-Red on and off for while but only pretty basic stuff. I am now working on a project that I want to use to expand my skills in this area. This involves using it to commun…

---

## [How to read from a connected external drive and display the files in it as options of a dropdown box?](https://discourse.nodered.org/t/how-to-read-from-a-connected-external-drive-and-display-the-files-in-it-as-options-of-a-dropdown-box/36273)

<div class="topic-metadata">

**Author:** [@madironman](https://discourse.nodered.org/u/madironman)\
**Replies:** 0\
**Last updated:** [21 November 2020 04:44 UTC](https://discourse.nodered.org/t/how-to-read-from-a-connected-external-drive-and-display-the-files-in-it-as-options-of-a-dropdown-box/36273 "2020-11-21T04:44:41Z")

</div>

Hi guys, I am trying to make a project which involves an alarm as part of the system, I am implementing this on raspberry-pi using node-red. I want to have an drop down box with list of files from a drive that the user h…

---

## [Pdfjs returning error that an ES5 build is required](https://discourse.nodered.org/t/pdfjs-returning-error-that-an-es5-build-is-required/35180)

<div class="topic-metadata">

**Author:** [@anakaine](https://discourse.nodered.org/u/anakaine)\
**Replies:** 9\
**Last updated:** [21 November 2020 03:46 UTC](https://discourse.nodered.org/t/pdfjs-returning-error-that-an-es5-build-is-required/35180 "2020-11-21T03:46:27Z")

</div>

Edit: It would seem that the error described below is due to the node incorrectly referencing the js library to be used. I am now having trouble doing a local deployment using "npm install c:\\temp\\node". The node will no…

---

## [How to list files and parse them](https://discourse.nodered.org/t/how-to-list-files-and-parse-them/36083)

<div class="topic-metadata">

**Author:** [@Simone](https://discourse.nodered.org/u/Simone)\
**Replies:** 21\
**Last updated:** [20 November 2020 21:23 UTC](https://discourse.nodered.org/t/how-to-list-files-and-parse-them/36083 "2020-11-20T21:23:29Z")

</div>

Hi, the following code is working with a fixed file name (M:\\1401.log) but I would like to do the flow on all files in the folder (M:) \[{"id":"8318c004.83b59","type":"csv","z":"bb550778.477b88","name":"Split Fields","se…

---

## [Influxdb 2.0 Error Data Type](https://discourse.nodered.org/t/influxdb-2-0-error-data-type/36138)

<div class="topic-metadata">

**Author:** [@hermiot](https://discourse.nodered.org/u/hermiot)\
**Replies:** 9\
**Last updated:** [20 November 2020 21:05 UTC](https://discourse.nodered.org/t/influxdb-2-0-error-data-type/36138 "2020-11-20T21:05:52Z")

</div>

Hi, I'm using node-red-contrib-influxdb (0.5.0) to pipe data into an Influxdb V2. After the updateto V2 I'm facing the following error: Error: 500 Internal Server Error : {"code":"internal error","message":"unexpected…

---

## [Where are my flows stored](https://discourse.nodered.org/t/where-are-my-flows-stored/36253)

<div class="topic-metadata">

**Author:** [@Magnus\_P](https://discourse.nodered.org/u/Magnus_P)\
**Replies:** 6\
**Last updated:** [20 November 2020 20:57 UTC](https://discourse.nodered.org/t/where-are-my-flows-stored/36253 "2020-11-20T20:57:44Z")

</div>

I have node-red installed on a Synology ds215J NAS and have followed this Installation Instructions. Everything works as expected and the node-red is launched, nodes are installed and and flows are created. Now to the q…

---

## [Communication between Subflows](https://discourse.nodered.org/t/communication-between-subflows/36106)

<div class="topic-metadata">

**Author:** [@Soloam](https://discourse.nodered.org/u/Soloam)\
**Replies:** 12\
**Last updated:** [20 November 2020 20:49 UTC](https://discourse.nodered.org/t/communication-between-subflows/36106 "2020-11-20T20:49:20Z")

</div>

Hello. For a long time I searched a solution to communicate between subflows, and I adopted a solution that works and I use it lot. It's have for example save subflow, that then broadcasts that changes to another subflo…

---

## [Logging dash events to a flat file](https://discourse.nodered.org/t/logging-dash-events-to-a-flat-file/36151)

<div class="topic-metadata">

**Author:** [@RASelkirk](https://discourse.nodered.org/u/RASelkirk)\
**Replies:** 12\
**Last updated:** [20 November 2020 19:21 UTC](https://discourse.nodered.org/t/logging-dash-events-to-a-flat-file/36151 "2020-11-20T19:21:57Z")

</div>

Hi All, I've been trying to get simple info from my dashboard (just an IP for now) into a flat (text) file using the "file" node and have it writing to a file. I plan to add other info when I get a handle on the "how" p…

---

## [What should i do](https://discourse.nodered.org/t/what-should-i-do/36259)

<div class="topic-metadata">

**Author:** [@p03920](https://discourse.nodered.org/u/p03920)\
**Replies:** 3\
**Last updated:** [20 November 2020 18:33 UTC](https://discourse.nodered.org/t/what-should-i-do/36259 "2020-11-20T18:33:28Z")

</div>

i don't know......this error bothering me..... and my codes. where is wrong??? i don't know plz help me...

---

## [Rfxcom node-red-contrib-rfxcom remote discovery](https://discourse.nodered.org/t/rfxcom-node-red-contrib-rfxcom-remote-discovery/35067)

<div class="topic-metadata">

**Author:** [@striderheng](https://discourse.nodered.org/u/striderheng)\
**Replies:** 14\
**Last updated:** [20 November 2020 17:46 UTC](https://discourse.nodered.org/t/rfxcom-node-red-contrib-rfxcom-remote-discovery/35067 "2020-11-20T17:46:48Z")

</div>

Hi, I been using nodered for several months now on a Pi and I have a RFXcon RFXtrx433 transceiver hooked up to the same Pi. I can get everything working with my NEXA light switches and SciOregon sensors towards nte rfxt…

---

## [Unable to install node-red-contrib-serialport-rs485](https://discourse.nodered.org/t/unable-to-install-node-red-contrib-serialport-rs485/36239)

<div class="topic-metadata">

**Author:** [@UnivSim](https://discourse.nodered.org/u/UnivSim)\
**Replies:** 3\
**Last updated:** [20 November 2020 13:43 UTC](https://discourse.nodered.org/t/unable-to-install-node-red-contrib-serialport-rs485/36239 "2020-11-20T13:43:49Z")

</div>

Hi all, I'm trieing to install node-red-contrib-serialport-rs485 om my raspberry pi (node red V 1.0.0) but i get following error: npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/node-red-no…

---

## [Calculate the energy consumed for each hour](https://discourse.nodered.org/t/calculate-the-energy-consumed-for-each-hour/36246)

<div class="topic-metadata">

**Author:** [@hassengh](https://discourse.nodered.org/u/hassengh)\
**Replies:** 2\
**Last updated:** [20 November 2020 13:38 UTC](https://discourse.nodered.org/t/calculate-the-energy-consumed-for-each-hour/36246 "2020-11-20T13:38:14Z")

</div>

Hello , do you have any idea how i can calculate the energy consumed for each hour ?

---

## [When internet fails , same data gets repeated until internet is up](https://discourse.nodered.org/t/when-internet-fails-same-data-gets-repeated-until-internet-is-up/36184)

<div class="topic-metadata">

**Author:** [@Energycharges](https://discourse.nodered.org/u/Energycharges)\
**Replies:** 8\
**Last updated:** [20 November 2020 13:28 UTC](https://discourse.nodered.org/t/when-internet-fails-same-data-gets-repeated-until-internet-is-up/36184 "2020-11-20T13:28:25Z")

</div>

While working with Modbus to database , sending data from Modbus to DB using CSV file and q-gate for interval of 5 minutes When Internet is Up , Data send automatically to db When there is NO Internet , queueing is c…

---

## [Local GitLab npm register as node source](https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811)

<div class="topic-metadata">

**Author:** [@NetHans](https://discourse.nodered.org/u/NetHans)\
**Replies:** 5\
**Last updated:** [20 November 2020 12:13 UTC](https://discourse.nodered.org/t/local-gitlab-npm-register-as-node-source/35811 "2020-11-20T12:13:30Z")

</div>

Does anyone have already gained experience of integrating npm packages from a local GitLab server into the Node-RED Manage range? Does a script already exist to generate the catalog for Node-RED automatically?

---

## [Merging 2 csv files in Node-RED/JavaScript](https://discourse.nodered.org/t/merging-2-csv-files-in-node-red-javascript/36070)

<div class="topic-metadata">

**Author:** [@Oscarrr](https://discourse.nodered.org/u/Oscarrr)\
**Replies:** 2\
**Last updated:** [20 November 2020 08:44 UTC](https://discourse.nodered.org/t/merging-2-csv-files-in-node-red-javascript/36070 "2020-11-20T08:44:26Z")

</div>

Hello there! I'm looking for some help on how to solve some specific challenges I'm facing in a current project. I'm a bit stuck, so I was hoping someone more experienced than myself could give me some hints. :slight\_sm…

---

## [Convert string to object?](https://discourse.nodered.org/t/convert-string-to-object/36209)

<div class="topic-metadata">

**Author:** [@invinciberry](https://discourse.nodered.org/u/invinciberry)\
**Replies:** 7\
**Last updated:** [19 November 2020 22:23 UTC](https://discourse.nodered.org/t/convert-string-to-object/36209 "2020-11-19T22:23:13Z")

</div>

So I am trying to scrape some data from a website. And I am trying to get it's availability date which is in a section starting with //#835635. Currently, I have the HTML content of this section stripped out from the we…

---

## [Using an And gate (node-red-contrib-bool-gate) not working](https://discourse.nodered.org/t/using-an-and-gate-node-red-contrib-bool-gate-not-working/36221)

<div class="topic-metadata">

**Author:** [@olafurfo](https://discourse.nodered.org/u/olafurfo)\
**Replies:** 1\
**Last updated:** [19 November 2020 21:47 UTC](https://discourse.nodered.org/t/using-an-and-gate-node-red-contrib-bool-gate-not-working/36221 "2020-11-19T21:47:30Z")

</div>

Hi First off, I'm no programmer.. at all.. So I've been googling, like most have.. aLOT. I'm creating a dimmer for my philips hue lights (from an IDEC PLC industrial computer) and i'm aaaalmost there. If my And gate w…

---

## [Unusual message from Node-red (Orphaned nodes)](https://discourse.nodered.org/t/unusual-message-from-node-red-orphaned-nodes/36214)

<div class="topic-metadata">

**Author:** [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Replies:** 1\
**Last updated:** [19 November 2020 21:31 UTC](https://discourse.nodered.org/t/unusual-message-from-node-red-orphaned-nodes/36214 "2020-11-19T21:31:35Z")

</div>

Alas I have been offline for the last 3 weeks. :frowning: And pretty much still am. (Main computer went a bit belly up.) Using another machine I log into one of my machine and see this: But I am confused why it …

---

## [How to reduce peak consumption (hems)](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148)

<div class="topic-metadata">

**Author:** [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Replies:** 79\
**Last updated:** [19 November 2020 20:47 UTC](https://discourse.nodered.org/t/how-to-reduce-peak-consumption-hems/35148 "2020-11-19T20:47:33Z")

</div>

Hi folks, Since electricity peak consumption is getting very important for our energy bills, I would like to collect some ideas about how to reduce such energy peaks. I'm new to this area, but it seems they talk about "…

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

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