[How-To] MPD-cloudshell and MPD extras

Guides and tutorials for various stuff. Posted by DietPi users.
User avatar
pilovis
Posts: 19
Joined: Sat Sep 29, 2018 4:32 pm
Location: Italy
Contact:

Re: [How-To] MPD-cloudshell and MPD extras

Post by pilovis » Sat Sep 29, 2018 10:02 pm

If I have enough time I will also post an How-to about a D.I.Y. Raspberry MPD i2c 20x4 LCD scrolling display.

My prototype:

Image
too old to rock 'n' roll too young to die.

User avatar
pilovis
Posts: 19
Joined: Sat Sep 29, 2018 4:32 pm
Location: Italy
Contact:

Re: [How-To] MPD-cloudshell and MPD extras

Post by pilovis » Sat Sep 29, 2018 10:22 pm

Sleep and Wakeup MPD radio

A crontab to automatically reduce audio volume at night (gradually) till stopping audio at late night

edit crontab:

Code: Select all

sudo crontab -e
insert the following lines at the end:

Code: Select all

0 22 * * * /usr/bin/mpc volume 93   #reduce volume 93% at 22:00
30 22 * * * /usr/bin/mpc volume 90  #reduce volume 90% at 22:30
0 23 * * * /usr/bin/mpc volume 88   #reduce volume 88% at 23:00
30 23 * * * /usr/bin/mpc volume 86  #reduce volume 86% at 23:30
0 0 * * * /usr/bin/mpc volume 84    #reduce volume 84% at 00:00
30 0 * * * /usr/bin/mpc stop        #stop audio at 00:30
note: change time and volume level as you wish

to apply crontab changes without reloading:

Code: Select all

sudo service cron reload
You might want to Wake Up at the morning, eg. at 7:00 AM from Monday to Friday, with the MPD Internet Radio playing your favourite station and stop music after half an hour (dead line to get out of the bed :D ),
simply add the following lines:

Code: Select all

59 6 * * 1-5 /usr/bin/mpc volume 93 # wakeup volume - adjust for your needs
0 7 * * 1-5 /usr/bin/mpc play # MPD starts playing at 7:00 - Mon-Fri
30 7 * * 1-5  /usr/bin/mpc stop # MPD stops at 7:30 - Mon-Fri
If you want to have an audible beep every exact hour from 08:00 AM to 09:00 PM even if the radio is playing music:

Code: Select all

00 08-21 * * * speaker-test -c1 -t sine -f 800 -P 2 -p 0.4 -S 10 -l 1;
too old to rock 'n' roll too young to die.

User avatar
pilovis
Posts: 19
Joined: Sat Sep 29, 2018 4:32 pm
Location: Italy
Contact:

Re: [How-To] MPD-cloudshell and MPD extras

Post by pilovis » Sun Sep 30, 2018 8:08 pm

I'm also trying to get the touchscreen working even if my raspberry hasn't got any desktop, just in console mode.
I would like to control the MPD_Cloudshell to switch scene, from "MPD" (default) to "System Information" and so on, every time the screen is touched.

Up to now I can grab the touch event in this way:

Code: Select all

sudo apt-get install evtest

Code: Select all

sudo evtest /dev/input/event1 | grep -o '(BTN_TOUCH), value 1'
Every time I touch the screen I get this:
(BTN_TOUCH), value 1
too old to rock 'n' roll too young to die.

User avatar
pilovis
Posts: 19
Joined: Sat Sep 29, 2018 4:32 pm
Location: Italy
Contact:

Re: [How-To] MPD-cloudshell and MPD extras

Post by pilovis » Mon Oct 01, 2018 8:53 pm

I am preparing a 8Gbytes, Raspberry Pi1/2/3, "ready to go" dietpi "MDP Internet Radio" image, with the following features, preinstalled and fully configured:

- MPD and MyMPD (client web interface)
- Alsa Equalizer (10 bands graphic equalizer)
- MPD-Cloudshell (see above)
- Raspi 3.2 Graphic LCD + 3 buttons, support
- i2c 20x4 text LCD, support
- Triggerhappy for USB numeric keypad support
- Infrared integrated remote control (Lirc)
- Mjpg-Streamer with both, USB webcam and Raspicam support, for live cam streaming
- Motion with both, USB webcam and Raspicam support, for triggering an action on a cam motion detected
- Battery RTC (real time clock) module support
- Sleep and Wakeup MPD internet radio
- Text2Speech (svox US,GB,DE,ES,FR,IT languages) Talking Clock (to speak the time) & Talking Reminder
- Automatic GPIO control for relay board to switch on/off the External Audio Amplifier on MPD start/stop (or anything else)
... and much more.

Everything is optimized for Raspberry Pi1B with 512 Mbytes RAM @ 1Ghz (overclock),

Stay tuned! ;)
too old to rock 'n' roll too young to die.

Post Reply