Shutdown script please for rpi3b Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
PatriciaP
Posts: 4
Joined: Fri Jan 29, 2021 10:33 am

Shutdown script please for rpi3b

Post by PatriciaP »

I am trying dietpi rpi3b for logitech media server to manage server and player for my hardware squeezebox classic.

I wrote the dietpi image and configured it headless with putty on windows 10.

Two ssd drives are mounted on the rpi3b and they are mounted after pulling the plug. I need to switch the pi off as these drives are not powered down even when LMS is off.

I did have to rescan as some of the folders were missing.
How can I trigger poweroff or shutdown in putty or better yet an iOS app?
Rpi3b / Squeezebox Classic / Windows 10 / iPhone
User avatar
Joulinar
Posts: 4804
Joined: Sat Nov 16, 2019 12:49 am

Re: Shutdown script please for rpi3b

Post by Joulinar »

Hi,

on command line you could use poweroff or shutdown. But physically your board will be still powered. But this has nothing to do with DietPi, it's a behaviour of SBC in general. For this you would need a physical power switch on the power adapter or a case who will take care on this.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
PatriciaP
Posts: 4
Joined: Fri Jan 29, 2021 10:33 am

Re: Shutdown script please for rpi3b

Post by PatriciaP »

I need a command that would end processes and service so that there is less chance of “losing” my folders after I unplug the rpi3b.

Sounds like I will rely on the putty commandline as Lms doesn’t control the raspberry pi.

Thanks for your help
Rpi3b / Squeezebox Classic / Windows 10 / iPhone
User avatar
Joulinar
Posts: 4804
Joined: Sat Nov 16, 2019 12:49 am

Re: Shutdown script please for rpi3b

Post by Joulinar »

Probably better to check on a LMS specialized forum if you like to control the device out of this stack
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
PatriciaP
Posts: 4
Joined: Fri Jan 29, 2021 10:33 am

Re: Shutdown script please for rpi3b

Post by PatriciaP »

Poweroff did shut down the connection on Putty, and the drive turned off after two minutes.
That’s a good result, as the rpi3b draws very little power in this state.
Rpi3b / Squeezebox Classic / Windows 10 / iPhone
PatriciaP
Posts: 4
Joined: Fri Jan 29, 2021 10:33 am

Re: Shutdown script please for rpi3b

Post by PatriciaP »

Joulinar wrote: Fri Jan 29, 2021 3:26 pm Probably better to check on a LMS specialized forum if you like to control the device out of this stack
Dietpi isn’t known on the best squeezebox forum for some reason. I am really enjoying the flexibility of the Dietpi os, but I only had to install the music drive, alsa and change the server to OpenSSH to get what I wanted.
The other dedicated music os’ were very buggy in my experience.

The downside is that there isn’t a developer on Squeezebox forum that works on Dietpi.

The poweroff preserved my settings and shut down both rpi3b and network player. That’s the squeezebox Classic.

I reestablished connection by unplugging and plugging in; both player and lms came online with the last stream ready.

Any chance of getting power on from the terminal?
Rpi3b / Squeezebox Classic / Windows 10 / iPhone
PDXpi
Posts: 13
Joined: Fri Apr 12, 2019 11:17 pm

Re: Shutdown script please for rpi3b

Post by PDXpi »

PatriciaP wrote: Fri Jan 29, 2021 6:05 pm I reestablished connection by unplugging and plugging in; both player and lms came online with the last stream ready.

Any chance of getting power on from the terminal?
It is also possible to boot the RPi 3B by briefly shorting GPIO pins 7 & 8. e.g., I awaken my sleeping RPi by closing the gap between GPIO pins 7 & 8 using a small flat head screwdriver.
Eric P.
Portland, Oregon
User avatar
Joulinar
Posts: 4804
Joined: Sat Nov 16, 2019 12:49 am

Re: Shutdown script please for rpi3b

Post by Joulinar »

Any chance of getting power on from the terminal?
No, this has nothing to do with DietPi. By default it's simply not possible to power on a RPi from remote. To have an RPi powered on/off remotely, you would need some remote control hardware or the screwdriver :lol:

https://www.instructables.com/Raspberry ... e-Control/

As an alternative, you could use a smart home plug to power cycle your RPi

Personally I'm using a PoE switch to be able to power cycle my test devices. So I don't have to go to the technic room always 8)

BTW: DietPi is not an own OS. It's a set of scripts on top of a base image. In case of Raspberry Pi, base image used is Raspberry OS. DietPi is an extrem slim/diet version of Raspberry OS with a reduced amount of packages.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply