[Solved] VC button to shutdown the RPi

All the topics related to QLC+ on the Raspberry Pi
Post Reply
Mibmusic
Posts: 133
Joined: Sun Nov 25, 2018 7:55 pm
Real Name: Gerard van Hamburg

Sorry to ask but even after reading the documentation I still have no idea how to add a script containing a system command to shutdown the RPi. I would like to have a button on the VC to gracefully shut the RPi when I am done. Who can help me out?
Last edited by Mibmusic on Wed Dec 12, 2018 7:14 pm, edited 1 time in total.
User avatar
edogawa
Posts: 572
Joined: Thu May 07, 2015 10:34 am
Real Name: Edgar Aichinger

Isn't that a contradiction in itself? You cannot quit QLC without leaving run mode,which makes your VC widget inactive...

But if you're running Massimo's QLC+ image, that version of QLC has a configuration screen with buttons for reboot and shutdown.
Mibmusic
Posts: 133
Joined: Sun Nov 25, 2018 7:55 pm
Real Name: Gerard van Hamburg

I just thought that if you can run a script from within QLC+ that can start programs, it might be possible to run a script that shuts the RPI. We don’t use a monitor and we prefer to not use wifi either. If not, we will use wifi, or buy a shutdown button. I read some guy designed them.
User avatar
edogawa
Posts: 572
Joined: Thu May 07, 2015 10:34 am
Real Name: Edgar Aichinger

Yes, that may well be possible, I don't have experience in QLC scripting so you'll have to experiment yourself.

From the docs I see that there's a systemcommand keyword that you'll need. But it's not a trivial task, as shutdown is a superuser command, so you'll need to call it via sudo, and I don't see a way with scripting to enter your password...
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

QLC+ is ran at startup, so no sudo is needed.

Code: Select all

systemcommand:/sbin/halt
That's it
Mibmusic
Posts: 133
Joined: Sun Nov 25, 2018 7:55 pm
Real Name: Gerard van Hamburg

I got it and works great! Thank you so much!! QLC+ gives us exactly what we were looking for. Great job en I will post a link to a live video as soon as we’re ready.
Post Reply