Hello,
I have been using Raspbmc for a while now and just ungraded to OSMC in order be able to use a hifiberry digi, this, however, caused problems with my setup.
My Pi B+ is connected to a projector and for sound output to a stereo. As I like to use sleep in front of the TV, I installed a 433Mhz-sender, that would switch off the stereo (through a 433Mhz controlled power plug) once the Pi was shut down through a timer… This worked perfectly fine with Raspbmc, but stopped working after setting it up on OSMC.
I installed the 433Mhz-software following the following instruction:
As it is in German, I briefly summarize what I did:
sudo apt-get update
sudo apt-get install git-core
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build:
cd ~
git clone git://github.com/xkonni/raspberry-remote.git
cd raspberry-remote
make send
In order to make “make” work, I had to install gcc, g++ and make itself.
To this point all worked perfectly fine and I am able to switch my power pug using the following command:
/home/osmc/raspberry-remote/send 00001 1 0
In order to make my Pi use that script at shutdown, I did the following, which worked on Pasrbmc but not on OSMC.
I created a script called “sendremote”, which looks like this:
#!/bin/bash
### BEGIN INIT INFO
# Provides: Schaltet die Steckdose ab.
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop: 0 1 6
# Short-Description: Kurze Beschreibung
# Description: Längere Bechreibung
### END INIT INFO
# Author: Name <email@domain.tld>
# Aktionen
#
case "$1" in
start)
/home/osmc/raspberry-remote/send 00001 1 0
;;
stop)
/home/osmc/raspberry-remote/send 00001 1 0
;;
restart)
/home/osmc/raspberry-remote/send 00001 1 0
;;
esac
#
exit 0
I copied this script to /etc/init.d
sudo cp sendremote /etc/init.d
Then I made it 755
sudo chmod 755 /etc/init.d/sendremote
And then I used the following command to make this script stop and runlevel 0, 1 and 6
update-rc.d tc_un_mount stop 02 0 1 6
This tutorial was taken from this German website and, as I said, worked for Raspbmc.
https://debianforum.de/forum/viewtopic.php?f=34&t=123447
It does not work on OSMC however. When using the last command I got this back:
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
I looked into the /etc/rcX.d folders of the runlevels I copied it to and in all of those I found “K01sendremote” but somehow the script is not been used that shutdown, it does not work…
Can somebody please help e to make it work?
Thanks a lot!