Volumio – Audio Media Player – Remote Control

I have been using Volumio on Raspberry Pi since Volumio version Beta 1.1 and I am happy with it that I can play my FLACs and MP3s directly from my home Free4NAS server via SMB mounts.

With my recent home audio upgrades, I want to control Volumio with remote control so I look for that info on the web.

https://volumio.org/forum/how-installed-lirc-with-receiver-and-remote-volumio-t360.html
https://volumio.org/forum/using-remote-with-volumio-t1923.html

My MCE remote is Rosewill RRC-126: http://amzn.com/B003WM5J0O

Installing lirc package:

 > ssh pi@volumio
 (password is raspberry)
 > sudo apt-get update
 > sudo apt-get install lirc

Testing:

 > mode2 -d /dev/lirc0

Now, if you press any button on the remote, you should see a bunch of pulse/space messages.

Editing /etc/lirc/hardware.con:

 > sudo vi /etc/lirc/hardware.conf
 
 # /etc/lirc/hardware.conf
 #
 # Arguments which will be used when launching lircd
 LIRCD_ARGS="--uinput" 
 
 #Don't start lircmd even if there seems to be a good config file
 #START_LIRCMD=false
 
 #Don't start irexec, even if a good config file seems to exist.
 #START_IREXEC=false
 
 #Try to load appropriate kernel modules
 LOAD_MODULES=true
 
 # Run "lircd --driver=help" for a list of supported drivers.
 DRIVER="default"
 # usually /dev/lirc0 is the correct setting for systems using udev
 DEVICE="/dev/lirc0"
 MODULES="mceusb"
  
 # Default configuration files for your hardware if any
 LIRCD_CONF=""
 LIRCMD_CONF=""

Now we need to learn lirc with IR commands:
http://lirc-remotes.sourceforge.net/remotes-table.html

 > sudo /etc/init.d/lirc stop
 > irrecord -n -d /dev/lirc0 ~/lircd.conf

Now copy this newly created lircd.conf

 > sudo mv /etc/lirc/lircd.conf /etc/lirc/lircd.conf.orig
 > sudo mv ~/lircd.conf /etc/lirc/lircd.conf

(for my Rosewill MCE USB dongle remote, I am using mceusb.lircd.conf)

Now start lircd

 > sudo /etc/init.d/lirc start

Testing Config file:

 > irw

Creating .lircrc file:

 > vi /home/pi/.lircrc
begin
  remote = mceusb
  button = KEY_PAUSE
  prog   = irexec
  config = mpc toggle
end
begin
  remote = mceusb
  button = KEY_NEXT
  prog   = irexec
  config = mpc next;mpc play
end
begin
  remote = mceusb
  button = KEY_AGAIN
  prog   = irexec
  config = mpc prev;mpc play
end
begin
  remote = mceusb
  button = KEY_STOP
  prog   = irexec
  config = mpc stop
end
begin
  remote = mceusb
  button = KEY_PLAY
  prog   = irexec
  config = mpc play
end

Running irexec as a background process:

 > irexec -d

Adding irexec to rc.local to startup after every reboot:

 > sudo vi /etc/rc.local
 (add this before exit 0)
(sleep 3;
sudo -u pi irexec -d
)&

Reboot

[HowTo] perl on Windows – ActivePerl

I am a huge fan of perl scripting language and I have scripts that I want to run on Windows and I use ActiveState’s ActivePerl

ActiveState ActivePerl

During installation, do not change any of the settings, just take all of the default settings and install.

ActivePerl comes with a great tool to manage modules – Perl Package Manager(PPM)

Here is PPM repository for PerlMagick: http://www.bribes.org/perl/

Here are some of the perl modules that I install for my own use:
Image/Magick.pm
Image/ExifTool.pm

Also jhead.exe is needed for JPEG header manipulation – http://www.sentex.net/~mwandel/jhead/

ImageMagick(http://www.imagemagick.org/) also needs to be installed. I had no luck with Dynamic Link Library due to the mogrify.exe giveing “Wrong JPEG library version: library is 70, caller expects 80″… I had to use Static build binary…

[HowTo] ATV2 Removing XBMC Completely

I have been using various devices for home media center and ATV2 is one of the devices that I own.

It has been a while since I have been using XBMC on ATV2 and today, I decided to upgrade it with Kodi.

Instead of upgrade, I have chosen to remove previous installation of XBMC and going with the clean installation of Kodi 14.x

Here is the instruction on how to remove XBMC completely from ATV2:

 apt-get remove org.xmbc.xbmc-atv2
apt-get autoremove
rm -fR /private/var/mobile/Library/Preferences/XBMC
rm -fR /private /var/stash/Applications/XBMC.frappliance

[MSO] Annoying auto language switching

I have Korean language enabled on my Microsoft Office 2013 and in Word/Excel, when I type in something in English that are not in the dictionary, The AutoCorrect would kick in the converts it into Korean!!! Very annoying!!!

Here is how to turn that off:
1. Go to File
2. Options
3. click on Proofing on the left panel
4. click on “AutoCorrect Options…” button
5. under “AutoCorrect” tab, uncheck the box labled “Correct keyboard setting”

AutoCorrectOff

[rPi] Raspberry Pi – New Toy – Installation

JP gave me a Raspberry Pi Version B with 512MB RAM.

http://www.raspberrypi.org/

Quick Start Guide: http://www.raspberrypi.org/wp-content/uploads/2012/04/quick-start-guide-v2_1.pdf

Formatting Tool: https://www.sdcard.org/downloads/formatter_4/

Images: http://www.raspberrypi.org/downloads

I used “NOOBS (offline and network install)” iamge onto a 8GB SD Card for installation.

1. Download the SD Formatter 4.0(link above) and install
2. Insert a SD Card 4GB+
3. Run the Formatting Tool
3a. Make sure the correct drive is selected
3b. Click on the Options and select “FORMAT SIZE ADJUSTMENT”
3c. Click OK
4. Click the Format button
5. Unzip the downloaded NOOBS image(link above)
6. Copy unzipped files(all) onto the root of the SD Card
7. Insert the SD Card in the SD Card Slot on the Raspberry Pi
8. Power up the Raspberry Pi with at least HDMI, USB Keyboard connected

By default, NOOBS will output over HDMI at your display’s preferred resolution, even if no HDMI display is connected. If you do not see any output on your HDMI display or are using the composite output, press 1, 2, 3 or 4 on your keyboard to select HDMI preferred mode, HDMI safe mode, composite PAL mode or composite NTSC mode respectively.

1. HDMI mode ­ this is the default display mode.
2. HDMI safe mode ­ select this mode if you are using the HDMI connector and cannot see anything on screen when the Pi has booted.
3. Composite PAL mode ­ select either this mode or composite NTSC mode if you are using the composite RCA video connector
4. Composite NTSC mode

[Mac/OSX] iTunes/Mail Broken Korean Fix

Yet another better/easier method:

App Language Chooser

 

This should set the default language to Korean on iTunes only:

defaults write -app iTunes AppleLanguages "(ko)"

 

On OSX with English as the default language, Korean letters will be broken on the iTunes and Mail and here is how to fix that:

defaults write $(mdls -name kMDItemCFBundleIdentifier -raw /Applications/iTunes.app) AppleLanguages "(ko, en)"
defaults write $(mdls -name kMDItemCFBundleIdentifier -raw /Applications/Mail.app) AppleLanguages "(ko, en)"