How to Turn On Lights with a Motion Sensor in NodeRED and Home Assistant

  Рет қаралды 34,681

TheBleepBloop

TheBleepBloop

Күн бұрын

Пікірлер: 57
@robi2668
@robi2668 2 жыл бұрын
Amazing simple and explicit tutorial, would love to see more!!!!
@PatipanWongkleaw
@PatipanWongkleaw 3 жыл бұрын
You need to properly tune your volume, don't just edit with your headphones on at max volume
@darrenmunday4064
@darrenmunday4064 3 жыл бұрын
Thanks for getting me up and running with this. Now I must remember to turn my sound back down! Your vols are very low.
@thebleepbloop4547
@thebleepbloop4547 3 жыл бұрын
Sorry about that. Sometimes I have to record these late at night when the family is sleeping in a really chaotic remodeling situation ;).
@quasimodo1427
@quasimodo1427 4 жыл бұрын
Please do more simple flows
@RandomGuy-lm8wh
@RandomGuy-lm8wh 4 жыл бұрын
Please make more of these simple examples..... Almost all videos I see are way too difficult for a beginner and have a lot of programming stuff in it. I like the way af using nodes instead of complex javascript files! Do you know if there is a easy way to dim or increase lights when a trigger is activated? I cant find a easy way.
@thebleepbloop4547
@thebleepbloop4547 4 жыл бұрын
As long as the light is dimmable. Use an events state node to watch a particular entity (as that will be your trigger.) When the state changes, a message will be sent through the flow. Connect the event state node to a call service node and simply set the brightness of the light. It's a bit trickier if you want to dim through some values, and sometimes choppy because of the capabilities of most LED bulbs. It's tough to get them to dim smoothly without adding some sort of loop to process the values from one to another.
@V0X4455
@V0X4455 4 жыл бұрын
Great walk through, exactly what I needed.
@DegenWelle
@DegenWelle 4 жыл бұрын
Please. More videos. Also a flow who detect motion and don't turn off the lights while there is people in the room.
@jongriffith4293
@jongriffith4293 3 жыл бұрын
That's a tough one. You need a myriad of sensors to achieve true presence detection, and the algorithm you're creating for yourself could be a nightmare. If it's motion and people stop moving, it won't work. If it's devices and someone leaves their phone in another room, it won't work. If it sonic sensors and nobody is in the path of the sensor, or it's not a human in the path of the sensor, then it won't work.
@captain_loeffel
@captain_loeffel 2 жыл бұрын
@@jongriffith4293 There is under special circumstances a way to realize that. But therefor you need a room that is covered by a camera with person identification. I've seen a video somewhere, that shows a HACS Integration, that can identify if there is a person in the room or not. I think it can even count. In the new cameras from Unifi you have such thing integrated. They have "three" motion sensors. One for general motion, one when a person enters the camera view and one that reacts when a car enters the camera view. But I think any other way is hard to realize.
@MaxGoddur
@MaxGoddur 3 жыл бұрын
Please continue to make videos these are probably the only videos I have found covering step-by-step examples using Home Assistant and Node-Red. I still don't understand how the flow in NR talks to the HA devices. I can understand how the ESPhome works due to having the upload feature but no idea how the code gets to the ESP device once the flow is written?
@thebleepbloop4547
@thebleepbloop4547 3 жыл бұрын
ESP devices simply become sensors or switches or lights. The Home Assistant nodes in NodeRED simply connect to the services that already exist in Home Assistant. So, if you have a motion sensor, and you used ESPHome to configure it and connect it to Home Assistant, then you can use the NodeRED Home Assistant nodes to listen to or trigger those entities. NodeRED doesn't send any code *to* the ESPHome device. NodeRED simply interfaces with Home Assistant much like you would if you were using the Home Assistant user interface. An example would be a basic light switch. In NodeRED, you use a Call Service node, point it to the light or switch you want to change, set whether it's to be turned on or off, and then use an inject node to test it. Whatever you add to the input of the service call will be what triggers NodeRED to send the "on" or "off" signal to Home Assistant through the call_service function.
@MaxGoddur
@MaxGoddur 3 жыл бұрын
@@thebleepbloop4547 if you ever decide to do a video using NR and HA and the Athom socket (my understanding of the Athom single gang receptacle is it is flashed with Tasmota) as it pertains to monitoring a washing machine and notifying it has completed I would be very interested and we could sip on a "buy you a cup of coffee" while we talk about the setup. I have tried to follow the many videos and instructions on how to do this but it appears the missing steps render the tutorials DIW.
@stu6533
@stu6533 4 жыл бұрын
This is excellent. Nice bit of logic there as well - very helpful :-)
@jongriffith4293
@jongriffith4293 4 жыл бұрын
Thanks! Appreciate it!
@danieljensen761
@danieljensen761 3 жыл бұрын
excellent video. great level of explanation. looking at you tabs in node. plenty of material to teach/explain :)
@jongriffith4293
@jongriffith4293 3 жыл бұрын
Agreed...if only I didn't have an 8 month-old wobbling around here.
@dirkselzer439
@dirkselzer439 4 жыл бұрын
thanks for the video :) the next time, please do it little bit louder ;)
@jongriffith4293
@jongriffith4293 4 жыл бұрын
Noted. It was late ;). Thanks.
@pimmen85
@pimmen85 4 жыл бұрын
i cant get my motionsensors to continiusly detect motion like yours do, i have both a aeotec multisensor 6 and an aqara motion sensor.
@jongriffith4293
@jongriffith4293 3 жыл бұрын
Not sure what you mean by continuously detect. When I trigger a motion sensor, it switches off after a few seconds. So it's just a temporary binary on/off. I used the NodeMCU setup from BRUH Automation from a few years back to setup the device...so maybe there's something in that code that controls the timing on the sensor.
@jongriffith4293
@jongriffith4293 3 жыл бұрын
The motion sensors don't detect continuously. They're either tripped, or not. The one thing I don't have control over is how long they remain tripped. I think that's baked into this particular sensor.
@frankbecks218
@frankbecks218 3 жыл бұрын
Works great, thanks :)
@eddomak
@eddomak 3 жыл бұрын
Thanks for the video - it definitely helped me get started, and the logic is really helpful for checking additional conditions. In this particular case would it be more efficient to not even have the check for whether the light is already on and just always send a command to turn the light(s) on? This would still reset the timer each time prior to switching off.
@jongriffith4293
@jongriffith4293 3 жыл бұрын
It's not necessary, but in a mechanical automation, it might make sense to check the state of something before automating.
@KrastyoKrastev
@KrastyoKrastev 2 жыл бұрын
Great video! Too bad you have stopped doing videos :(
@joos2033
@joos2033 2 жыл бұрын
What if, instead of a timer i want say to turn on and off the lights only in the moment of the day where there is no light outsite. It is possible ? do you have a video or explanation about how to do it ?
@jongriffith4293
@jongriffith4293 2 жыл бұрын
There is probably not going to be a time when there is no light at all. So, what you would need is a light sensor that can give you a value in HA. Then, create a flow that watches that sensor and allows the message to pass if the value of that sensor falls below the value you note when the light conditions are what you want them to be, and vice versa
@n2ocharged
@n2ocharged 3 жыл бұрын
I know this video is a year and a half old, my motion sensors won't update the timer to reset it. What sensors are you using?
@mattb7406
@mattb7406 3 жыл бұрын
That was one of the coolest fricken things ever!
@jongriffith4293
@jongriffith4293 3 жыл бұрын
Come on! Ever? Well, thanks!
@Andre-xu3pq
@Andre-xu3pq 6 ай бұрын
Events: State node is different now 😞 i try to get this simpel, and step one with the debug i get no information. the witch works in MQTT is see the switch to move .. I this because the " Events: State node" is different now??
@jongriffith4293
@jongriffith4293 6 ай бұрын
It does look different now. The principle still applies. Make sure that the state that you're testing for matches the states that your device reports. In my case, the motion sensor reports 'on.' Other motion sensor I've had report "detected," etc.
@TheUnofficialMaker
@TheUnofficialMaker 4 жыл бұрын
can u crank up the audio
@jongriffith4293
@jongriffith4293 4 жыл бұрын
I can in the next ones I do. It was late and I was being quiet... ;).
@TheUnofficialMaker
@TheUnofficialMaker 4 жыл бұрын
@@jongriffith4293 found a volume up bookmarklet for browser to increase it, good video
@JoseBerruezo
@JoseBerruezo 3 жыл бұрын
Hello, how can I enable or disable this flow from the homeassistant? For example, with a switch, on homeassistant, I can enable or disable this flow .Thanks
@jongriffith4293
@jongriffith4293 3 жыл бұрын
Create an input boolean in HA, then in NodeRED add a switch to your flow that tests against it and stops the flow if it's TRUE.
@JoseBerruezo
@JoseBerruezo 3 жыл бұрын
@@jongriffith4293 Thank you
@Ellghee
@Ellghee 3 жыл бұрын
What is the advantage using your solution instead of using a trigger??
@jongriffith4293
@jongriffith4293 3 жыл бұрын
"Trigger" is subjective. NodeRED is a visual solution for those who aren't a fan of yaml. 6 of one, 1/2 dozen the other.
@Ellghee
@Ellghee 3 жыл бұрын
@@jongriffith4293 I'm not a programmer and my .yaml knowledge is limited to cut and paste. That is why I use node-red and I find the trigger node extremely simple to use, just open, set the time and click a check box if I need 2 outlets. Sorry your English is too complicated for me to understand.
@jongriffith4293
@jongriffith4293 3 жыл бұрын
@@Ellghee Ahh...I see. I believe the trigger-state node wasn't around when I originally made this automation. The trigger-state node does add some functionality that's not there on the State Change node. Thanks for the heads up.
@simonburke6681
@simonburke6681 3 жыл бұрын
I don't have sensor as an option under Home Assistant, any idea why?
@thebleepbloop4547
@thebleepbloop4547 3 жыл бұрын
There could be many reasons for this, but I would start by looking at your Home Assistant configuration.yaml file. You should define your sensors through this file, whether it's directly in this file, or by using an included file in a different sub-folder of your home assistant configuration.
@k5vg
@k5vg Жыл бұрын
What's up with the extremely low recording sound level? This video might actually be useful if the sound were audible.
@danielducu
@danielducu 2 жыл бұрын
Motion sensor cool down period not taken into account here … unexpected results when you revisit the room and nothing happens
@jongriffith4293
@jongriffith4293 2 жыл бұрын
The motion sensors I'm using trigger, then they reset in a matter of seconds. Hasn't been an issue.
@emaanrad1624
@emaanrad1624 3 жыл бұрын
hmm show me > > Home assistant connection failed with error: Connection to home assistant could not be established with config: localhost:8300
@thebleepbloop4547
@thebleepbloop4547 3 жыл бұрын
Where are you seeing this?
@constas559
@constas559 3 жыл бұрын
I can't hear anything
@thebleepbloop4547
@thebleepbloop4547 3 жыл бұрын
Eh? What? Can't hear you.
@PitFighter2007
@PitFighter2007 2 жыл бұрын
sound is very quiet...annoyingly so. good vid tho.
@Paullik83
@Paullik83 2 жыл бұрын
bad logic. this never works well.😆... How reset the timer if movement is acriv for more then 5 minits?
@jongriffith4293
@jongriffith4293 2 жыл бұрын
Motion sensor is a binary on/off with a built in timer, so there's no continuous motion detection. It would simply be repeated motion triggers, so you could easily create a flow that re-triggers the timer every time it senses motion and shut down the lights after 5 minutes have passed without motion detected.
@pauls8366
@pauls8366 3 жыл бұрын
Bad resolution, bad noise, I gave up after 30 seconds, but read the comments and give it a try more.
Automating Lights with a Presence Sensor
8:02
Smart Home Makers
Рет қаралды 5 М.
Why you SHOULD use Entity Controller over Automation (sometimes)
9:53
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Motion sensing LIGHT AUTOMATIONS in NodeRed
17:10
Will Surridge Tech
Рет қаралды 23 М.
Best light automation | Node-RED, Home Assistant
14:48
Isaenkov Pro
Рет қаралды 12 М.
Lichtsteuerung mit smartem Bewegungssensor mit Node-RED und Home Assistant
11:12
MEGA new features in Home Assistant 2025.1
10:40
LNPBR
Рет қаралды 7 М.
Unleash the Power of Node Red in Your HomeAssistant Setup
11:22
ChuckBuilds
Рет қаралды 10 М.
How to Use the Home Assistant Events All Node in NodeRED
25:51
TheBleepBloop
Рет қаралды 309
The BEST Mechanical Display You've EVER Seen!!!
13:51
Tin Foil Hat
Рет қаралды 520 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41