Welcome

Over the last several years I've been dealing with various stages of disability thanks to ALS. My goal is to share solutions and review various products/tools/devices that I have found particularly helpful.

Tuesday 25 June 2013

Raspberry pie versus Desktop

I know, I'm a bit overdue for a post. One of the reasons being is that I decided to try running a raspberry pie for my Siri proxy and have been occupied playing with that. Initially, I was just going to use the desktop that was arranged for me my friend. A Siri proxy is a great use for an old machine, and the one that was given to me was a beast in its day, grossly overpowered for my needs.

As you saw in the previous post about setting up a home automation system, the setup was reasonably easy. It did however require that at first the Ubuntu machine has a keyboard mouse and monitor hooked up to it. Once this is all done, I could fairly easily use VNC to connect to it. From there I can use all my assistive technology to do the installation I need. But the initial setup was a bit cumbersome for this reason only. Without hands that works very well, the required manipulation of the keyboard and mouse was challenging. The other thing is that the old desktop, being is overpowered as it was generated a fair bit of heat and consequently had a number of fans and to keep cool. The machine was a bit noisy.

So, for a friends birthday we thought a raspberry pie would be a perfect gift for him and on a bit of an impulse (also some encouragement from my girlfriend) I decided to order one for myself as well knowing it could be used as a Siri proxy. After all, this is how siri proxy first came to my attention with Elvis impersonators raspberry pie garage door opener.

I did need to help to set up initial wiring and plugging the SD card. But once that was done, set up was actually far easier than with the desktop, and not just because I'd gone through the process previously. Out-of-the-box, once the pie is plugged in it boots up by itself (no power button) it is set up to network into it immediately. No need for a keyboard, mouse or even monitor. Simply use putty.exe to get started. The raspberry pie is dead quiet. There are no fans, nothing to make noise. As a matter of fact it requires only 5 V to run this the 700 MHz, credit card sized computer. Pretty impressive, especially for just US$40.

Want to give it a try? Here's what you'll need…

I am presently running my pie headless (without monitor or keyboard) and am going to assume you're wanting to use the same here.We ordered everything from www.adafruit.com Here's the minimum parts that you will need to get started:
  • A raspberry pi model B. US$40
  • 5 V power adapter a micro USB cable. US$10
  • SD card for Raspberry Pi preinstalled with Raspbian Wheezy US$15
  • network cable.
And that's it! You can get a raspberry pi, Siri proxy server up and running for about US$65. I would however recommend also purchasing a case for it, it's always a good idea to protect and exposed circuit board. You can buy one for as little as US$10

I based this list on the starter pack listed on their website. I figured it was a good safe place to get a list of everything I would need. The starter pack includes a whole bunch of stuff for wiring and doing custom electronics, nothing I would need. Just for fun I also added a very small 4.3 inch TV monitor for an additional US$50, which I have yet to hook up. But my friend got one as well and he loves little thing.

Setting up your pi…

