Scott Hanselman

Adding AirPlay to a Receiver without an Apple TV - Raspbmc and the Raspberry Pi

August 6, '12 Comments [45] Posted in Hardware | Open Source
Sponsored By

My Onkyo Receiver now supports AirPlay with a little help from Raspberry PiI'm continually amazed at the usefulness of a small but complete $35 computer that is the size of a deck of cards. I'm coming up with all sorts of uses for the three Raspberry Pi devices in our house. I talk about our experiences in Top 10 Raspberry Pi Myths and Truths, but right now I want to share what I did with a Raspberry Pi over lunch today.

I've got a lot of video on my iPad and iPhone and I've always wanted to be able to use "AirPlay." Basically AirPlay is a simple way to "throw" video or music at a device. I'm always plugging my iPad into the TV with an HDMI cable.

At some point in the future more receivers and TVs will include AirPlay built-in. I could buy an Apple TV for $99 as it includes AirPlay. However, I don't want AirPlay $99-dollar-bad. Maybe $35-dollar-bad. Since a Raspberry Pi with Ethernet is $35, ahem. It's on.

Back during the original Xbox days when folks were rooting their Xboxen left and right, the most useful thing you could install on it was XBMC. It turned your Xbox into a complete, flexible and modular Media Center. Fast-forward almost 10 years to today and XBMC is an ecosystem on its own, long separated from the Xbox. You can get XBMC for Android, even! There's XBMCs for Mac, Linux, Windows, iOS and more. Even Apple TVs themselves can be rooted and run XBMC.

The most promising new entry into the XBMC space is Raspbmc. Yes, a complete XBMC install for a the tiny Raspberry Pi. The most amazing part is the clean Windows installer for Raspbmc in my opinion. You run it on your Windows machine with an SD card plugged in and the installer does all the work of downloading, formatting and prepping your SD Card to run on the Raspberry PI. The whole operation took a few minutes. Then I put the SD Card in the Pi and waited maybe 15 and then I was looking at the boot screen. Very painless.

Raspbmc is full featured and virtually includes all the XBMC functionality - which is an amazing feat given the limitations of the hardware. The most recent Raspbmc Release Candidate 4 added a lot of new improvements that made this the perfect time to jump in.

I just want AirPlay, so note that while there's WAY WAY more in Raspbmc and XBMC than this ONE feature (and technically I could probably make a very stripped down distro that included only this one feature if I wanted to be a purist) I'm only interested in AirPlay. I want AirPlay with a high WAF (Wife Acceptance Factor.) That means she needs to press a button on the Receiver, hit play on her iPad and it needs to Just Work©.

After installing Raspbmc I used a USB keyboard to go into the System > Network menu and checked "Allow XBMC to receive AirPlay content."

If you want to use your iOS or Android device as a remote control to control your Raspbmc you can ditch the keyboard after initial setup. There are iOS and Android versions of the Official XBMC Remote. Just make sure you've enabled your Raspbmc in System > Network to be controlled by a Remote application. If you are feeling extra snazzy you can even get a real remote control and use one of those via USB IR. Perhaps you have a remote control lying around from an older Xbox or ATI Video Card like I did.

After setup, I needed to setup video, power, and networking. Here's what I ended up with.

  • Video - Just plugged a 3 foot HDMI cable from the Raspberry Pi directly into an unused HDMI on my Onkyo Receiver. I used the "PC" input as that would make sense to my wife, then I used the Onkyo setup to make the onscreen label say "AirPlay."
  • Power - I was going to pull a long USB cable to the Pi when I realized that I have a lot of devices (PS3, Xbox, Tivo, etc) that already have USB. I used a 2 foot USB cable and just leached power off the Tivo's built in USB! If your cable box's USB can do 500 mA you can likely do the same! Amazing.
  • Ethernet - I wired the whole house many years ago and actually did a 5 Part Series on my blog about wiring your house for Ethernet. Because I put in a small wiring closet I could adjust ports as I like. I changed an RJ-45 phone port into an Ethernet port at the closet, labeled it, and plugged in. If you don't have wired ethernet near your TV, you can either put in a Hub, a Wireless Ethernet Bridge or get a USB Wireless Adapter for the Raspberry Pi.

My Raspbmc hidden behind the TVMy iOS device says it's throwing video at the Raspbmc

