had a bad storm 2 nights ago and lost power. home assistant is back up and running but all my entities are unavailable. i figured it was because the router reset and i never set static IPs but after trying to refllash nodemcu and d1 mini boards NONE will flash and i get a chip detection error. WTF! has this ever happened to anyone else? im assuming my boards are trash now but what can i do to prevent this from happening in the future? luckily i was still getting things setup and only had 5 boards running things but damn.
If it’s only the NodeMCUs that are not flashing and there was no other damage, check your USB to serial drivers.
For Windows: look in Device Manager / Ports when you plug one in.
nothing shows up when i plug them in. if i plug in a new board it shows up. all the ones that where being used when the power went out arent showing up. im not exactly sure what that means though.
Sounds like your power line got a big voltage spike.
It’s weird that it only damaged your ESPs though.
As to how to prevent it occurring again, if you live in an area where this occurs regularly you might want to investigate some surge filtering for your house’s incoming power supply.
Which is quite expensive (massive understatement).
Putting a 1.5KE8.2CA TVS diode across each 5V supply to the MCUs would be wayyyyyy cheaper.
It also depends what the MCUs are connected to. If you have long cables connecting to sensors you could be getting inductive or capacitively coupled energy from nearby lightning strikes.
I had something similar several times actually with d1mini’s running openmqttgateway. Didn’t effect any esphome devices (including other d1’s) or any esp8266-based wall switches which were a combination of tasmota and esphome firmwares. Never found a rhyme or reason to it aside from the openmqttgateway commonality but I do t see why firmware would have any correlation to who a device reacts to power outages.
If you are going to install surge protection I can offer some advice if you are N America based. I installed mine because we live near a substation, voltage is at high end, and surges were common. I was frying alot of z-wave switches.
This is the main panel surge protector (Siemans FS140) and it has worked flawlessly (US $300).
On my sub panels I installed Intermatic with replaceable surge (US $275)
This has eliminated surge problems from both inside and outside the panels.
This is not inexpensive but I lost a total of 9 switches fry, an irrigation controller, a garage door controller and the problems were increasing. It also stopped some flakey server problems.
I’m in the US and have the Eaton while home surge at the outside panel and it’s ended some “odd” issues we saw occasionally. They’re great for stopping surges that come in from the outside. The problem we’ve seen since is lightning. Luckily the house wasn’t damaged and we weren’t home when it happened but a bolt either went directly over the house or something. Neighbors said it sounded like it hit right outside between our houses. Lost a couple network switches, TV boxes and a 240v cooktop. Given the placement of these devices and the randomness of it as well as some oddities with a gas line I think there was either a giant static discharge from above the house into systems in the attic or it rode into the house from the outside on the natural gas line. I know gas lines are grounded but I don’t really have another more logical explanation.
If you have copper plumbing it can come in that way as well. Also, if it hit your grounding bed you can get a ground to line surge.
There is a way to protect against direct strikes, it involves rolling a sphere of a known radius (the statistical average segment length of lightning) over a drawing of your building, wherever the sphere touches you add a lightning rod. They are then all bonded together to a common and extensive earth system (not just a single earth rod).
All services entering the boundary of the protected structure must have lightning protection applied, that is power, phone, data, etc.
All earthing and metal structures must be bonded to the protective earth. This ensures that if your structure is struck by lightning (or there is a very close strike) then everything inside the protected structure rises to the same potential at the same time and no current flows.
Recommended surge ratings for protection zones:
- Define boundaries
- Protect structure
- Install bonded earthing system
- Protect power lines
- Protect signal and data lines.
* I worked in R&D designing lighting protection devices for 10 years.