[Solved] Volumio + Mausberry Switch

Get help for Volumio here!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

[Solved] Volumio + Mausberry Switch

Postby okok » Mon Dec 30 2013 22:53

thanks to yjo my mausberry switch is working!


1. Install Volumio 1.2 (or newer)
2. Follow the instructions for RaspBMC/Raspbian/Debian distributions on Mausberry Circuits without rebooting
3. sudo nano /etc/rc.local
4. change the last lines from
Code: Select all
exit 0
/etc/switch.sh &
to
Code: Select all
/etc/switch.sh &
exit 0

5. sudo reboot
6. enjoy!
Last edited by okok on Wed Mar 12 2014 15:53, edited 1 time in total.
Random avatar
okok
Sunday DIYer
Sunday DIYer
 
Posts: 11
Joined: Mon Dec 30 2013 22:44

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


Re: Volumio + Poweroff Button

Postby ronnicek » Tue Dec 31 2013 07:42

Which version are you using? There was a problem with version and shutdown command due to some kernel issues, could you try it with 1.1?
User avatar
ronnicek
Sunday DIYer
Sunday DIYer
 
Posts: 22
Joined: Sat Dec 21 2013 10:20
Location: Czech Republic


Re: Volumio + Poweroff Button

Postby okok » Tue Dec 31 2013 09:39

ronnicek wrote:Which version are you using? There was a problem with version and shutdown command due to some kernel issues, could you try it with 1.1?

I'm already on VolumioBeta1.1. :/
Random avatar
okok
Sunday DIYer
Sunday DIYer
 
Posts: 11
Joined: Mon Dec 30 2013 22:44


Re: Volumio + Poweroff Button

Postby yjo » Thu Jan 02 2014 12:38

Hi,

The power button control using GPIO requires a daemon for monitoring the event.
Usually, the daemon starts when the system starts up, and the setting is described in /etc/rc.local file (or appropriate scripts placed and registered in /etc/init.d/ directory).
The Mausberry kit also includes such a daemon (switch.sh) and the start of this daemon is registered in /etc/rc.local for most of Raspberry pi Linux packages.
However, in Volumio, /etc/rc.local file is overwritten when the system is shutdown (or restarted), so no one can automatically start the GPIO monitoring daemon by modifying /etc/rc.local file.

I am also worrying this problem...
Random avatar
yjo
Sunday DIYer
Sunday DIYer
 
Posts: 11
Joined: Thu Jan 02 2014 12:09


Re: Volumio + Poweroff Button

Postby michelangelo » Thu Jan 02 2014 14:11

Yes, the rc.local gets overwritten due to security mechanism. I'm building a new version, with security mechanism disabled... Just wait for that and then we can see how to get this sorted out...
User avatar
michelangelo
Founder
 
Posts: 2695
Joined: Sun Dec 15 2013 23:18


Re: Volumio + Poweroff Button

Postby vince » Tue Feb 04 2014 20:10

michelangelo wrote:Yes, the rc.local gets overwritten due to security mechanism. I'm building a new version, with security mechanism disabled... Just wait for that and then we can see how to get this sorted out...

Has the 1.2beta the security mechanism disabled?
I wish to try to get the power button working

thankyou
V
Random avatar
vince
Fresh off the boat
Fresh off the boat
 
Posts: 8
Joined: Thu Jan 23 2014 18:31


Re: Volumio + Poweroff Button

Postby yjo » Thu Feb 06 2014 13:24

OK, I succeeded.
Volumio overwrites /etc/rc.loocal with /var/www/_OS_SETTINGS/etc/rc.local file, when the system starts up.
By modifying the latter file as I would like, I did successfully auto-start the daemon that controls the shutdown button.
Random avatar
yjo
Sunday DIYer
Sunday DIYer
 
Posts: 11
Joined: Thu Jan 02 2014 12:09


Re: Volumio + Poweroff Button

Postby lucoot » Mon Feb 10 2014 19:14

Hi,
How do I modify that file and what part of it do I modify?


Thanks!
Random avatar
lucoot
Fresh off the boat
Fresh off the boat
 
Posts: 6
Joined: Mon Feb 10 2014 19:13


Re: Volumio + Poweroff Button

Postby yjo » Tue Feb 11 2014 07:28

First, I didn't try with the Mausberry kit, but with a more simple GPIO extension.
So the description bellow is "NO WARRANTY" and "IN YOUR OWN RISK".

Login as root.
Install the kit as usual under the instruction.
Run the setup script (http://files.mausberrycircuits.com/setup.sh)
after modification of the last line as
before: sudo sed -i '$ i /etc/switch.sh &' /etc/rc.local
after: sudo sed -i '$ i /etc/switch.sh &' /var/www/_OS_SETTINGS/etc/rc.local

Then reboot.
Good luck!
Random avatar
yjo
Sunday DIYer
Sunday DIYer
 
Posts: 11
Joined: Thu Jan 02 2014 12:09


Re: Volumio + Poweroff Button

Postby Elliott B » Tue Feb 18 2014 00:40

Another solution is to disable Volumio's "protection" of rc.local. I prefer this method, so that I'm free to edit rc.local again in the future without having to remember some weird location.
Code: Select all
sudo nano +1167 /var/www/inc/player_lib.php
Comment out these 5 lines by adding two slashes to the beginning like this:
Code: Select all
//       $a = '/etc/rc.local';
//       $b = '/var/www/_OS_SETTINGS/etc/rc.local';
//       if (md5_file($a) != md5_file($b)) {
//       sysCmd('cp '.$b.' '.$a);
//       }
Random avatar
Elliott B
Sunday DIYer
Sunday DIYer
 
Posts: 28
Joined: Thu Jan 16 2014 04:26

Next

Return to Help

Who is online

Users browsing this forum: No registered users and 0 guests