Here's my little Pi behind the TV, and my iPad saying it's playing video on the "XBMC raspbmc."

Using my iPad as a Raspbmc XBMC remote controlWatching "Justified" on my HDTV via AirPlay on an iPad talking to a Raspbmc

Here's me using an iPad as a remote (although since I'm just throwing video at it, I won't need the remote except for configuration, and I'll SSH into the Pi to do system updates) and finally watching 1080p video on my TV, at last.

Because any video app within the iOS ecosystem gets AirPlay support this also means I can throw YouTube videos or whatever HTML5 video I find up on the TV as well. All for $35 and a lunch hour. Such fun!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Productivity vs. Guilt and Self-Loathing

August 2, '12 Comments [56] Posted in Productivity
Sponsored By

Pomodoro TimerThe guilt can be crushing. Everyone seems to be getting stuff done, except you. You drag yourself out of bed, go to work, start checking email, start deleting, then poof, it's noon. Lunch, perhaps at your desk, then some awful meetings, then it's 3pm. You start REALLY working, then you start feeling decent but then it's 5pm or 6pm. It's time to start getting home. You feel like you didn't really get a lot done today so you'll work late - just tonight - to catch up.

The not getting stuff done sucks, but the guilt and self-loathing is where you really get into trouble. You likely don't say it out loud, but you think it. You might not tell your spouse, but you think it. I suck. Man, I suck. I'm just not getting a damn thing done.

Sometimes I feel like this. I've talked about feeling like a Phony before. Folks say that Einstein felt like a phony and that was motivating. I'll let you know if that's true next time I revolutionize science, but for now, I still get down on my self for not getting stuff done.

I don't have the answers, nor do I have a proper "system." My system is always changing, and I've decided that THAT is the system. I adapt. If it's not working, I'll change it. I encourage you do to the same.

At WebStock I did a talk that I'm mostly proud of called "It's not what you read, it's what you ignore" and I like to point people to this video as a decent place to start when thinking about productivity. My system is a combination of thinking from Stephen Covey, David Allen, and J.D. Meier's Getting Results. All of these systems are highly recommended and I've pulled much of what I know from them and then synthesized my own ideas.

Here's what I do when I'm feeling non-productive and guilty. Again, watch the video for more details, it's not selling anything and I go into more detail. I need to just write a small book on this..

Stop Checking Email in the Morning

The quickest way to time travel into the afternoon is to check email in the morning. Time-box your email. Set aside an hour for email, and do that hour. Try to get work done before lunch in order to set yourself up for success and feel better about your day. Getting something awesome done before lunch is a great way to stop guilt. Email is the thing that we turn to because it FEELS like we're getting work done but unless it's truly focused project email, it's usually just pushing bits around.

Don't make Guilt Piles

You know that pile of books that you'll never read that sitting next to the computer you are reading this blog post on? That pile is too tall. You'll never read all those. That pile of books is a monolith of guilt. It's a monument of sadness and failure. Pick the book or two that you can read this week and put the rest away.

If it's important, Schedule It.

If you really want to read a book, catch up on HTML5, watch a video on Python, or learn to cook, schedule it. You schedule an hour for a  meeting at work and you show up, why not schedule an hour in your work day to read. If you boss asks you what you're doing, you're doing technical research on a project. You're sharpening the saw. Schedule time for you rather than trying to find time for yourself within a schedule you've setup to help everyone else. Make time for yourself as well as relationships.

Measure, then Cut

You can't decide what to stop doing unless you know what you're doing. I recommend Rescue Time as a great lightweight way to measure what you are up to, and when you review your numbers you can hold yourself accountable. If you know where you spend your time you can decide what your time is worth. We thought that hiring a guy to cut the lawn was too expensive, but when we realized that it was totally stressing me out, we measured, then cut and we're all happier. Are there meetings you can NOT go to? Are there projects you are unable to do to the best of your ability? Are you over-committed? Hope is not a strategy. Make appropriate cuts - saying No is your most powerful tool.

Do smaller things

Paint House is too big and too stressful for a single item on your TODO list. Break it up like Select Color, find Paint Store, Buy Paint, etc. Focus on the Rule of Three. Three Successes for the day, for the week, for the month, for the year. Have a Vision for your week on Monday and Reflect on that Vision on Friday. Find a small thing that you can do in a small amount of time and do it. Accomplish something small, anything and that will buoy you forward to the next thing.

