A few week ago, I completed my first project: I have installed a raspberry pi zero W as a doorbell chime and it works relatively well. I’m not an expert on this kind of things, but I have just enough knowledge to make it works. Almost. The Raspberry Pi turn itself off automatically every 5 days or so. I don’t really understand why.
It’s probably some kind of power, heat or memory issue, but I’m not quite sure how to know for sure (or how to fix it). Is there any log on the rpi that might help see why it turned off?
If you have any ideas that might help me, it would be greatly appreciated.
///
Here are some details on my setup :
I currently use a Pi Zero WH (presoldered header) as a “dev” device (but I plan to solder some wires directly to a “normal” Pi W later).
The Pi run “headless” with the latest Raspbian Stretch “lite” on a 4 GB class 10 micro SD card.
I use a few jumper cables connecting the doorbell button to the pins 36/GPIO16 and Ground (6) (through a breadbox). A Python script detect button presses and play an audio files (WAIT_FOR_EDGE).
I also installed a small pushbutton on the breadboard connecting the pin 5/GPIO03 and Ground (6) to turn on the RPi when it is off. A python script also detect when it is pressed while the RPi is on to halt it, How to add a power button to your Raspberry Pi.
I plugged a USB speaker from Adafruit on the RPi. The volume is never over 50%, Mini External USB Stereo Speaker.
I use a sparkfun 5.1 V DC 2.5A wall adaptor power supply recommended by my local seller, Wall Adapter Power Supply - 5.1V DC 2.5A (USB Micro-B)
I also run homebridge with two homebridge plugins for my chime to be available on my iOS devices via HomeKit.
///
If I don’t find a better solution, i will probably program a reboot every night to mitigate the issue, but that does not seem like a “clean” solution. I’d like to fix the issue if possible.