George and Us

Oh, don't look so shocked.

This is what happens when I let the parakeets outside

leave a comment »

They were out on our patio in their bird cage for maybe 60 minutes when I noticed this friendly visitor.

(The parakeets are fine, by the way)

Link to bonus video:



Written by Peter R

September 2, 2017 at 8:59 am

Posted in All Posts, Colorado

Tagged with

Grim Fandango and Homeworld – Remastered!

leave a comment »

I am pretty old now, compared to most gamers. Two classic games from my ahem, second youth, are being re-issued as remastered versions so we can play them again with way better graphics. They’re probably both available for download somewhere on the net already but these releases will be both legal and completely awesome looking, compared to the originals. They were both always awesome games, amazing to play so adding better graphics should just make them that much better. Woot!


Grim Fandango Remastered –

Homeworld MohtershipHomeworld Remastered –


Written by Peter R

January 26, 2015 at 8:27 am

Posted in All Posts, Games, Software

Python + Bottle + PythonAnywhere = easy online web app creation

leave a comment »

What is it about weekends that they just really lend themselves to experimenting? I don’t know either. This weekend, I decided I’d spend some time with web development, so I assigned myself a task: create a simple web application which would have a single big text box at the top of the page which would allow the visitor to type whatever they want. Add a Submit button, allowing the user to save that text to a file on the server and then below that form, display all the text that has been entered so far. This is about as simple as a web form can get, I figured.


I wanted to use my slowly growing python skills for this little dynamic web page, so I looked around for a framework to use, since Python doesn’t create web page source natively. I looked at Tornado, Flask and a few others, but they all seemed like overkill for my very simple purposes. I¬† liked the way the Bottle home page made it sound very easy to create dynamic content so I decided to use it.

I knew my one page site / app was gong to need just one HTML page, and the only part of it that will be dynamic is the part which lists the previous entries, so I started by making a web page template. I used the very friendly, easy to learn Initializr to save time with this. Just visit the site, make a few choices on what type of page you’re looking for and then download the source files. You get an HTML 5 file, CSS and JavaScript all in one zip file. I spent about 30 more minutes removing the parts I didn’t want (including all of the JavaScript), adding the form, updating the colors in the CSS to liking and voila! Index.tpl (for a Bottle template) and supporting static files all set.

At this point, the site consists of these files:




Next, I created an empty file which would hold the text: ‘allthetext’. I created the app’s code file next too: ‘’. It doesn’t matter what you name that file, for this little app, since it will be the only one.

With Bottle then, the first thing you do is map out the “routes” or URLs you want the app to know how to handle. My app is the only thing this web site will be for, so my default route is just “/”. In the code, I knew I would have to handle both a GET of the page, which would be called when you first visit that path, and also a POST, which will be called when you submit some text in the form.

The GET just needs to display the web page, so that was easy:

from bottle import Bottle, debug, get, request, route, run, static_file, template

app = Bottle()
@app.route('/', method='GET')
def index():
    return template('index')


The POST though has to get the value of the form field named ‘textarea’ and save that into the ‘allthetext’ file. Python makes this really simple but I have one complication. I want the newest entry to be at the top of the file, and then include the rest of the entries from there on down. Here’s the code that does this:

@app.route('/s', method='POST')
def submit_form():
        bigtext = request.forms.get('bigtext')
        if (bigtext):
            new_text = ''
            current_text = ''
            current_file = open('allthetext', 'r')
            current_text =

            new_file = open('allthetext', 'w')
            new_text = bigtext + '\n------------------------------------------------------------------------------------------------\n'
            new_text = new_text + current_text


            return template("index")
            return template('index')


“S” is the Action of the form on the web page (index.tpl) so that’s the URL the code receives when you submit it. The logic here then just validates that we got some text from the form, and if so, opens the text file, writes the new text in there first, then writes all the older text back in as well. Close the file and re-load the page, and that’s about it. The HTML has python included which opens the file for reading, gets each line and adds that to the output, then closes the file.

