Fully fledged Staircase implementation

Has someone a .bin file for me for ESP32 or ESP8266? I spend a lot of time with compiling with no success.
Thx Joe

1 Like

I thought my problem was solved. But it doesn’t :-(. And i really don’t know any more we’re I can find the problem. It has to be somewhere in the FW. Fighting with it for 2 weeks now, changed data cables to shielded cables, etc etc

Problem is that the ultrasoon sensors is getting triggered at moments there is not a reason for. Setting detection 75cm, and the distance between sensor and wall is between 81-84. Also if I set detection distance on 80cm, it’s in real about 40cm before its triggered if I use my hand

Using a esp32dev board (esp32 wroom)
Top trigger: gpio25
Top echo: gpio26
Bottom trigger: gpio14
Bottom echo: gpio27

If get a second esp32dev board and installing the 2 ultrasoon sensors with esphome on the same pins, I get a nice reading. Nice between 81-84cm.

So I think there is a problem somewhere with compiling wled with the usermod. But I can’t find out what. All ready did get an older wled version (13) and also the latest.
Also reinstalled VSC.

Edit: Also did try @srg74 precompiled version (esp32 staircase)

So I’m completely out of options now.
Who has a clue?

Ultrasonic readings on ESP32 may be skewed by multicore nature of ESP32.
Try using PIR sensors instead.

Hey Guys,

Usermod installed great but im struggling with which pins to link the sensors to.
My trigger pins are GPIO 5 and 4.
Which pin is my -1? I tried ground but no joy

Thanks

In general, “-1” means Not Assigned.
Scroll it down to a physical GPIO number and use that.

1 Like

Hi question about this project. A few years ago I wrote my own code for stairs light, but Wled offers much more options :slight_smile:

As for the triggering sensors, I am using two I2C V53L0X Laser range sensors for top and bottom. Would there be a possibility to include the use of these sensors in this usermod?

I hope that this instruction will be helpful and will safe a lot of time all those who are faced with the issues of setting up this user mod. I want to confirm that usermod works out of the box and if something doesn’t work you should troubleshoot yourself as there are no such guides in the document. I used ESP8266 D1 Mini for my experiments but these steps will also work for ESP32 boards as well.

  1. As srg74’s links to download binaries do not work anymore, you have to compile it yourself. Follow the document of how to do it here.
  2. After you flashed your firmware to your ESP controller, make sure that “Info” tab has “staircase” and the power button next to it is green (you can also enable it under Config → Usermods tab under “starcase” section).
  3. Do not setup any PIR triggers or UltraSound sensors yet (set -1 for all sensors PINs and uncheck all UltraSound sensors).
  4. Open in another tab of your browser with the http://xxx.xxx.xxx.xxx/json/state (use your WLED device IP address) and check that “top-sensor” and “bottom-sensor” both have “false” value (in case if you see “true” value on one of the sensors, see step #3).
  5. Configure your LED strip with the number of LEDs and check if it lights up when you Power On on the main web UI page (if it doesn’t turn on, look at the Segment 0 power button).
  6. In the WLED UI, configure a segment for each stair step and check it lights up and lights off when you click power button for each segment. (keep in mind that the Power button should be On on the main WLED UI, otherwise your segments will not turn on)
  7. Go to Config → Usermods and setup for example TopPIRorTrigger Pin to any pins which you are going to use with PIR sensor. Keep in mind that some of the pins should be used with pull-down resistors otherwise it will be always in “true” value. This is very important and this is where I spent a lot of time figuring out why the LED strip was always on and wouldn’t turn off when timed out. You can always check the status of triggers in step #4.
  8. At this point you can simulate of triggering one of the sensor from step #7 by just connect 3.3V pin with the sensor pin and your LED strips should light up one by one for each segment and lights off after timeout.
  9. Repeat steps #7-8 for another sensor in case your are using more than one sensor.
4 Likes

Folders is rearranged so all bins are there on Github

2 Likes

I am new to this whole Wled thing - I had a guy write me code for stair controller and its JUST not working been so so frustrating … This will be my first ESP32 flash and build - so lots and lots and lots to try and learn to get this figured out … Is this “user mod” now in the wled download file that I can get at install.wled.me? or do I still have to manually compile it and set it up??? is there just a Binary file or install ??? is there a simpler way for me to get a stair controller working can anyone help me?

Looking for any hep I can get PLEASE!!!
I was able to get the binary loaded onto ESP32 board and it showed me interface - when I tried to configure my network it would JUST not ever connect on my wifi network. I have two both a 5ghz and a 4.2 ? set up and broadcasting it would not join either.

problem two is I tried several attempts - well maybe 50 and now my esp32 does not show the web interface at all shows it there in wifi setting but does nothing when i click on it …

Third am I able to reconfigure a few things …

My board that was made for me ( so it has terminals for top and bottom PIR sensors and a the data out pin - I like to still use it if i can reconfigure wled - looking at the some of the source code from the Bin file that was originally designed to go with my esp32 says the following:

LED_Pin 12
Up trigger pin is 25
Down trigger pin 27

AP mode pin 33

can I get this binary file to work with my connector board and esp32? to do this?

Happy to share some of my original code that was given to me ( for pin out and such) but want to get my steps working with Wled…

After trying relentlessly for an Entire day - I either have faulty ESP32 boards or the code has issues or both:
Trying to get WLED_0.14.0-b2_ESP32_staircase_usermod.bin to work - installed on a MACBook using ESPhome_Flasher 1.4.0

  1. Secure access point appears but will not connect to home wifi (have tried setting up seperate 4.2 band and making sure no special characters in password or wifi SSID name. - It will not connect to Rogers Infinite WIFI (rogers is a canadian provider their service is called infinite
  2. I have tried to flash chip several times /some times it will load and soem times it will not (not sure why)
  3. Related to the some times - when the WLED-AP loads soem times it loads to the colour wheel selector page and other times it looks like it loads and includes the User mod for stairs and then other times it will load the UI for user mod for stairs and then it will INSTANTLY flip back over to colour wheel selector.

Is there a more detailed readme that talks about each setting and how to set it up. I am having troubles. Please know I am not a coder/ developer and REALLY trying to muddle my way through this.

When I uploaded Binary i got this in my ESP-Home Flasher log report
Showing logs:
[23:42:04].pio/libdeps/esp32_staircase_mod/LittleFS_esp32/src/lfs.c:1076:error: Corrupted dir pair at {0x0, 0x1}
[23:42:04]E (13) esp_littlefs: mount failed, (-84)
[23:42:04]E (15) esp_littlefs: Failed to initialize LittleFS
[23:42:04]Ada

  1. when I run this api command in the browser - “http://wled-board2.local/json/state” I get the following can any one tell me in plain english what each one of these settings are and where they are in the UI?

{“on”:true,“bri”:128,“transition”:7,“ps”:-1,“pl”:-1,“staircase”:{“top-sensor”:false,“bottom-sensor”:false},“nl”:{“on”:false,“dur”:60,“mode”:1,“tbri”:0,“rem”:-1},“udpn”:{“send”:false,“recv”:true},“lor”:0,“mainseg”:0,“seg”:[{“id”:0,“start”:0,“stop”:798,“len”:798,“grp”:1,“spc”:0,“of”:0,“on”:true,“frz”:false,“bri”:255,“cct”:127,“col”:[[203,219,255],[0,0,0],[0,0,0]],“fx”:0,“sx”:128,“ix”:128,“pal”:0,“c1”:128,“c2”:128,“c3”:16,“sel”:true,“rev”:false,“mi”:false,“o1”:false,“o2”:false,“o3”:false,“si”:0,“m12”:0}]}

If there is any detailed tutorial to help me get this set upI’d appreciate it:

  • do I set he lowest step as step zero
  • How do I tell it to go up and down?
  • My leds data direction arrow go from right to left, on top stair then left to right on the next stair down, then right to left and so on - so a the data wire was the shortest possible length between steps

-Can each step be a segment with a different stair on it? Do I HAVE TO have a different segment for each step or is that only for certain effects?

I’m trying to create an effect but not sure how…

I want the step to light from outside edges to centre pause then go from centre to outside edge - then advance to next step

step 1
—> |<----
<pause 1 second>
<----|---->

—> |<----
<pause 1 second >
<----|---->

any one give me anyadvide how I may do this?

Feature request:
The ability to select several effects and put them in to a randomizer - so one time the stairs do ‘x’ and a another time they do ‘y.’

I am in the process of doing this project also. Inherent in the WLED code for a staircase Is for each staircase step to be a segment . the program is designed to light each step all at once (although your idea of center-out would be interesting, and requires a lot of programing IMO). Your comment about top-to- bottom or bottom-to-top is already built into program and is regulated by the activation of each motion sensor; if top sensor activates, the lights start at top and work down. The timing is controlled in the usermod website. After so many seconds the light will start to turn off, again depending on the motion detectors. If you made it to the bottom, then the lights turn off going down, but if you turn around halve way down, then they will turn off from bottom to top. The delay between steps are again controllable in usermod on web page. The programming is masterful. Further all that wonky API coding: who cares: you never type that in; set up your 15 segments, pick your effect and color and set it to a preset. Or set several and create a Playlist, save it and all that wonky API code is automatically input. For me the easiest part of this project was preparing the esp32, the hard part has yet to come, since i don’t have access behind the existing staircases and the staircases are open on each side (I’m doing 2 flights). A lot of wire fishing thru small holes. Good luck and have fun!

1 Like

wow that’s going to be a challenge… I was lucky mine was open at the back … and i could drill through stringer - I had a lot of wiring issues - but i actually think it was faulty led strips … and a bad power supply to boot - so a bit frustrating. I have them working now but not as SEGMENTS the patterns do flow through each step but not with a long enough pause between steps… I am not sure the patterns reverse depending on sensor… i will try to set up segments - I like the idea of a play list … I think i have a lot more tinkering and playing …

hey guys. i am pulling my hair out:

in the documentatation it states:

Connect the ESP8266 pin D4 or ESP32 pin D2 to the first LED data pin at the bottom step.

i am running the AZDelivery ESP32 “d1 mini wroom” and the is no such pin as “D2”. can someone tell me that pin that corresponds to in a normal pinout?

see Nettigo: WiFi+Bluetooth module ESP32 D1 mini [Yā nǔ shén] for reference

‘d2’ is just what may be printed on some boards. You need GPIO numbers. From the page you linked there is an image showing the pin-out:


The default choice is IO16.

*make sure you set the IO port you choose in LED Preferences.

https://kno.wled.ge/basics/getting-started/

Anything with Green OK’s should be ok (aside from the ones listed as input only). ESP32 Pinout Reference: Which GPIO pins should you use? | Random Nerd Tutorials

Hi Jinx,

thank you for your quick response. I know how to run WLED on this exact controller (in fact i use IO17 at the moment and WLED itself works perfectly fine - i can control the LED’s without any issues), but as far as i understood, this plugin uses not the default PIN configured in the settings, right?

at least i am not able to trigger the staircase effect. If i trigger the upper or lower sensor via API (which responses me “success”, nothing happens. Maybe i use the plugin wrong?

It uses the same PIN you have configured. If WLED itself works it looks like the mod is not enabled?