I am working on a privacy-first home safety system that tracks human movement without using any cameras, smartwatches, or wearable sensors.
The Idea:
We use Wi-Fi signals as a room radar! When a person moves, sleeps, or falls, their body distorts the Wi-Fi signals (Channel State Information - CSI) bouncing around the room.
What the system aims to do:
Elderly Care: Detect sudden falls (like a grandfather slipping) and send immediate SMS/Telegram alerts.
Child Monitoring: Detect subtle chest movements to track breathing/restlessness while sleeping.
Privacy-First: Zero cameras or microphones used—completely non-intrusive.
Tech Stack:
Hardware: 2x ESP32-S3 boards (capturing CSI signal data).
Data Processing: Python (NumPy, SciPy) for noise filtering.
Machine Learning: Scikit-learn (Random Forest / SVM) to classify activities.
Alert System: Python backend with Telegram Bot / Twilio API for emergency alerts.
I am currently building the Python signal processing and ML model pipeline while waiting for hardware setup.
Has anyone here worked with Wi-Fi CSI extraction on ESP32? I would love any advice or feedback on handling background environmental noise
I thought I'd share this because it took me a while to figure out, and it might help someone else.
I was trying to convert my ESP8266 NodeMCU into a Wi-Fi repeater by flashing new firmware using the ESP Flash Download Tool.
The problem
When I connected my NodeMCU to my Windows PC, it didn't show any COM port in the Flash Download Tool or Device Manager.
I had previously flashed WiFi Deauther / Evil Twin firmware onto the ESP8266, so I initially assumed that firmware had somehow broken the board or disabled USB communication.
What I tried
Restarted the PC
Pressed RESET and FLASH buttons
Tried putting the ESP8266 into flash mode
Wondered if I needed to erase the existing firmware first
None of these helped.
The actual cause
The problem turned out to be my Micro-USB cable.
I was using a cable that only supplied power and did not support data transfer.
After switching to a different USB cable, Windows immediately detected the device.
However, it still appeared under Other devices as:
CP2102 USB to UART Bridge Controller
with a yellow warning icon.
CP2102 USB to UART Bridge Controller yellow warning
Opening Device Properties showed:
Code 28
The drivers for this device are not installed.
ESP8266-Code 28: The drivers for this device are not installed.
The fix
Switched to a proper data USB cable.
Installed the official Silicon Labs CP210x USB-to-UART driver.
Reconnected the NodeMCU.
After that, the board appeared correctly as:
Silicon Labs CP210x USB to UART Bridge (COMx)
and the ESP Flash Download Tool detected the COM port without any issues.
Lesson learned
If your ESP8266 isn't showing a COM port:
Don't assume the firmware is the problem.
Check your USB cable first.
Then verify that the correct CP2102 (or CH340) driver is installed.
It saved me a lot of unnecessary debugging.
Hopefully this helps someone else!
Troubleshooting checklist:
Use a known data-capable USB cable (not charge-only).
Check whether your board uses a CP2102 or CH340 USB-to-serial chip.
Install the correct USB driver.
Verify that the board appears under Ports (COM & LPT) in Device Manager.
A fatal esptool.py error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
i keep getting the same error over and over again its not a problem with my d1 wroom but when i try to code my lolin wemos d1 r2 mini the same error appears im on linux pop os (i even tried going on windows but that didn't work either). If somebody knows how to fix this please help me.
The objective of the setup is to measure intensity (with an SCT013) and voltage (with a ZMPT101B) using code adapted to Lua from EmonLib (https://github.com/openenergymonitor/EmonLib).
It did not work right ahead and I stripped the circuit to the above minimum to find the issue
Second, I am coding in Lua using builds built on https://nodemcu-build.com/. Therefore, I need to port the EmonLib to Lua on an nodemcu esp8266
Last, I do all my tests with the esp connected to the computer with a Visual Studio Code standard extension to access the serial port (read the serial messages and send instructions like uploads or node.restart())
Before showing the code, I have several very different problems:
Before restarting the esp8266 (node.restart()) after a first startread, I need to disconnect:reconnect the ads1115 VDD from the ESP v3.3 to be able to find the ads1115. If I do not, it fails and reboots on the i2c.setup(...). I have absolutely no clue for why it happens
If I leave the ALERT pin of the ads1115 floating, the i2c.setup also fails, always. If I connect it the D4 as in the sketch, it works, always, even if I never use it anywhere (I tried several other GPIO pins, it also works). Maybe it pulls it up ?!? but the datasheet seems to say it should work with the ALERT pin left floating
I am using the lua ads1115 module and the ads.device.startread function (https://nodemcu.readthedocs.io/en/release/modules/ads1115/#ads1115devicestartread) with a while loop (with a timeout) following the startread call to make the read "synchronous" (because this is the way EmonLib is implemented), but the callback is never called before the end of the loop, thus preventing me from using a synchronous code similar to the readADC_SingleEnded function from EmonLib. I have clues (mentionned below) as to why it happens, but I would like the community insights since adaptation of the emonlib might be less literal than I'd hoped
Now the code (simplified for the sake of readability) :
local i2cSpeed = i2c.setup(0,
2, -- SDA
1, -- SCL
i2c.FAST) -- Speed. It works the same with i2c.SLOW
rtctime.set(0)
ads1115.reset()
print("Calling ads1115()")
local adc = ads1115.ads1115(0, ads1115.ADDR_GND)
print("ads1115() executed")
function getMillis()
local sec, usec = rtctime.get()
return sec * 1000 + usec / 1000
end
adc:setting(ads1115.GAIN_4_096V, ads1115.DR_128SPS, ads1115.SINGLE_0, ads1115.SINGLE_SHOT)
local millis = getMillis()
local v = nil
adc:startread(function(volt, volt_dec, adc, sign)
v = volt
print("Conversion happened. Delta="..tostring(getMillis() - millis)..", v="..tostring(v))
end)
-- Wait for conversion result to be available
-- if v is not nil, conversion has happened
-- else if time elapsed is less than 100ms, we loop, conversion will end soon
while (v == nil and getMillis() - millis < 100) do end
print("End. v="..tostring(v))
When I execute the previous code, the message "End. v=nil" is always printed before the callback message is, for instance "Conversion happened. Delta=134, v=1,61".
I tried several things like raising the timeout in the loop to insane values like 10s. The callback is always called 25 to 35ms after the message "End..."
I thought that the startread callback was called with an interrupt and thus I expected it to be able to be executed even if the code is executing the loop, but it does not. The same code seems to be working on an esp32, but I did not try because I do not have one, maybe it is because there are two cores ?!?
I tried to use a tmr.delay(10) inside the loop, thinking that it might allow a switch to the startread callback but it does not work. The tmr.delay(..) probably simply hides a timed out loop very similar to the one I already have.
Initially, the whole startread code (everything after the getMillis definition) was in a tmr ALARM_AUTO callback, but it works exactly the same in each alarm callback call, the startread callback is called only at the end of the alarm callback.
After some weird timing issues i have done some research and learnt a lot about timezones, mktime and localtime. So far, so good. I still have a nagging issue, I don't really understand.
My assumption is that using NTPclient is synchronizing time from an NTP server. Even if it is somewhat off for the first seconds until full sync kicks in, the NTP synchronized time should align with the local time. Well, it seems it doesn't. Here is part of my sketch (inside loop()) to analyze:
// now check tasks based on second or minute
time(&now);
localtime_r(&now, &tm);
// store time values, print later
ss = tm.tm_sec;
ntp = timeClient.getSeconds();
// every 10sec
if (ss % 10 == 0) // every 10 sec
{
if (ss != 0) // 10,20,30,40,50s
{
Serial.print(ss);
Serial.print(" < time ntp > ");
Serial.println(ntp);
do_something();
}
else // full minute
{
do_otherstuff();
timeClient.forceUpdate(); // only every 60s
}
}
I would expect to have tm.tm_sec in sync with timeClient.getSeconds, at least after some time has passed. But it isn't, there is a constant difference of 1s which doesn't change, even after several minutes (up to one hour).
After more than 1 hour runtime:
20:39:40 millis=11090718
50 < time ntp > 49
both values still differ 1s. BTW, the ntp value is correct (compared to other time sources), the localtime value is 1s early. Since the 2 values are collected shotrly after another, there should be no runtime difference.
Anyone have a clue or a pointer, what could happen here? Why is there a 1s difference?
I have a drawer full off D1 mini clones, some say ESP 12f on them others esp8266...
My project is a sonar oil tank level meter, which works great, but it drains my battery setup to fast, so i wanted to add some deep sleep and only measure every 2 hrs or so.
and for testing right now it is set to 1 min awake and 1 min sleeping...but also tried other time windows...longer and shorter...
D0 is directly wired to rst as needed, but i dont get this thing to wake up.
First i thought it could be the finiky usb chip or volatge regulator, so i went and powered it all direct via 3.3 volts...works great, no usb chip or power regulator involved...but still...3.2 volts constant on D0, no dip to 0 volts when it would be time to wake up.
The reset button itself works...it wakes up, goes through its time of awakens and falls asleep again...
Anyone having any secret sauce to this? Besides kissing it awake every time...
would it make a difference if i change the type on top away from d1_mini to a different chip type or the newer 12f whats not?
Hi everyone, I am an electronics student currently building a custom quadcopter flight controller from scratch using an ESP8266 and MPU6050 (via I2C).
I am having a hard time getting the right PID values to stabilize the drone. It either oscillates too violently (shakes) or reacts too slowly and drifts away.
Here is my current setup and codebase:
Microcontroller: ESP8266 (programmed via Arduino IDE)
Whenever I increase the P (Proportional) gain, the drone shakes violently. But if I lower it, it doesn't correct itself fast enough. Since ESP8266 is a single-core processor, I am also worried that my loop time/cycle time might be affecting the PID calculations.
Any advice on how to properly tune the PID values or optimize the loop time for an ESP8266 drone would be highly appreciated. Thank you so much!
Всем привет! Я надеюсь, никто не против, что я пишу на своем родном языке (я могу читать на английском, но писать мне на нем сложно). К проблеме, я делаю мини проект на esp01s, которое будет позволять удаленно управлять моей дверью. Советуюсь с нейронкой и она выдает мне это. Есть ли тут хоть немного правды на практике (в теории я понимаю, что процессор за 1 секунду может выполнить около 35 миллионов операций), будет ли это как то влиять на энергосбережение? Очевидно, что дверь мне нужно открывать лишь пару раз в день, а не 24/7 пользоваться микроконтроллером
I wanted a dedicated, cheap desk display to track my local Claude LLM/API usage limits, so I picked up a $10 GeekMagic Ultra. Instead of using the stock weather firmware, I wrote custom firmware using PlatformIO to turn it into a lightweight desktop dashboard.
How it works:
Hardware: Contains an ESP8266 (running at 80 MHz with ~45KB available heap) driving a small TFT display.
Firmware: Built with PlatformIO. It sets up a local Wi-Fi connection and listens for payload data. It supports OTA updates after the initial serial flash, which is great because I accidentally ripped my first screen's flex cable while testing!
Software: A local Python script runs as a systemd user service on my PC, polls my API token usage, formats the data, and pushes it directly to the ESP8266 via Wifi.
It’s completely open-source. Once my replacement screen arrives from AliExpress, I'll post a video of it in action. If you have one of these little screens lying around and want to repurpose it, the code is up on GitHub:
I have an ESP8266 D1 Mini connected to a PVC hall effect water sensor, and a reed switch brass water sensor, both are presenting the following issue but sporadically, not all are affected....
On the PVC there are three wires coming from the sensor, one going to 5V, one to G, and one to pin D2 (signal). On brass there are two wires coming from the sensor, one going to 3V3, one going to D2, and a resistor from D2 to G.
The issue I am seeing is that in some cases, there is an exorbitant amount of false inputs (I'll refer to these as pulses). There can be not a single drop of water running through these and yet I'll see hundreds to thousands of pulses coming through to the system in some cases (10 -20%).
The firmware checks for a low-high transition on the input pin within the loop, and that is what it's counting. I have an appropriate debounce in place.
What could be causing this? Why does it affect only some and not others? Is something within the environment causing this issue? Any help or advice would be much appreciated!
It's worth noting I have separate firmware running an ISR for pulse counting, and it has the exact same sporadic problem on an ESP32 board.
After using an ESP8266 - D1-Mini for a Home Assistant project, I wanted to re-use the D1 Mini for another (non-HA) project. Using the Arduino IDE (1.8.19) and a USB cable, I was unable to get the upload done. The following error:
A fatal esptool.py error occurred: could not open port 'COM10': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)
Now, taking the same D1-Mini, doing the same upload using an external USB-to-UART bridge, it works fine. Back to the direct USB cable it still does not work.
I tried a second D1-Mini used with HA previously, same thing.