I chose to purchase the preinstalled SD card for pure simplicity reasons, it was only a little bit more expensive and I figured doing so would save many headaches of trying to manipulate the card between my desktop and the pie. My dexterity can't handle it anymore. This way I was sure of the install that would work right from the get go.
  1. Plug everything in (Duh). Make sure the SD card is properly seated, you have power and network. When the pi is booted (should take only a few seconds) you should be rewarded with several LED lights. Red yellow and green. If you are greeted with a solid read only, your SD card is probably not well placed. This happened to us. Unplugged the pie, reseat the card and try again.
  2. Find your pie on your network. In order to be able to connect to it remotely, you need the pi's IP address. You can find this fairly easily through most newer routers or you can using IP scanner.
    These are excellent instructions for your first time login using SSH
    Raspberry Pi SSH Login without Monitor
  3. Through SSH login, enter this command:
    sudo raspi-config 
    then follow this first time set up guide
    As mentioned, out of the box you should be able to network into your pi using SSH. However there are a couple things you will want to make sure you do:
    1. use your whole SD card
    2. check for updates
    3. check the boot behavior is set to desktop
    4. optionally change the default password for user pi (I believe the default password was…: pi) keep in mind, Linux-based systems such as the raspberry pie are case sensitive particularly important for remembering your passwords ;-)
  4. Now to install and set up VNC
    1. these are the instructions I used, but a very good step-by-step guide here: http://learn.adafruit.com/adafruit-raspberry-pi-lesson-7-remote-control-with-vnc/overview
    2. Personally I followed these instructions:
      http://myraspberrypiexperience.blogspot.ca/p/setting-up-vnc.html 
      once VNC is installed, you will no doubt wanted to start on boot. These instructions will walk you through the process
      http://myraspberrypiexperience.blogspot.ca/2012/08/start-vnc-automatically.html
    be sure to specify which desktop
    you want to connect to
  5. reboot your pi (type reboot ) and reconnect using VNC
    start VNC viewer on your desktop, enter the IP address of your raspberry pie followed by :1
    the reason you want to do this is that you are specifying which desktop to connect to. You can run multiple desktops.
And there you have it. Your pie should now be up and running with a VNC connection.

One thing I should point out about VNC is while it's a great and convenient way to access your pi it does have a few limitations. You can use the accessibility tools from your Windows environment, for example I can use DragonDictate to send text and controls directly to the pi. However I cannot copy paste from my desktop through VNC onto pi, which can be a bit inconvenient (possibly because I'm using the free version).

Another reason why VNC is Uber cool
I can connect to my pi from my iPad or iPhone!
Installing Siri proxy on your pi

The best, and probably easiest way would be to follow Elvis impersonator's instructions. I installed mine through SSH, one command at a time. This step is a little bit more complicated as you will have to take out the commands from the text file one by one. Nonetheless, it's pretty straightforward and you will find the complete list of instructions here:
Optionally you can set up your raspberry pi to start Siri proxy on boot. Once again, just follow Elvis impersonator's instructions:
Personally I've not set my Siri proxy of to start on boot. I kind of like having the terminal window showing me the output so I can occasionally check up with what's going on. If you if you choose to start your Siri proxies this way,  you will have to do it at the desktop level. Connected using VNC and run root terminal. In my case, for some reason it does not remember the path to the install, I simply have to rerun the following three commands in the root terminal to start the server.
  • [[ -s "/etc/profile.d/rvm.sh" ]] && . "/etc/profile.d/rvm.sh"
  • echo '[[ -s "/etc/profile.d/rvm.sh" ]] && . "/etc/profile.d/rvm.sh" # Load RVM function' >> ~/.bash_profile
  • siriproxy server

Modifying the example plug-in

about to go through the details of how to go about modifying or creating your own plug-ins. I believe that is a project for you to figure ;-). However, I did create a little auto hotkey script which will make the process somewhat easier.

My goal was to allow myself to use my Windows environment to use the actual modifications to the example plug-in script. Doing so would give me full access to my voice control,and other accessibility features. Not to mention a nice editor. You can download my autohotkey script here:
This script is just a convenient way to send a final from my Windows desktop to a raspberry. In order for to work you will need to have pscp.exe installed which of to download from the same place you  downloaded PUTTY 


  1. In the first box, this is where you want to send a file. Specify as root user. type in the full path.
  2. The second box is the file that you want to copy to the raspberry pie. Press the select button, go find your file.
  3. in the final box use the select button to specify where you downloaded pscp.exe
  4. modify your source file, save it then press send it. This will copy the file onto your pie.
I created this only has one way send to pi because I don't expect have to copy files back from my pie , very often, if at all.

Conclusion

This should be enough of the pieces to get to well on your way. Goal here wasn't easy tutorial but more to show you where to find hold the parts. I'm finding it surprisingly easy to work with the pie in this manner. So if your voice is still strong in your house I need/use for Siri proxy, a raspberry pie is a relatively inexpensive, not overly complicated and very effective way to get it set up.