Let go of Psychic Weight

List out all the things that weigh you down and find out how to let them go. I used to  get stressed by the shows I wasn't watching or the books I wasn't reading or the blogs I couldn't keep up with. Seemed like everyone else was able to keep up but me. But I let it go. I don't argue on Twitter and I don't try to read every blog post. I have never watched Lost and I don't worry about watching the news. Doing less - and more of it - is the only way to scale.

Schedule Work Sprints

It's hard to focus all day. You don't have to and stop being mad at yourself for not being able to. Rather than beating yourself up, trying focusing for just 25 minutes. Just focus on one thing for 25 minutes. When you're done, you'll get a 5 minute break to do whatever you want. Sprint. Run your day like a mini-Scrum. Try the Pomodoro Technique. It's free and easy and it is a great tool to increase your focus.

Stop Beating Yourself Up

Don't feel so bad about not getting enough stuff done. Eat well, sleep well, say NO more often and try your best. Remember you can always make a small change in your system and try again tomorrow.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Top 10 Raspberry Pi Myths and Truths

July 30, '12 Comments [64] Posted in Hardware | Open Source
Sponsored By

Two little boys on a Raspberry PIFirst, let me go on the record as saying I'm a huge Raspberry Pi fan. If you haven't heard already, a Raspberry Pi is a small but complete $35 computer (or $25 without Ethernet). It's a complete 700 MHz ARM CPU with a GPU and 256MB of RAM. It has two USB ports, Ethernet, Audio as well as video out over RCA (Composite) or HDMI at 1080p. It uses an SD Card for its hard drive and takes 5V at >700mA of power over a mini USB. You can order one from Farnell online and there is a waiting period.

All that said, I wanted to talk about some misconceptions one might have about these amazing little devices.

Raspberry Pi Myths (Debunked)

  • It runs Windows 8 - And that's OK. It's a 700MHz Broadcom BCM2835 ARM11. It's a little underpowered to run Windows (not to mentioned totally unsupported) but it can run a lot of different stripped down Linux distributions like Debian or Fedora. The current recommended distro is Raspian and you can download a Raspbian image directly from Raspberry PI and write the image to an SD Card using Win32DiskImager.
  • It's a great email and browsing appliance - It's too slow today for anything but the most basic of browsing. The current browser available is Midori but it slows down with any complex JavaScript or sufficiently complex HTML DOM. Honestly, it's not a laptop or living room PC and it's not trying to be.
  • It's a breeze to setup - Ok, it IS easy IF everything works. It's actually easy until it's totally not easy and then it's almost always a hardware or power problem. What do I mean by this? Well, the idea with the Raspberry PI is that it uses parts and equipment you likely already have. It doesn't even come with a power supply! They figure - rightly so, I think - that you already have a 5V micro-USB adapter laying around your house so why spend money on another one? Good thinking, except a Pi needs power at at LEAST a 5V and 700mA. The former is easy, but the latter is tricky. I had literally 10 USB adapters and only two could do over 500mA. One did 700mA and the other a full 1A. I am not saying panic, but I am saying that the forums are filled with questions and concerns over flaky behavior. I even had to hook up a multimeter and check the voltage over their two (thoughtfully located) voltage test points. I would say that if you have and know how to use a multimeter than you should totally get a Raspberry PI. But if you are a teacher who has the idea that you'll fill a classroom with fast, cheap, reliable and easy to manage PCs, the Pi isn't the answer. It's cheap and fun, but it's not quite plug and play yet. One other point of note, NONE of my wireless keyboards or mice worked, and this is being talked about on the forums as well. The PI can handle only 100mA of draw on each of the two USB ports (get it? ~500mA for the PI and 100mA each for the two USB ports) and some devices pull more than 100mA. Some keyboards have little USB hubs of their own, like the Apple Wired Keyboard and they can't be driven by the PI alone. Expect to need a USB hub for any external drives or devices. I tried 3 different hubs before I had success with the Belkin USB 2.0 7 Port Hub. I also ended up getting a cheap Mini USB wired keyboard and cheap USB wired mouse. The Pi may be $35 but you'll spend another $75 if your parts on-hand don't work. Moral of this story? check all your parts against the Raspberry Pi Verified Peripherals list.

