Это видео недоступно.
Сожалеем об этом.
How to Turn On Lights with a Motion Sensor in NodeRED and Home Assistant
HTML-код
- Опубликовано: 17 авг 2024
- This video will teach you how to make a simple flow that will listen to your motion sensor, turn on any associated lights, and set an off timer that will be automatically re-set as long as motion is detected within a certain period of time.
Amazing simple and explicit tutorial, would love to see more!!!!
You need to properly tune your volume, don't just edit with your headphones on at max volume
Thanks for getting me up and running with this. Now I must remember to turn my sound back down! Your vols are very low.
Sorry about that. Sometimes I have to record these late at night when the family is sleeping in a really chaotic remodeling situation ;).
Great walk through, exactly what I needed.
Please do more simple flows
This is excellent. Nice bit of logic there as well - very helpful :-)
Thanks! Appreciate it!
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.
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.
Works great, thanks :)
thanks for the video :) the next time, please do it little bit louder ;)
Noted. It was late ;). Thanks.
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?
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.
@@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.
Please. More videos. Also a flow who detect motion and don't turn off the lights while there is people in the room.
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.
@@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.
excellent video. great level of explanation. looking at you tabs in node. plenty of material to teach/explain :)
Agreed...if only I didn't have an 8 month-old wobbling around here.
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.
It's not necessary, but in a mechanical automation, it might make sense to check the state of something before automating.
That was one of the coolest fricken things ever!
Come on! Ever? Well, thanks!
i cant get my motionsensors to continiusly detect motion like yours do, i have both a aeotec multisensor 6 and an aqara motion sensor.
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.
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.
Great video! Too bad you have stopped doing videos :(
can u crank up the audio
I can in the next ones I do. It was late and I was being quiet... ;).
@@jongriffith4293 found a volume up bookmarklet for browser to increase it, good video
What's up with the extremely low recording sound level? This video might actually be useful if the sound were audible.
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?
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??
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.
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 ?
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
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
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.
@@jongriffith4293 Thank you
What is the advantage using your solution instead of using a trigger??
"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.
@@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.
@@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.
I don't have sensor as an option under Home Assistant, any idea why?
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.
Motion sensor cool down period not taken into account here … unexpected results when you revisit the room and nothing happens
The motion sensors I'm using trigger, then they reset in a matter of seconds. Hasn't been an issue.
hmm show me > > Home assistant connection failed with error: Connection to home assistant could not be established with config: localhost:8300
Where are you seeing this?
I can't hear anything
Eh? What? Can't hear you.
sound is very quiet...annoyingly so. good vid tho.
bad logic. this never works well.😆... How reset the timer if movement is acriv for more then 5 minits?
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.
Bad resolution, bad noise, I gave up after 30 seconds, but read the comments and give it a try more.