Hello i just want to say i love the project so far. I just installed a strip of lights under the railway of my stairs. I placed a motion detector at the top of the steps and the bottom. I was wanting a the lights to kinda start traveling up and down the steps dependent on which motion detector was triggered. Is this currently possible with the WLED project and how would i go about learning how to make this effect happen?
EDIT: I think the only new effect i would need is "wipe reverse" my strip starts at the top of the steps and the "wipe" effect works perfect when going down the stairs but i cant figure out how to make the "wipe" effect start from the bottom and work its way up.
EDIT:2 When i turn the led lights on they start off from where the last effect was at when it was turned off. Is there anyway to make it start the effect over completely?
Interesting , what type of motion detector do you use and how do you connect them to the wled ? Thanks
Im just using xiaomi motion sensors hooked to home assistant. Then i have node red running the automation to turn on an effect when motion is detected. Currently i can use wipe effect when the top motion is triggered but need a reverse wipe for when the bottom is detected.
@ikrowni can your HA configuration send commands via my JSON or HTTP API?
If so, try {"seg":[{"rev":true}]} or RV=1, it will reverse the animation :)
just looked into it and this documentation states
payload must be a string. If you want to send JSON then you need to format/escape it properly.
topic: home-assistant/light/1/state
payload: "{\"Status\":\"off\", \"Data\":\"something\"}"
Ive never really used json much how would i write this to make it work?
Ok, seems to me like you can send arbitrary MQTT messages.
In that case, just use [devicetopic]/api and as payload RV=1 for reverse and RV=0 for normal direction. If you are not sure what value the mqtt [devicetopic] has, you can look it up in the WLED sync settings!
that works wonderfully thank you so much for the assistance and the amazing software aircookie. Youre a legend!
Can i pick your brain on 1 more thing though? The led lights are continuing the effect from where it stopped. is there a way to make the effect start over from the beginning?
I wonder if a cheat could be to change to another effect with 0 brightness for a very short period of time, then change it back to what you want with proper brightness and direction.
not sure but that seems as though it would add a bit of a delay. Ill just wait for aircookie to see if theres a way to make the animation start over from the beginning. thanks for the idea though
@ikrowni i just checked, in 0.8.6 there is no way to start the animation from the beginning since the FX progress depends on the system time millis() only. This has a few benefits like multiple segments (and even lights) are always in sync, but comes at the cost of the animation starting in a "random" progress state. I'll try, maybe there is a way to make it possible to run the animation from the start again :)
hey thank you very much it would be greatly appreciated
Hi, I am also exhaustively looking for a way to make the steps of my ladder light up and down by mqtt.
聽 I started using ESPHome leaving each step as a different segment, it works, but each step requires a command via wifi and this generates a minimum speed of about 200~300ms. Impracticable.
I think Wled is fantastic and I am trying to find a way to use it on my stairs, but now I understand that maybe there is no way to use it. Does anyone know of a specific project for stairs using ESP + mqtt?
@Teie hi, take a look at this usermod, it may be what you want: https://github.com/Aircoookie/WLED/tree/master/usermods/stairway_wipe_basic
Also, with latest master source (or this binary) you can use the GP= API command to set the amount of LEDs per step. That way each step of the staircase will act as if it was a single LED.
Hi @Aircoookie, this GP = command is a great resource! It greatly simplifies the configuration of the steps.
I really tried hard to compile the "stairway_wipe_basic", researched and studied how to do it but I only had errors in the Arduino IDE besides not getting anything useful in Platformio.
I'm not going to ask you to do a tutorial on how to do this, but would you have any tips for any links that might help me? I can't understand what to do with wled06_usermod.ino.
Thanks, and congrats for this job!
@Teie great you like the new grouping feature!
About the usermod, first of all you'll need to be able to get WLED itself compiling, which requires a few library dependencies: https://github.com/Aircoookie/WLED/wiki#quick-start-guide
Once you got that up and running, simply replace the (mostly empty) wled06_usermod.ino file in the wled00 directory with the one from stairway_wipe_basic. User mods will not compile standalone, that might be what you tried :)
Wow, that's great! I was able to edit in the Arduino IDE and compile using Platformio. It worked, Thanks!
There鈥檚 just one last thing I didn鈥檛 understand how to do ... I have two simple PIR sensors to put on but I wasn鈥檛 able to advance in the field: {聽聽 // setup PIR sensor here, if needed}. What's it to put there? I found some code examples for PIR, but there is a definition of pins outside of {}. Once again I'm stuck needing help.
Awesome, I'm glad you got it to compile!
I cannot tell you how to implement the PIR sensor in detail, but in most cases adding the pin definitions in the very top of wled06 (outside of any function) would work fine.
You could also share what you have or ask for someone who is also in the process of setting up staircase lighting in https://github.com/Aircoookie/WLED/issues/579 :)
Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs.
Thank you for using WLED!