Raspberry Pi Truths

  • Raspberry PI in a LEGO CaseIt supports 1080p video - Yes, it's good a very nice little GPU on it, and hopefully future versions of the little Linux distros will take better use of it. For example, offloading some of the X-Windows work onto the GPU would make it feel a little snappier.
  • It's easy to overclock - It's modest, but it's overclockable. I took it from 700Mhz to 900Mhz just by running
    sudo nano /boot/config.txt
    and changing arm_freq=700 to arm_freq=900 as well as adding sdram_freq=500. If you mess it up, just edit the file on the SD Card on another computer. Be aware you can also "overvoltage" but you'll void the warranty immediately.
  • It's a complete Linux machine - It really is. You don't need to use it for anything they expect you to use it for. If you want to install Fedora Remix and make it a little NAS with an attached USB hard drive, feel free. You can make it a tiny web server or use it as a little VNC client while you VNC into your work at 1080p from your 42" HDTV.
  • It's a Media Center with AirPlay - You can run an XBMC fork called RaspBMC that puts together a Debian Linux distro with most of the power of the well-known and open source XMBC media center system. Most importantly, it has AirPLay support so a RaspBMC-running Raspberry PI can be the easiest and cheapest way to throw wireless video on your giant TV from your iPhone or iPad. It doesn't do MPEG2 but it does play MPEG4 and h.264.
  • It is great for learning to code - It not only runs Python but it will run anything that a tiny ARM machine can run, even Mono and .NET! The Raspian default distro of Linux includes Python 2 and Python 3 IDEs and is easy to script.
  • It's a fun educational PC for little kids - With the addition of the GCompris software suite you've got dozens of games and activities that cover everything from math to reading, science to geography.
  • It's a gaming machine - I can say it runs MAME and SCUMMVM pretty darn well and if you check out the forums you'llf find a very interested community with ambitious plans.

The Raspberry PI is a tiny little joy. The boys are having great fun with it and frankly I'm happy that it's hard. I don't want them using an Xbox or some "easy" technology. They are using espeak from the command line to get the computer to talk to them and are learning how to read. As they get older I hope we'll start trying out some of the hundreds of other uses for these tiny devices.

We spent all day today building a LEGO case then found a clever design online as well. The little Pi community is having such fun and I think it's because of the device's constraints. It's small, it's cheap, but it's got such potential. If you are aware of it's limitations and are armed with a little patience, you'll have a blast introducing your kids to the Raspberry PI.

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Free ASP.NET Training Videos from aspConf now available for download or streaming

July 26, '12 Comments [15] Posted in ASP.NET | ASP.NET Ajax | ASP.NET Dynamic Data | ASP.NET MVC | Open Source | Speaking
Sponsored By

There's lots of goodness happening in the .NET and ASP.NET community right now. If you're not plugged in, you can follow ASP.NET on Twitter or Like ASP.NET on Facebook and we'll keep you up to date with all the great goings-in. You can visit, bookmark and subscribe to the newly revamped and oft-updated ASP.NET website. The new site is lovely on various phones and pads and has loads of content, both textual and video as well as HOURS of free training videos from Pluralsight. There's also an excellent Daily Community Spotlight on the home page there you can also subscribe to in Google Reader that is curated by our very own Jon Galloway.

The ASP.NET Webstack is Open Source now as is the Entity Framework. There's goodness happening from the new MS Open Tech organization and there's also the burgeoning goodness from the newly-created "Monkey Square" non-profit, the same organization that runs the Monospace Conference (follow MonkeySquare on Twitter) started by Joseph Hill, David Nielsen, Dale Ragan, Louis Salin, Phil Haack, and myself, dedicated to open source on .NET. If you haven't registered for Monospace, consider it, as it's a high-signal, low-noise boutique open source .NET conference out of Boston this October. You could even speak!

Download or Stream all these ASP.NET Conference videos and training sessions for free.

But, enough of that, let's talk about videos and education. Just last week we held aspConf, a a free, virtual conference dedicated to ASP.NET organized by and for the community, and all free. It was the sequel to mvcConf and mvcConf 2 and was this year expanded to two full days of great content on the entire ASP.NET platform. There were over 60 presentations from amazing speakers both inside and outside of Microsoft. I was fortunate enough to present the teams' and my vision for "One ASP.NET" in this silly keynote that was presented from the comfort of my home office to over 1200 of you Dear Readers.

