How to turn on/off OSMC

Hi all,

I am curious if there is a way (even doing some electronic hack) to add power on/off button to OSMC.
I found this article:

but I do not know if it is reliable?

My main problem Is that I usually shutdown Kodi from web UI. But Raspberry led is still on after shutdown. Then I disconnect the cable. Sometime happen that I reconnect the cable, led red turn on but Raspberry does not startup, so I have to disconnect/reconnect cable several time.

I have Raspberry connected to power and HDD connected to Raspberry USB (I have max_current=1 to support this connection).

Any idea?

This is now enabled by default and doesn’t need to be set in config.txt anymore.

There are some solutions for adding a power switch, but the cost of any solution is higher than that of any power you may save.

Hi,

The problem is not the power saving. I am not interested in it.
Just a reliable way to turn of Raspberry in safe way.

Select Shutdown from Kodi or run shutdown -h now is safe.

:slight_smile:
I appreciate the jokes :slight_smile:

I don’t understand.

If either of those options are not safe for you, something else is problematic.

I was jocking, your suggestion was quite obvious :frowning:.
With this I mean that obviously I was aware that I could do a shutdown -h now command :slight_smile:

Just leave it on man…It doesnt consume a lot of power. Set up a screensaver on it and just leave it on. I wouldnt play with the GPIOs…especially if you are planning to do this on/off all the time (+2 times every day).
If the red led is bothering you, there is a way to turn it off by editing the config.txt. I’ve done it with mine, and now only when the pi is doing something i got the yellow led on, otherwise it is completly dark.

If you still want to create something to power it off, then i would suggest you make a relay on/off switch.
Example: Adding An On / Off Switch To Your Raspberry Pi • Pi Supply Maker Zone
I made something similar to control a fan, to cool down the pi in the summer:
http://www.instructables.com/id/Automated-cooling-fan-for-Pi/

or you could just buy a something ready like this:

I have mine hooked up to a remote controlled power outlet. It was $25 bucks, but I now have full control of the PI from my phone.

I used a momentary button and this video https://youtu.be/AQkN9tkXbYs to setup the “On” button for my Pi 3. It’s as simple as connecting to the shown GPIO pins, then wiring or soldering to the button. If you have a breadboard I’d try it out first, then go for a permanent setup if you like it. Just make sure you use the shut-down option from the power menu first, after the green LED stops press the button, it’ll start right up.

update: Using Sonoff

I cut an extension cable in the middle. Screwed one end on the left side, one on the right thus making a wifi extension cable. You can turn it on/off from your phone and it even has timer settings if you want.