DE: "Eine in JAVA geschriebene Anwendung überwacht verschiedene Sensoren (Telefon -Innovaphone-, Fritz!Box, Türsensor) und schaltet dementsprechend die Musik (Player: MPD, XBMC oder VLC) auf stop/pause oder play."
EN: "A Application written in JAVA monitors various sensors (Telephone -Innovaphone-, Fritz!Box, doorsensor) and switched accordingly the music (player: MPD, XBMC or VLC) to stop / pause or play."
We/I used it in our office until 2019. ;)
- Felix W.
- Tobias H.
- Network connection between the devices
- installed Java 8 and set environment variables JAVA_HOME
-
Download the latest release of TelefonWahnsinn-jar-with-dependencies.jar in a folder or build your own jar-file with Eclipse and Maven
-
create a config folder, in this folder download the configuration file called config.xml.example and rename it in config.xml. Example content:
<wahnsinnsConfig> <sensors> <sensor type="telephone" name="Phone1" ip="10.112.1.1" username="user" password="password" ></sensor> <sensor type="telephone" name="Phone2" ip="10.112.1.2" username="user" password="password" ></sensor> <sensor type="telephone" name="Phone myself" ip="10.112.1.3" username="user" password="password" ></sensor> <!--<sensor type="fritzbox" ip="192.168.178.1" name="FritzBox"></sensor>--> <sensor type="gpio" name="Doorsensor" pin="4" ></sensor> </sensors> <player type="mpd" ip="localhost" port="6600" password="password"></player> <!-- <player type="xbmc" ip="localhost" port="6600" username="user" password="password"></player> <player type="vlc" ip="localhost" port="8080" username="" password="password"></player> --> </wahnsinnsConfig>
- Make your settings
- start it with:
java -jar TelefonWahnsinn-jar-with-dependencies.jar
- Network connection between the devices
- installed Docker:
sudo curl -sSL https://get.docker.com | sh
sudo usermod -aG docker pi
# create config folder
mkdir -p /home/pi/.config/telefonwahnsinn/config
# download example config (with wget)
wget https://raw.githubusercontent.com/Tob1as/TelefonWahnsinn/master/config/config.xml.example -O /home/pi/.config/telefonwahnsinn/config/config.xml
# edit the config and set your settings (see above)
nano /home/pi/.config/telefonwahnsinn/config/config.xml
# start
docker run --name telefonwahnsinn \
-v /home/pi/.config/telefonwahnsinn/config:/config:ro \
-v /sys/class/gpio:/sys/class/gpio:ro \
-d tobi312/rpi-phonemadness:latest
If you want use the doorsensor, then use a Raspberry Pi and magnetic contact (DE: Magnetkontakt/Reedkontakt) e.g on GPIO Pin 4.
RaspberryPi GPIO Settings:
sudo nano /etc/rc.local
- copy next lines before: exit 0 and then reboot
echo 4 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio4/direction
Fritz!Box (Internet-Router) need active CallMonitor #96*5*
(Port: 1012) or see here.