I tested this locally and it works like a charm. One of the great things about Bottle is that it includes a development “server” out of the box, so you can test your work at your workstation even if you don’t have a web server running locally.

One thing that was not quite right at this pont was the static CSS files. The were not loading in the browser, as their paths were wrong. I added these Routes to the script to solve that:

# Static Routes
def javascripts(filename):
    return static_file(filename, root='js/')

def stylesheets(filename):
    return static_file(filename, root='css/')

@app.route('/', method='GET')
def index():
    return template('index')


That just tells Bottle where to look for any file ending with “.css” or (in case I add this in later) “.js”.

So, just to summarize, this is what happens when you first visit the site:

  • the URL requested is handled by the Bottle server
  • it reads my .py code to see what is needed.
  • my .py file says that for the “/” route, just send the template file (index.tpl) back as the response
  • inside that index file, I have Python code reading the contents of the allthetext text file and adding that to the HTML of the page before the browser sees it.

When the user fills in the big text box on that page and clicks the Submit button, this is what happens:

  • Bottle handles the request again, processes the POST request for the “/s” URL
  • Opens the allthetext file, adds the new text from the form field to the top of the file, appends the old text and saves the file again
  • send the index.tpl template again as the response
  • and so the user’s page refreshes with their new text content added to the page beneath the form field and button.

Another really useful feature of Bottle is that when it gets a Form in the request, it knows how to collect up all that data and will also scrub it for things like cross-site-scripting attempts and clickjacking. As the developer of a very simple web app like mine, knowing that I don’t have worry about this is great. Of course, if I were creating an application for production use, I would still very carefully parse the data myself to make sure no bad requests are ever processed.

The last step in my little experiement then was just finding a way to run this online, so I could access the page from anywhere at any time. I found PythonAnywhere, a cloud service which makes it easy to host Python-based web apps like mine. They can support a lot of frameworks too including Flask and Bottle and many others, right out of the box. They very kindly offer a free service for small simple apps and also offer paid services at various levels for folks who need more performance or more CPU / Database time.

I created an account at PythonAnywhere, created my web app, uploaded my files, tweaked them a little for things like paths used and bang! It works. I would recommend this service to anyone else trying out any of the pieces of software I’ve described here. Their documentation is great and gets you up and running very quickly.

I am thinking now about what to do to my little web app next, like maybe adding date and time stamps to each entry and so on, but it was fun creating a really nice looking, HTML 5 compliant, web-based program that I can now run from anywhere, and it only took a few hours. Thanks for all the free stuff that made this all possible: Initializr, Python, Bottle and PythonAnywhere!



Written by Peter R

January 19, 2015 at 4:31 pm

Posted in All Posts, Software

Arduino + 1602 LCD stopwatch project!

leave a comment »

I recently bought an Arduino Mega2560 beginner’s starter kit from MicroCenter and was looking for an interesting project to use it in. I wanted to use the 1602 LCD from the kit in the project, somehow. It occurred to me that I need a portable stopwatch for my Rubik’s Cube solving so that’s what I made today. It uses the Arduino for counting seconds, minutes and hours and displays the count on a 1602 (16 columns by 2 rows) LCD display. There is a pause button, for when you want to go get some coffee and a reset button for when you lose your focus and need to start over (which happens to me a lot when my kids are around…).

Parts list:

1 x Arduino (Uno or Mega or whatever you have is OK, but there are 8 pins + 5v and GND used here)

1 x1602 LCD display (any as long as it uses Hitachi compatible pins)

1 x potentiometer (I used a 50K Ohm one that came with my kit but usually 10K Ohms is recommended)

1 x breadboard with lots of holes

2 x 4-pin momentary switches (the kind that you click once and then they reset)

2 x 10K Ohm resistors (don’t ask me the colors for the bands; I am partially colorblind. No, really.)

