Software Overview  |  Sitemap  |  Downloads  |  Developers  |  Forums
Small_clear_logo_llc

How To Install Virtual Wiring on a Raspberry Pi

Here, we'll install the Virtual Wiring software on a Pi running Raspbian release 3.10.25. We've run the Virtual Wring software on a number of other Raspbian releases, so these instructions should work for many other Raspbian versions as well. Since Raspbian is a flavor of Linux, these instructions will also work for other Linux distributions.

Before getting started, make sure your Pi is connected to the internet and its date and time are correct. The Virtual Wiring system's timer devices need the correct time of day to run properly. If the time isn't right, open a terminal screen and run the "raspi-config" program. Select "Internationalization Options" to set your proper time zone. If you want remote access your Pi's terminal screen, use raspi-config's "Advanced Options" and enable SSH.

Installing Ruby on a Pi

To get started, we will download and install the latest Ruby. Ruby is included with the latest Raspbians, but it may be missing files needed for building Ruby packages (gems), so we will re-install Ruby and install the missing files. To get started, open a terminal session on your Pi and type:

sudo apt-get update

This will bring the Pi's package directory up to date. Next type:

sudo apt-get install ruby ruby-dev

Now you have updated your Ruby to the latest version, and you've added all the necessary files for building gems.

Next type:

sudo gem install bundler -N

Bundler is a Ruby program which downloads ruby packages (gems) and manages gem dependencies. Virtual Wiring needs bundler.

Installing Virtual Wiring

Download the Virtual Wiring software from http://www.catalinacomputing.com/download. Read the license agreement, and if you agree to it, click "I agree" and download the software. The Virtual Wiring software is available free of charge if you aren't making money from it. Click on the download button for the most recent version of the software. If you are using the Midori browser, when it asks you if you want to save the file, click "Save" and not "SaveAs". We've found that the "SaveAs" button fails to download the software, while the "Save" button works fine. The software will be downloaded into your home directory (usually this is /home/pi).

The download will be called vw_application_xxxxxxxx.zip, where xxxxxxxx is an 8 digit date. Move the application into the directory where you wish to keep the software and unzip it. "cd" to the new unzipped vw_application_xxxxxxxx directory. "cd" to the "vw_app_server" directory inside the vw_application_xxxxxxxx directory. While inside the vw_app_server directory, type:

bundle install

Your Pi will churn on this for a while as it downloads and installs Ruby gems. The bundle command should succeed with no errors. Your Virtual Wiring software installation is complete.

Starting Up Virtual Wiring

To start up the Virtual Wiring software, open a terminal session (or use your existing one), and cd back to your vw_application_xxxxxxxx directory. If you just ran "bundle install", typing "cd .." will bring you back. Next type:

./run_vw_application.rb

Open your Pi's browser (Midori, Epiphany, ...) and navigate to localhost:4567. You should see the Virtual Wiring Device Explorer web page. Virtual Wiring is running.

Virtual Wiring Explorer Page
Explorer Screen Shot

Running Virtual Wiring

As we just saw, Virtual Wiring runs in a browser. You can run it from your Pi's browser, or you can run it from another computer's browser. Running browsers on Pi As, Bs, and B+s is rather slow, so we recommend running Virtual Wiring from a browser running on a faster machine - a PC or a Mac. If you have a Pi 2 or 3, you may find your Pi's browser performance reasonable.

To access Virtual Wiring from another computer, your computer and your Pi need to be on the same network. If you know your Pi's network name, you can run Virtual Wiring using your Pi's network name and port 4567 ("http://raspberrypi:4567", for example). If your Pi's network name is not known, you can use your Pi's IP address instead. You can learn your Pi's IP address by typing "ifconfig" from a terminal on your Pi and reading the "inet addr:" field of device "eth0". If your Pi is using WiFi, look for device "wlan0" and field "inet addr:". Once you know your Pi's IP address, you can use it instead of a network name. Your Pi's site name will look like "http://xxx.xxx.xxx.xxx:4567", where xxx.xxx.xxx.xxx is your Pi's IP address. If your Pi is not on a network or your have no other computer, you'll need to use Midori.

Next Steps

Once you have the Virtual Wiring software running in your browser, go to the Installation and Start Up page for additional tips.

Catalina Computing, LLC.

Copyright © Catalina Computing, LLC. (2013-2018)




Page last updated: Thu Apr 27 21:16:08 2017 (UTC)