Thank you very much. I am new to node red. Maybe you can help me: is there a chance that you can do a video about blinking LED and creating a running light like an Audi (car) blinking light. I have absolutely no idea how to do it. Thanks for your help.
NodeRed can control the GPIO on raspberry pi. There it more than one way to resolve it. I believe Audi actually have it resolved by using hardware delay between the LEDs on the strip otherwise you would have to time each LED and that depends on how you going to connect the leds
Hi thank you for your videos, one question , is possible in nodered with node fuction , add the payload of 2 sensors into one, exemple 223v sensor 1 200v sensor2: equal 1 sensor with value 423V ? thanks a lot
Yes. You can store the value using context.set() when sensor A reports and add the value to sensor B just use separate msg.topic for each so you know which sensor is which.
try this: [{"id":"4df53d45.2952d4","type":"function","z":"76cad92f.121798","name":"2 Sensors","func":"//please name your sensors \"sensorA\" & \"sensorB\" in msg.topic for each sensor, //the node will return only when both sensors submit values
if(msg.topic === \"sensorA\"){ var sensorA = msg.payload; context.set(\"sensorA\", sensorA); } if(msg.topic === \"sensorB\"){ var sensorB = msg.payload; context.set(\"sensorB\", sensorB); }
var A = context.get(\"sensorA\"); var B = context.get(\"sensorB\");
","outputs":1,"noerr":0,"initialize":"// Code added here will be run once // whenever the node is started. context.set(\"sensorB\", null); context.set(\"sensorA\", null);","finalize":"","libs":[],"x":230,"y":300,"wires":[[]]}]
@@notenoughtech As I absolutely want you to keep this amazing channel international, let me reply in english :P Amazing work, Node-Red allows beginners to achieve breathtaking results with just some technical knowledge, and YOU make it possible. Thx again, respect !
I wonder if you know how to pass 3 different inputs to 3 outputs using function node? So, 1st input would pass to 1st output, 2nd input would pass to 2nd output and so forth
return [msg1, msg2, msg3] each msg should have an object ie var msg1 = {payload: your_payload, ID: your_id}. Then on input Create if conditions for msg.ID
@@notenoughtech Thank you for your response! I tried that but it didn't work, probably I didn't do it right but I ended up using join node and it worked.
Amazing explanation. i m getting temperature value (msg.payload) from a function how do i turn something on or off connected to pi gpio based on temperature. stuck on this. help would be much appreciated.
Nodered comes with gpio nodes. While I have no tutorials on that it shouldn't be more complicated than selecting the pin and pulling it LOW/HIGH as required
@@notenoughtech i am new to this. i connected the function to rpi gpio node. dont know how put a condition in function. if payload value is above 40 gipo should turn high if less then 40 remain low.
Hi boss. I have a function node that sends a msg.payload as a notification through Google mini. I'm looking for a way to insert msg.emitVolume - 60, which plays the notification at 60% volume. Any idea how I pass that msg.emitVolume through with only some of the out putted messages I have?. I use the "Google home notify" with volume adjustment (msg.emitVolume = ?). If I type into the function:- msg.emitVolume = 60 msg.payload = (whatever you choose) return msg; I get the notification at the correct volume, just unsure how to send msg.emitVolume with multiple messages. I've watched some of your other tuts & thank you for those.
Currently, I'm using node-red-contrib-cast as the node google-notify stopped working for me some time ago. Anyway - if so, you can simply set msg.volume or msg.payload.volume to a number 0-100 to set the volume. so your object would look like this msg.payload = "Hey test message"; msg.volume = 50; return msg;
@@notenoughtech wow, what a speedy response. I'll try that when I get home. My nodered-contrib-cast stopped working as well, so I changed it for the new one, and it works again. Which has also volume adjustments via "msg.emitVolume =xx". Will let you know how it goes. Cheers
@@notenoughtech I'm actually using "node-red-contrib-google-home-notify-volume-adjustable", it's the latest update. This is what I have as a single msg, and works fine. msg.emitVolume = 50 msg.payload = 'Anything you type' return msg; As stated, all works as expected with volume at 50%. I'm trying to create a function node with more than 2 messages & be able to change the volume for each msg. I need to output 5 messages & be able to set the volume on them individually. What I'm trying to do is:- (example) if msg.payload = 1, return "On" at 50% Volume if msg.payload = 2, return "Off" at 50% Volume if msg.payload = 3, return "Standby" at 75% Volume if msg.payload = 4, return "Sleeping" at 75% Volume. if msg.payload = 5, return "Overheat" at 100% Volume I have all the payload outputs for msg.payload set, just trying to change the volume, dependant upon the msg. Any help is greatly appreciated.
Thanks for this tutorial. I like the way you explain it.
Thanks for the tutorial series! very useful videos
Hi.can you help me please how can l do machine classification for hart signals using nod red l already did the classification in R code
Thank you very much. I am new to node red. Maybe you can help me: is there a chance that you can do a video about blinking LED and creating a running light like an Audi (car) blinking light. I have absolutely no idea how to do it. Thanks for your help.
NodeRed can control the GPIO on raspberry pi. There it more than one way to resolve it. I believe Audi actually have it resolved by using hardware delay between the LEDs on the strip otherwise you would have to time each LED and that depends on how you going to connect the leds
Hi thank you for your videos, one question , is possible in nodered with node fuction , add the payload of 2 sensors into one, exemple 223v sensor 1 200v sensor2: equal 1 sensor with value 423V ? thanks a lot
Yes. You can store the value using context.set() when sensor A reports and add the value to sensor B just use separate msg.topic for each so you know which sensor is which.
@@notenoughtech thanks a lot , it’s possible to write all the fuction, because I,m very noob with node red , and I don’t know how can I do it
Thanks
try this:
[{"id":"4df53d45.2952d4","type":"function","z":"76cad92f.121798","name":"2 Sensors","func":"//please name your sensors \"sensorA\" & \"sensorB\" in msg.topic for each sensor,
//the node will return only when both sensors submit values
if(msg.topic === \"sensorA\"){
var sensorA = msg.payload;
context.set(\"sensorA\", sensorA);
}
if(msg.topic === \"sensorB\"){
var sensorB = msg.payload;
context.set(\"sensorB\", sensorB);
}
var A = context.get(\"sensorA\");
var B = context.get(\"sensorB\");
if(A !== null && B !== null){
msg.payload = A+B;
context.set(\"sensorB\", null);
context.set(\"sensorA\", null);
return msg;
}
","outputs":1,"noerr":0,"initialize":"// Code added here will be run once
// whenever the node is started.
context.set(\"sensorB\", null);
context.set(\"sensorA\", null);","finalize":"","libs":[],"x":230,"y":300,"wires":[[]]}]
@@notenoughtech thanks a lot , this afternoon I try and comment the result
I try , and works perfectly, thanks a lot for help. thank you very much
Great English ! Congrats from Poland :P
Dziekuje :) robie co moge!
@@notenoughtech As I absolutely want you to keep this amazing channel international, let me reply in english :P
Amazing work, Node-Red allows beginners to achieve breathtaking results with just some technical knowledge, and YOU make it possible. Thx again, respect !
Thanks, very useful!
Enjoy
I wonder if you know how to pass 3 different inputs to 3 outputs using function node? So, 1st input would pass to 1st output, 2nd input would pass to 2nd output and so forth
return [msg1, msg2, msg3]
each msg should have an object ie var msg1 = {payload: your_payload, ID: your_id}. Then on input
Create if conditions for msg.ID
@@notenoughtech
Thank you for your response! I tried that but it didn't work, probably I didn't do it right but I ended up using join node and it worked.
I'm actually writing about this as it's a good topic
@@notenoughtech
That would be really awesome 👌
Follow me on one of social media as this one comes without video if you want a notification
Amazing explanation. i m getting temperature value (msg.payload) from a function how do i turn something on or off connected to pi gpio based on temperature. stuck on this. help would be much appreciated.
Nodered comes with gpio nodes. While I have no tutorials on that it shouldn't be more complicated than selecting the pin and pulling it LOW/HIGH as required
@@notenoughtech i am new to this. i connected the function to rpi gpio node. dont know how put a condition in function. if payload value is above 40 gipo should turn high if less then 40 remain low.
Great channel i like it
I lemon it !
Hi boss. I have a function node that sends a msg.payload as a notification through Google mini.
I'm looking for a way to insert msg.emitVolume - 60, which plays the notification at 60% volume.
Any idea how I pass that msg.emitVolume through with only some of the out putted messages I have?.
I use the "Google home notify" with volume adjustment (msg.emitVolume = ?).
If I type into the function:-
msg.emitVolume = 60
msg.payload = (whatever you choose)
return msg;
I get the notification at the correct volume, just unsure how to send msg.emitVolume with multiple messages.
I've watched some of your other tuts & thank you for those.
Currently, I'm using node-red-contrib-cast as the node google-notify stopped working for me some time ago. Anyway - if so, you can simply set msg.volume or msg.payload.volume to a number 0-100 to set the volume.
so your object would look like this
msg.payload = "Hey test message";
msg.volume = 50;
return msg;
@@notenoughtech wow, what a speedy response.
I'll try that when I get home.
My nodered-contrib-cast stopped working as well, so I changed it for the new one, and it works again. Which has also volume adjustments via "msg.emitVolume =xx".
Will let you know how it goes.
Cheers
Just make sure the node is updated - see the palette manager
@@notenoughtech I'm actually using "node-red-contrib-google-home-notify-volume-adjustable", it's the latest update.
This is what I have as a single msg, and works fine.
msg.emitVolume = 50
msg.payload = 'Anything you type'
return msg;
As stated, all works as expected with volume at 50%.
I'm trying to create a function node with more than 2 messages & be able to change the volume for each msg.
I need to output 5 messages & be able to set the volume on them individually.
What I'm trying to do is:- (example)
if msg.payload = 1, return "On" at 50% Volume
if msg.payload = 2, return "Off" at 50% Volume
if msg.payload = 3, return "Standby" at 75% Volume
if msg.payload = 4, return "Sleeping" at 75% Volume.
if msg.payload = 5, return "Overheat" at 100% Volume
I have all the payload outputs for msg.payload set, just trying to change the volume, dependant upon the msg.
Any help is greatly appreciated.
There is an example of if statement in the function node tutorial you can use this and modify the outcomes.