About the General category

If you aren’t sure where to ask, start here.

1 Like

How to possible aes128 encrypt and decrypt?

How to load JSON by passing node flow id in node-red on initial start

You have asked this question under the title "About the General category". You should start a new post with a title that indicates what your question is about. However, if you mean how can you start node red and tell it which flows file to run then see https://nodered.org/docs/getting-started/local#command-line-usage
If you have any follow up to this then please start a new post with an appropriate title.

1 Like

I have a question about the information that comes from the azure registry node. Where can I best place this question?

Anfänger
möchte gern wissen, evtl. mit praktischen Beispielen, was über diese Plattform alles möglich und machbar ist ?

Herzlichen Dank im Voraus und freundliche Grüße i.d.Runde
wowo

How to get value from array and send by SQL?

hi

past 6 month i am using node-red on IOT2040 Siemens Gatelway

Node-red V0.19

facing issue with node-red past two days,
node-red Pallets fails to load in browser, when we check in browser console

the below error

vendor.js:16 Uncaught SyntaxError: Unexpected token ')'
red.min.js:16 Uncaught ReferenceError: jQuery is not defined
at red.min.js:16
(anonymous) @ red.min.js:16
main.min.js:16 Uncaught ReferenceError: $ is not defined
at main.min.js:16
at main.min.js:16

When I try and post a new topic it says add a user?

Can you help me finish this flow please, i am getting Invalid input: NaN

Here is my flow

