Onoff SHIM with PoE HAT

I am new here, but hope this is in the right place. I want to use the onoff SHIM with a POE+HAT. I have searched but cannot find anything answering this. Does the SHIM have to be powered via the micro USB to work or will it work with a PoE that effectively powers the Pi via the GPIO pins.


Won’t work, not the way its intended to work anyway. Pressing the button will have the Pi shutdown, but power won’t be removed. The On Off shim can only remove the +5V if its powered via its Micro USB jack. And the Pi isn’t going to boot back up when you press the button again.
Were you after the shutdown function, and or the remove power function?

Thanks - you confirmed what I suspected :) . I was after a safe shutdown via a button, rather than having to use the shutdown command.

That’s doable with just a button and some wires.
The following dtoverlay entry, when added to your config.txt, will have a Pi do a safe shutdown when GPIO 3 is grounded.
It won’t work if i2c is enabled though, in that case you need to use a different gpio pin.
I use the following with the button on my fan shim
pin=17 is GPIO 17 physical pin 11.

A normally open, momentary contact switch is what you use. A mini arcade button for example will work. One contact to the GPIO pin and the other contact to a ground pin.

1 Like

Thanks very much, I really appreciate the info and help. I will give this a try and see how I go.

I have several headless Pi setups with buttons wired up as above. Saves me from having to SSH in to shut them down.

If you shut down, and don’t remove the power. Grounding GPIO 3 will have the Pi boot back up normally. That works regardless of whether i2c is enabled or not. And no dtoverlay needed for the on function. If you don’t need i2c, and leave it disabled, one button on GPIO 3 can do both off and on.



I’m trying to achieve the same with a generic PoE Hat and on top of that the official RPi TV tuner.
Is this doable?

I’m not only interested in safe shutdown but powering the project on too with a momentary on-off button (if possible).

Many thanks!

May I ask if the alternate setting with GPIO 17 you created, will boot the Pi up too or is it only for safe powering down?

It only works for shutdown. GPIO 3 is the only pin that works for boot up. Other than the reset pin on the other header.

1 Like

Thanks again for your valuable help!