aspConf 2012 is now a collection of videos for you to download or stream online in all the usual formats. There's dozens of them to check out and they are excellent. Some of my favorites are:

  • Next Generation Visual Studio Web Tools - Building websites has become more and more important for most businesses worldwide, and with the introduction of HTML 5 we now have more possibilities than ever. Join Mads on a journey through the features of the upcoming version of ASP.NET and Visual Studio to get a sneak peak on the new abilities ...
  • Introduction to the ASP.NET Web API What is REST? and a RESTful API? How does the ASP.NET Web API fit in? How does the ASP.NET Web API work? How can it be consumed by clients such as ASP.NET MVC, Win8/Metro, etc.? In this session, John discusses how to get up and running with the ASP.NET  Web API thorugh practical examples.
  • Async in ASP.NET Async is here and it's awesome, but how do you leverage for maximum affect in a server environment? When should you use async and what shouldn't you do to avoid headaches? Hear from the ASP.NET team about async support in ASP.NET, the features, the pitfalls and most importantly the use cases that ma...
  • Modern Web Development  In this talk, Shawn will walk the attendees through the new way that web applications are being built today using the latest in client-side development the best practices of how to carry that out with ASP.NET MVC.
  • Ask the Experts - Here's your chance to get answers to your deep technical questions about SignalR, MVC, Web API! With Damian Edwards, Brad Wilson and Marcin Dobosz.

Have fun!


Sponsor: My personal thanks to DevExpress for sponsoring this week's feed! Check out their new stuff, it's amazing! DXperience 12.1 helps you realize your creative vision. Beautiful design and rich user experiences are at the center of the modern development conversation. From iPads to mobile phones, focus on great design. Try Now.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Is Daddy on a call? A BusyLight Presence indicator for Lync for my Home Office

July 19, '12 Comments [27] Posted in Lync | Remote Work
Sponsored By

Daddy is busyConsider this the first in a series of posts on using Lync effectively as a Remote Worker.

I've blogged about building and wiring my home office, working from home remotely, and even done a video with Chris Sells and Rory Blyth walking through the house ("Geek Developer Cribs"). Last week I put my Lync 2010 Super Simple Auto Answer Video Kiosk with Full Screen on GitHub. That software replaces the "Embodied Social Proxy" software I was running before. That solution was too complex.

I've got folks in Seattle who are interested in my "presence" and I've also got folks here at home who are interested. Specifically, it's a problem when my kids don't realize (or respect) that Daddy is on a conference call or that Daddy is recording a podcast. It's a problem even for my wife who has recently gotten in the habit of texting me from outside the door to see if I was busy.

I had an old radio On Air light that kind of worked but I never hooked it up to Lync, which is my primary source for presence and availability. Since Lync is also available on iPhone, iPad and Android, it really is the best way for anyone inside the company to know if I'm "available."

I'd consider building a system with LEDs and Netduino but the folks at BusyLight beat me to it. The BusyLight is a nice simple plug-it-in-and-forget-it light that integrates with Lync to provide a visual indicator of my presence. It installs itself as a USB HID (Human Interface Device) so it's likely possible to talk to it directly and make a presence system for other IM clients like GChat or Skype.

Lync availablity is broadcast to all clients

Any system I put in place needs to just work. I don't want to have to click anything more than I already do. I don't even bother to set Lync's status myself because it does a fine job of doing it on its own. It automatically marks me as busy when I'm in a meeting or presenting or on the phone. If I leave my computer for a while it turns yellow to indicate I'm away. When I do need to change it manually (for recording a podcast, for example) I can also just use my iPhone. Any change in my availability from my iPhone is automatically (and instantly...like 100ms instantly) broadcast to all my Lync devices including the BusyLight and my Polycom CX600 IP telephone.

I combined the USB BusyLight's already super-long USB cable with a 16-foot USB2 Active Repeater Cable in order to get all the way down the wall, over and up into the corner of my door. The BusyLight included a 3M adhesive and it's happily stuck up there and the door still closes easily.

The BusyLight changes color instantly as Lync presence changes Daddy is not busy

I will also be taking a BusyLight up to my remote office and hooking it up so that folks can see when I'm "in the office" or available for a call.

So far I'm thrilled with the results. I recorded a podcast today and I could hear the boys outside whispering to each other "ssh, it's red! Daddy's on the phone!" Ok, I could hear them, but at least they made an effort!

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.