Detect short power interuptions

Hello,

I’m not sure energy is the correct category, but I hope it is.

Since I have my HA yellow installed my home assistant suffers from monthly crashes and it doesn’t come up automatically. For it to come up I have to power cycle.

Now I’m thinking it might be a really short interruption from my power grid. I now noticed that around the last crash at least 2 esphome devices restarted and that doesn’t happen for no reason.

So my new guess is there is a really short power grid failure, long enough to make my HA Yellow crash, but not long enough to make it fully reboot? Is this possible?
Other devices won’t suffer as they may reboot, or hold the power a bit longer.

So I was thinking about installing a ups for my HA yellow
https://www.amazon.nl/-/en/BlueWalker-10120431-Powerwalker-Secure-Adapter/dp/B01649HDVE/ref=sr_1_34?crid=1PG5FVWH6IUGS&keywords=12v+ups&qid=1687266929&sprefix=12v+ups%2Caps%2C108&sr=8-34
this one has 2.1A while my current adapter has only 2A, so that should be ok. also the Yellow doc says 2A power should be applied.
I noticed that the new Yellow power adapter is 3A,

does anyone know why?

So at that point I keep my yellow alive,
but how to I track those really short outages?
I have some shelly plug S devices, but they only update every 10 seconds, so that’s not good enough.
I could check if suddenly a lot of devices become unavailable, however that could also mean a wifi issue.

Does anyone have any suggestions, thoughts, or ideas on this?

That might be because of a time out without api connection. The docs states the default timeout is 15min:

  • reboot_timeout (Optional, Time): The amount of time to wait before rebooting when no client connects to the API. This is needed because sometimes the low level ESP functions report that the ESP is connected to the network, when in fact it is not - only a full reboot fixes it. Can be disabled by setting this to 0s. Defaults to 15min.

So when HA is down for more than 15 minutes (and no other device connects to the esphome api in that time) a esphome node will do a intentional restart :arrows_counterclockwise:

It should’t - even less as the device is powered by DC and a typical PSU will even buffer a tiny bit of power. :pinching_hand:

Maybe try to track down the cause of failure before to be sure your investment actually can have a positive impact? :thinking:

There are good and bad PSU’s out there. And some good ones even turn bad over time :put_litter_in_its_place:
As this should be simple 12V PSU with the usual barrel jack you might be good to test with another power supply you own already. A 12V/2A=24W PSU should be good enough for a “normal” use case without peripheral devices on your yellow. :yellow_heart:

If you install esphome (shelly plug s template) on it you a free to choose your update interval for your devices and are not limited to what the manufactures thinks is good for you :wink:

It’s a tricky thing to debug but best catch might be to attach a monitor to your yellow and have it printing the logs (maybe the same can be achieved also over serial?). When your yellow “locks up” you should (in theory) be able to read the last line of the logs which might give you more clue why things go south :arrow_down:

1 Like

that beats the only reason I had for assuming it might be a power grid failure,

true, but I already added some checks, the annoying thing is that HAOS doesn’t write files back real time but with some delay to avoid SSD wear out. So I can’t relay on the logs, and when I check them there is nothing there. I already created push notification for certain issues like undervoltage, but never have I received any of those notifications. So either is doesn’t work or none of the scenarios are the case.

Good idea, the only problem is, I have this issue like once a month only, so when can I tell the issue is resolved? But I will check if I have any 2.0A adapters laying around. 12V I sure have, But still they need to provide enough power.

I know, I’m running tasmota on them right now, I run tasmota on all devices I cannot easy serial flash.
but even then. would it even be possible to measure something that takes 0.1 sec or something.

That’s a great idea, but annoying part is that the yellow has no interface to attach a monitor.
but according to google it is easy to add a serial logger over usb-C
https://yellow.home-assistant.io/guides/use-serial-console-windows/
https://yellow.home-assistant.io/guides/use-serial-console-linux-macos/

I have some unused pi zero’s laying around. if I can make is work to have the console log written to a file, something which gives me some struggle. I can see what the last message was before my yellow crashed.
that is a great idea.

thank you very much.

I attached an RPI3A following this manual
https://yellow.home-assistant.io/guides/use-serial-console-linux-macos/
and it works,
however

ha supervisor logs

just shows the logfile,

Does someone know if it is possible to have a scrolling log, the data you would see on another device when a screen gets attached?
next to that it would be great if one knows how to automatically save it. but first of couse I need the data.