[{"id":"f8ffbc74.d4852","type":"ui_heater_controller","z":"3c18521c.5f221e","name":"heater","group":"835b44b6.ccfa28","unit":"C","order":1,"width":"6","height":3,"topic":"","title":"","logLengthType":"days","logLength":1,"sliderMinValue":38,"sliderMaxValue":41,"sliderStep":0.5,"thresholdRising":0.5,"thresholdFalling":0.5,"calendar":"{\n    \"Monday\": {\n        \"00:00\": 40,\n        \"06:20\": 40,\n        \"08:00\": 40,\n        \"16:40\": 39,\n        \"19:00\": 40\n    },\n    \"Tuesday\": {\n        \"00:00\": 40,\n        \"06:20\": 40,\n        \"08:00\": 40,\n        \"16:40\": 39,\n        \"19:00\": 40\n    },\n    \"Wednesday\": {\n        \"00:00\": 40,\n        \"06:20\": 40,\n        \"08:00\": 40,\n        \"16:40\": 39,\n        \"19:00\": 40\n    },\n    \"Thursday\": {\n        \"00:00\": 40,\n        \"06:20\": 40,\n        \"08:00\": 40,\n        \"16:40\": 39,\n        \"19:00\": 40\n    },\n    \"Friday\": {\n        \"00:00\": 40,\n        \"06:20\": 40,\n        \"08:00\": 40,\n        \"16:40\": 39,\n        \"19:00\": 40\n    },\n    \"Saturday\": {\n        \"00:00\": 40,\n        \"06:20\": 40,\n        \"08:00\": 40,\n        \"16:40\": 39,\n        \"19:00\": 40\n    },\n    \"Sunday\": {\n        \"00:00\": 40,\n        \"06:20\": 40,\n        \"08:00\": 40,\n        \"16:40\": 39,\n        \"19:00\": 40\n    }\n}","x":630,"y":180,"wires":[["ab75dbe8.c215f","df9315d8.b8ff38"]]},{"id":"835b44b6.ccfa28","type":"ui_group","z":"","name":"Home","tab":"33bb299b.35015e","order":1,"disp":true,"width":"6","collapse":false},{"id":"33bb299b.35015e","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]``

[{"id":"f8ffbc74.d4852","type":"ui_heater_controller","z":"3c18521c.5f221e","name":"heater","group":"835b44b6.ccfa28","unit":"C","order":1,"width":"6","height":3,"topic":"","title":"","logLengthType":"days","logLength":1,"sliderMinValue":38,"sliderMaxValue":41,"sliderStep":0.5,"thresholdRising":0.5,"thresholdFalling":0.5,"calendar":"{\n "Monday": {\n "00:00": 40,\n "06:20": 40,\n "08:00": 40,\n "16:40": 39,\n "19:00": 40\n },\n "Tuesday": {\n "00:00": 40,\n "06:20": 40,\n "08:00": 40,\n "16:40": 39,\n "19:00": 40\n },\n "Wednesday": {\n "00:00": 40,\n "06:20": 40,\n "08:00": 40,\n "16:40": 39,\n "19:00": 40\n },\n "Thursday": {\n "00:00": 40,\n "06:20": 40,\n "08:00": 40,\n "16:40": 39,\n "19:00": 40\n },\n "Friday": {\n "00:00": 40,\n "06:20": 40,\n "08:00": 40,\n "16:40": 39,\n "19:00": 40\n },\n "Saturday": {\n "00:00": 40,\n "06:20": 40,\n "08:00": 40,\n "16:40": 39,\n "19:00": 40\n },\n "Sunday": {\n "00:00": 40,\n "06:20": 40,\n "08:00": 40,\n "16:40": 39,\n "19:00": 40\n }\n}","x":630,"y":180,"wires":[["ab75dbe8.c215f","df9315d8.b8ff38"]]},{"id":"835b44b6.ccfa28","type":"ui_group","z":"","name":"Home","tab":"33bb299b.35015e","order":1,"disp":true,"width":"6","collapse":false},{"id":"33bb299b.35015e","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]``

Hi, i am a newbee.
I flashed a ESP 32 Module with Tasmota and want to disassemble the Payload in Temperature and Humidity, but i fail.

The Payload String shows " {"Time":"2021-04-04T14:17:58","DHT11":{"Temperature":34.6,"Humidity":27.0,"DewPoint":12.8},"TempUnit":"C"} "

I tried with a Function Node

1 msg.payload = msg.Temperature;
2 return msg;

and another for Humidity

1 msg.payload = msg.Humidity;
2 return msg;

Is there anyone to Explain my Problem. Normaly it must work ?

1 Like

The reason it is failing is that the payload is a JSON string, you need it to be converted to a javascript object. Assuming that is coming from an MQTT node if you set it to output a parsed json object then it will parse the string and convert it to a js object for you.

Also, that should be
msg.payload = msg.payload.Temperature

[Edit] Why have you added your question to an old thread that itself does not have a useful title. If you have further questions please start a new thread.
I should have said 'Welcome to the forum`, so welcome.

I have just joined this forum and am getting my feet wet with how to post and navigate. Any help be great.

I have a "get history node" set to 1 minute of history that returns multiple payloads from a motion detector and is followed by a "switch node". There is always at least one payload with an "off" state and zero, one, or multiple msg.payload returns with an 'on' state. A basic msg.payload where motion has been detected in this situation looks like this:

{"entity_id":"binary_sensor.motion",
"state":"off"}
{"entity_id":"binary_sensor.motion",
"state":"on"}

I need to turn off the light if there has been no motion in the last minute. I use the switch node with an item to detect msg.payload.state of 'on' and a second item to detect 'off' ... then I realized I always get an 'off' along with any 'on' msg payload that might appear ... so my light ALWAYS turns off even if there is motion. LoL. So I flipped on the checkbox that says "stopping after first match" ... and even when it matches the first item ("on") it continues on to check the 2nd item ("off") and the lights turn off.

I've spent a couple of hours trying out different variants on how to use the "get history node" results in this situation and I've not found a functional way to move to the next node after the switch node exclusively when no "on" state is detected in the last minute. I'm new at this and any help is appreciated.

Install:
RPi4
Node-Red 9.2.0
Core-2021.6.6

Pb with node-red contrib-xstate-machine update to 1.2.2
After having updated node-red to v2.1.3 and with node.js version v14.11.0 on Linux 5.8.0-63 x64 LE and using npm version v6.14.8
I tried to update node-red contrib-xstate-machine from v1.11 to 1.2.2 and I got the following error message as shown below. Any idea to get around?

Thanks in advance.
BR
François

2021-10-30T21:28:43.264Z Install : node-red-contrib-xstate-machine 1.2.2
2021-10-30T21:28:43.303Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-xstate-machine@1.2.2
2021-10-30T21:28:45.252Z [err] npm WARN
2021-10-30T21:28:45.252Z [err] read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
2021-10-30T21:28:46.560Z [err] npm ERR! code ENOTSUP
2021-10-30T21:28:46.563Z [err] npm ERR!
2021-10-30T21:28:46.563Z [err] notsup Unsupported engine for state-machine-cat@9.2.0: wanted: {"node":"^12.20||^14.13.1||>=16"} (current: {"node":"14.11.0","npm":"6.14.8"})
2021-10-30T21:28:46.563Z [err] npm ERR! notsup Not compatible with your version of node/npm: state-machine-cat@9.2.0
2021-10-30T21:28:46.563Z [err] npm ERR! notsup Not compatible with your version of node/npm: state-machine-cat@9.2.0
2021-10-30T21:28:46.563Z [err] npm ERR! notsup Required: {"node":"^12.20||^14.13.1||>=16"}
2021-10-30T21:28:46.563Z [err] npm ERR!
2021-10-30T21:28:46.565Z [err] notsup Actual: {"npm":"6.14.8","node":"14.11.0"}

The version of nodejs you have is not compatible with the node. How did you install node red and nodejs?
If you are using Debian based system what does this show?
apt policy nodejs
Or if it is an old system
apt-cache policy nodejs

I installed node-red using
sudo npm install -g --unsafe-perm node-red
For nodejs, it is too old to be sure but something like
sudo apt-get install nodejs npm
but I never updated nodejs.
apt policy nodejs shows

nodejs:
  Installé : 12.18.2~dfsg-1ubuntu2
  Candidat : 12.18.2~dfsg-1ubuntu2
 Table de version :
 *** 12.18.2~dfsg-1ubuntu2 500
        500 http://fr.archive.ubuntu.com/ubuntu groovy/universe amd64 Packages
        100 /var/lib/dpkg/status

Ubuntu 20.10 is out of support, you should upgrade to 21.04 or higher.

However, if you don't want to do that (or even if you do upgrade Ubuntu) then if you uninstall nodejs using
sudo apt remove nodejs npm
and then run the recommended Pi/Debian/Ubuntu script then it will install a later version of nodejs and upgrade node-red to the latest (if it is not there already).

I tried to search for this Ascii node in manage pallet but I cant find it. Is this node no longer available to add to pallet?

https://flows.nodered.org/flow/1537326036be1337a38cd2661f6abaf2

Welcome to the forum @jts450

If you follow the link to the GitHub repository you will see there is nothing there.
However, you don't need a node for what it does. Can you give an example of the data you have and exactly what you want it converted to please