1 x N4001 Diode  (to protect the backlight pin on the LCD)

tons of jumper wires (about 20 actually)

The Arduino sketch:

    #include <LiquidCrystal.h>

    // initialize the library with the numbers of the interface pins
    LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
    // input pins:
    int pausePin = 22;
    int resetPin = 8;
    // output pin:
    int ledPin = 13; 
    // time counting things:
    unsigned long previousMillis = 0;
    long interval = 1000;     // one second
    // pin state trackers:
    int resetButtonState = 0;
    int pauseButtonState = 0;
    int ledState = LOW;
    //de-bounce the switches:
    int lastPauseButtonState = LOW; 
    int lastResetButtonState = LOW; 
    long lastPauseDebounceTime = 0;
    long lastResetDebounceTime = 0;
    long debounceDelay = 50;
    // setup the pause tracker and stopwatch seconds counter
    boolean isPaused = false; 
    unsigned long secs = 0;
    unsigned long mins = 0;
    unsigned long hrs = 0;

    void setup() {
      lcd.begin(16, 2);    // the LCD has 16 columns and 2 rows 
      lcd.setCursor(1,0);    // put the cursor at the first column on the first row
      pinMode(ledPin, OUTPUT);  
      pinMode(resetPin, INPUT);
      pinMode(pausePin, INPUT);
      Serial.begin(9600);     // for logging on the PC

    void loop() { 
      Serial.print(" - Hrs: "); 
      Serial.print(" - Mins: "); 
      Serial.print("Secs: "); 
      Serial.print(" --- pause state: ");
      Serial.print(" --- isPaused: ");
      Serial.print(" --- reset state: ");

      pauseButtonState = digitalRead(pausePin);
      if (pauseButtonState != lastPauseButtonState) {
        lastPauseDebounceTime = millis();

      if ((millis() - lastPauseDebounceTime) > debounceDelay) {
        if (pauseButtonState == HIGH) {
          Serial.println("*******************   PAUSE   ***************************");
          if (isPaused == true) {
            // start again
            isPaused = false;
          } else { 
            //pause now
            isPaused = true;     

      resetButtonState = digitalRead(resetPin);
      if (resetButtonState != lastResetButtonState) {
        lastResetDebounceTime = millis();

      if ((millis() - lastResetDebounceTime) > debounceDelay) {
        if (resetButtonState == HIGH) {
          Serial.println("^^^^^^^^^^^^^^^^^^^^^^^^  RESET  ^^^^^^^^^^^^^^^^^^^^^^^^^^");
          secs = 0; 
          mins = 0;
          hrs = 0;
          isPaused = false;
          lcd.print("               "); 

      if (isPaused == false) {
        unsigned long currentMillis = millis();  
        if(currentMillis - previousMillis >= interval) {
          secs = secs + 1;
          if (secs == 60) { 
            secs = 0;
            mins = mins + 1;
          if (mins == 60) {
            mins = 0;
            hrs = hrs + 1;
          String theTime = String(hrs);
          if (mins >= 10) {
            theTime = theTime + ":" + String(mins);
          } else {  
            theTime = theTime + ":0" + String(mins);
          if (secs >= 10) {
            theTime = theTime + ":" + String(secs);
          } else {  
            theTime = theTime + ":0" + String(secs);

          // flash the LED for status...
          previousMillis = currentMillis;   
          if (ledState == LOW) {
            ledState = HIGH;
          } else {
            ledState = LOW;
          digitalWrite(ledPin, ledState);
        lastPauseButtonState = pauseButtonState;
        lastResetButtonState = resetButtonState; 

Initial hardware setup:

  1. Don’t connect the Arduino to power (your PC) until this is all setup.
  2. Drop the LCD onto the breadboard. I put mine over on the right side.
  3. Drop the potentiometer onto the breadboard away from the LCD.
  4. Jump wire from the 5V pin on the Arduino to the “+” rail on the breadboard.
  5. Jump wire from the GND pin on the Arduino to the “-” rail on the breadboard.
  6. Jump wire from the + rail to the left-most pin on the pot.
  7. Jump wire from the – rail to the right-most pin on the pot.
  8. Jump wire from pin “Vss” or #1 on the LCD to the – rail on the breadboard.
  9. Jump wire from pin “Vdd” or #2 on the LCD to the + rail on the breadboard.
  10. Jump wire from pin “V0” or #3 on the LCD to the middle pin on the pot.
  11. Diode from the + rail to pin “A” or #15 on the LCD.
  12. Jump wire from pin “K” or #16 to the – rail on the breadboard.
  13. Plug in the Arduino to your computer. (That’s right no sketch yet at this point)
  14. The LCD should be backlit if you did the “A” and “K” pins correctly.
  15. Adjust the pot’s knob. You should be able to turn it all the way down and then see a row of boxes on the LCD.
  16. If not, stop here and fix that. GIYF.
  17. Unplug the Arduino.
  18. Jump wire from pin “RW” on the LCD to GND on the breadboard.
  19. Jump wire from pin “RS” on the LCD to pin #12 on the Arduino.
  20. Jump wire from pin “E” on the LCD to pin #11 on the Arduino.
  21. Jump wire from pin #2 to pin “DB7” on the LCD.
  22. Jump wire from pin #3 to pin “DB6” on the LCD.
  23. Jump wire from pin #4 to pin “DB5” on the LCD.
  24. Jump wire from pin #5 to pin “DB4” on the LCD.
  25. Plug in the Arduino. Publish the sketch to your Arduino and watch it run.
  26. If everything is just right, you’ll see “Stopwatch:” and the time counting up on the LCD display.
  27. If not, pull your hair out and troubleshoot here before moving on. Curse a lot, it helps.

Add the switches to the board:

  1. Drop the two 4-pin switches onto the breadboard, spanning the middle valley.
  2. Name one of them reset and one pause in your mind. Keep them separate.
  3. Jump wire from the reset switch on the same side as the other components to pin #8 (or whatever you like) on the breadboard.
  4. Jump wire from the pause switch on the same side as the other components to pin #22 (or whatever you like) on the breadboard.
  5. Jump wire from the reset switch on the opposite side of the breadboard from the other components to the + rail on the breadboard.
  6. Jump wire from the pause switch on the opposite side of the breadboard from the other components to the + rail on the breadboard.
  7. 10K Ohm resistor from the other corner of the reset switch to another line on the opposite side of the breadboard from the other components.
  8. 10K Ohm resistor from the other corner of the pause switch to another line on the opposite side of the breadboard from the other components.
  9. Jump wire from from the reset switch’s resistor’s second line to GND on the breadboard.
  10. Jump wire from from the pause switch’s resistor’s second line to GND on the breadboard.
  11. Whew, that’s it!

LCD Stopwatch - Fritzing diagram

Close-up on the Arduino

Close-up on the pot and switchesClose-up on the LCD and wires

Run it!

With all of that wiring, connecting the LCD to the pot and he Arduino, and the switches wired to their own digital pins on the Arduino and to power and ground, you’re all set.

When you plug the Arduino back in, load the program if it’s not already there and voila! (Hopefully) The screen will show the stopwatch and start counting up. When you press the Reset button, the time should reset to zero. When you press the Pause button, the time should freeze, until you press Pause again.


I had trouble with the lCD not displaying the text I sent it at first. I found it was very lossly connecting to the breadboard, so I had to jiggle it and remove/replace it a few times until I could feel it going into the holes on the board properly and then it worked from there. If you have trouble, try this and then check online for other solutions. I rely on the kind folks at for lots of help and you can too.


If you try this out, let me know how it goes in the comments. Let me know too if you see any really significant improvements I could make. Thanks for reading this far.


Written by Peter R

December 6, 2014 at 11:55 am

Posted in All Posts, Arduino, Software

Playing around with Jabber on the Rasberry Pi

leave a comment »

Hi all, this is just a post about my experience today trying something new on my Pi. I have been looking for something my son could do with his Pi, as it’s been sitting on a shelf gathering dust for some time. I thought maybe it would be easy to set it up as a chat / Jabber / XMPP server so he and his buddies could chat whenever they like and so he would learn some about computer networking and Linux services and so on. The Pi is already running Raspbian as the OS so this seemed straight forward.

Here are the steps we followed:

sudo apt-get update 
sudo apt-get upgrade

(Just to get everything up to date in Raspbian land)

sudo apt-get install prosody

Prosody is the XMPP / Jabber server I chose to use, after reading about it and ejabberd online. They both offer lots of options but Prosody won out for its seemingly simple installation. I made that choice pretty quickly though, so I really don’t know ejabberd much.

cd /etc/prosody
sudo cp prosody.cfg.lua ./prosody.cfg.BAK
sudo nano prosody.cfg.lua

Now I needed to make a backup of the config file (LUA really) for Prosodyand then edit it. The server’s web site is very clear about most of this, so reference that if you need help:

First, you need to set up a virtual host name. This concerned me at first, as all of the examples given looked like real domain names, like, and I didn’t want to pay for any service like that (and I don’t own one already). I ended up just using my Pi’s name on the network, “firstpi” and that works fine as long as the clients are all inside the house.

Next, I enabled registration as its called, as that seemed the easiest way to get “accounts” setup on my new Chat server. Note to self — don’t forget to disable registration before opening the server to the full internet, or any oddball out there could also register an account for themselves!

sudo service prosody restart

… to make those config changes take effect.

Sure enough, now I have the Pi and Prosody listening on my LAN. I needed a Jabber client to connect to it with. I ended up using Gajim, since my laptops all run Windows and that worked out OK. It has a nice installer and runs OK for the most part. I have seen about six “An error just occurred…” messages in just a few minutes of playing with it, but it’s an Open Source project, so that’s OK.

In Gajim, I just added a couple accounts for me and my son. Creating the accounts in Gajim was easy (since I had the server setup to allow registration via the client) and before long, I was able to open a group chat room for my multiple accounts and chat. I named the accounts like, “dad@mypi” and “theboy@mypi” and Gajim found the server on its own.

I installed yaxim on my Android tablet next and again, setting up and connecting was easy there. It is limited to only one account in use at a time though, so that might be a concern for some.

Now we can chat at each other from our Windows laptops and Android tablets with ease. Next step will be setting this up so we can chat from outside the house as well.

The advantages of doing this are: we set it all up ourselves, it’s a private chat channel, we learned a little about networking along the way.


Written by Peter R

November 30, 2014 at 1:54 pm

Posted in Raspberry Pi, Software

Tagged with

Cron stopped sending emails; dead.letter file was a clue

with one comment

Quick post:

Today I realized that a few days ago I stopped receiving emails from the Raspberry Pi running the latest version of the Raspbian OS. I have Cron setup to run a couple of scripts on a daily or weekly basis and by default cron emails the results of those scripts to my personal email address. I realized those emails stopped coming a few days ago but couldn’t remember making any changes that should have caused this. Here are the steps I took to troubleshoot this:

1. Check crontab -l to list the jobs associated with my Pi login. They looked the same as always.

2. Run one of the scripts manually from the terminal. Yep, I get the expected result there.

3. Re-configure cron with crontab -l so the job will run in about two minutes. Wait three minutes… No output. Still no email. Hmmmm…

4. Notice there is a file in my Home directory named dead.letter that I never saw there before. Read up on what that is…

5. Look for logs in the /var/log. Notice that mail.log there has these entries:

May  5 13:13:08 firstpi sSMTP[10443]: Creating SSL connection to host
May  5 13:13:08 firstpi sSMTP[10443]: SSL connection using RSA_ARCFOUR_SHA1
May  5 13:13:08 firstpi sSMTP[10443]: Authorization failed (535 5.7.8 om5sm30207817igb.16 Рgsmtp)

6. Remember that I changed the password on this email account a few days ago!

7. Edit the ssmtp.conf file which stores the credentials for this email account and update the password in there. Save the file, exit, breathe a sigh of relief.




Written by Peter R

May 5, 2014 at 1:28 pm

Posted in Raspberry Pi, Software

Build a radio station in your home with Raspberry Pi

leave a comment »

Using a Raspberry Pi as a home music server (MPD)

RPi + Music = Awesome

I recently wanted to figure out a way to setup my own local streaming radio station in my house. Internet radio stations are cool, for discovering new music for instance, but I have a really large music collection here at home so most of the time I just want to listen to it. The problem I have though is that my music sits on a USB hard drive and that’s not connected to anything else. With some research, I determined I could setup my Raspberry Pi (which is a tiny computer running Linux) to let me have access to my 30GB + digital music collection from any other computer in my house. A very cool Linux program called MPD (Music Player Daemon) is a good fit for this purpose and it’s free, open source software so that’s a bonus for sure.

There are a few things I learned about all of this along the path of getting it all setup, that I wish I had known earlier on. First, MPD is a great tool for playing music from any Linux computer, but it cannot stream the audio it plays across a network on its own. Instead, MPD’s primary use is for¬† playing music directly to the audio hardware on the computer it’s running on. But fear not, we’re not defeated yet. The MPD output can be redirected to another application for streaming across the network. I chose to use Icecast2, another free Linux service, which knows how to take the audio signal coming out of MPD and send it across the network. The last thing I needed was a client to receive that data stream and turn it into beautiful music coming out of speakers or headphones. In my case, that’s Mpdroid, on my Android tablet. More on that later.

Note: I am not an audiophile. Most of my music collection is stored in low-quality MP3 files and I listen to it on cruddy headphones most of the time. If you really get into audio quality, you may not love the results here. They’re perfectly awesome as far as I am concerned.

Here’s what I ended up with then:

[My Raspberry Pi Model B] + [A USB hard drive for MP3 storage]
[MPD for controlling the playback of my music collection]
and my Android tablet running
[Mpdroid for controlling the music’s playback from my Android tablet]

Setup and configuration

Here are the steps you can follow to create your own totally home network music server

1. The Raspberry Pi requires an OS and the usual setup. I am using Raspbian, which came on the NOOBS SD card I setup. See this page for that —

2. Connect your Pi to the home network. I placed mine next to my home router and connected it using the built-in Ethernet port, but you could use Wifi instead. I think you’ll see a performance hit on playback if you do that though; try to use a cable instead of wireless if at all possible.

3. I plugged my powered USB drive into my Pi’s first USB port. To set this up, you’ll need to do some command-line configuration so your Pi recognizes the drive and “mounts” it (to use a cool Linux term). Those steps are well documented in many places. Search online for ‘Debian mount external usb drive’ to get help.

4. OK, after that last step, you should now be able to access your music files on the external USB drive with a path on the PI something like this: /mnt/myDrive/Music or whatever you setup when you edited the fstab (file system table file which remembers your drive’s path).

5. Next, you need some more software, so enter this command into a terminal to install MPD (server software), mpc (a client), and Icecast (the streaming software):

sudo apt-get update
sudo apt-get install mpd mpc icecast2

6. As that completes, you will most likely be prompted to setup passwords for Icecast. Do that here and now since it’s simpler than editing the configuration file later. Choose passwords as you are prompted and write them down (or pick something secure that you can remember) and choose your Icecast broadcast port. I chose to stick with the default – 8000. If you change that, just make sure you choose a number that’s not already in use on your Pi. Don’t use 6600 since that’s the MPD default port.

7. When the install is done, you’ve got some configuring to do. Enter this command into a terminal to edit the configuration file for the MPD service:

sudo service mpd stop                        <<stop the service before editing its config >>
sudo cp /etc/mpd.conf /etc/mpd.bak           <<always make a backup of a conf file before editing it! >>
sudo nano /etc/mpd.conf

8. Here’s my file, for your reference, with some notes added in so you know what I changed from the default file.

 music_directory         "/mnt/bigdrive/MEDIA/MP3"     # this is where my music files are stored on my USB drive
playlist_directory        "/var/lib/mpd/playlists"
 db_file                    "/var/lib/mpd/tag_cache"
 log_file                "/var/log/mpd/mpd.log"
 pid_file                "/var/run/mpd/pid"
 state_file                "/var/lib/mpd/state"
 sticker_file            "/var/lib/mpd/sticker.sql"
 user                "mpd"
 # I commented the bind_to_address. I don't honestly know why, but it didn't work till I did this!
 # bind_to_address        "localhost"
 port                "6600"
 input {
 plugin "curl"
 # This is how the MPD service will talk to the Icecast service
 audio_output {
 type        "shout"
 encoding    "mp3"            # optional, can also be "ogg"
 name        "Pi Shout Stream"
 host        "localhost"
 port        "8000"
 mount        "/mpd"
 password    "put your password here - don't copy mine"
 bitrate        "128"
 format        "44100:16:1"

9. Save that file in Nano by typing Ctrl-X, Y (for yes) and [Enter] to keep the same file name.

10. Enter some more commands to get MPD and Iceccast2 started:

sudo service mpd start
sudo service icecast2 start

11. Now then you have the MPD server accessing your music files and the Icecast service sending that audio stream out over your network to any client that wants to access it. So, next you need clients.

12. The Icecast broadcast is just like the old Shoutcast service, so there are a lot of client options here. Here are a few I am using, as examples, but do some searching for your OS / preferred platform and you’ll find lots more. Just remember – you may need a MPC-compatible client to control the music’s playback and also an Icecast/Shoutcast compatible player to actually hear the audio.

a. Web browser – that’s right, any web browser should be able to play your music now. What you need to do is get the mpc client on the Pi to play a song / playlist and then you can listen from any LAN connected browser, like this:

1. On the Pi:

mpc add                 << to add all of your music from the music folder in your Config file to the current mpc playlist >>
mpc play {####}         <<i.e., mpc play 1234 will play song 1234 in the playlist>>

2. On any home computer or tablet or smart-phone:

<< open a web browser, and enter this address:¬† http://{your pi’s IP address}:8000/mpd¬†¬†¬† or whatever port number you chose for Icecast >>

b. Linux computer:

1. Install an app like GMPC and point it to your Pi’s MPD port number (6600 in my case), which is different from the Icecast port.

2. Use GMPC to control the playlists and songs currently playing from the MPD service. (You won’t hear the sound from here though so keep reading)

3. Open a browser and point it to the Icecast port like in my previous example above, OR

4. Install something like RhythmBox (which comes with Ubuntu) and point it to the Icecast streaming port, just as you would any other Internet radio station.

c. Windows computer:

1. Just do the web browser trick above.

d. Android tablet:

1. Install Mpdroid from the Google play store.

2. Configure it to point to your MPD port number (6600 in my case).

3. Choose songs to play from Mpdroid whenever you like.

4. Check the “Streaming” check box in the settings if you want to listen to the music right here on your Android phone/tablet.

5. Or, open a browser on your PC (or Mac or whatever) and listen to the audio now streaming from there, using the ‘web browser’ instructions in a. above.

That’s about it. If you try this out, please comment here if I can add anything to these notes to improve them. Thanks for reading this far!


Written by Peter R

March 11, 2014 at 6:03 pm