The purpose of this document is to describe how to use setup the Timestreams WordPress plugin on a plug computer as well as additional software that may be used with Timestreams. This document describes the installation instructions for a Marvell DreamPlug®, but many of the points made will apply to other Linux-based plug computers as well.
This document is intended for administrators tasked with installing and setting up Timestreams on a plug computer. We presume administrators have some degree of experience using Linux and have root access to the plug computer they are installing on. The instructions may be a bit basic for more experienced administrators for whom we recommend using this only as a guide rather than gospel.
A note about terminology. The term “Timestreams” is used throughout this document to only refer to the WordPress plugin.
Background and acknowledgements
The Timestreams social data networking plugin leverages WordPress to allow artists to engage with live, modelled and captured data. It can be used to visualise, compare and perform data.
The Relate Project is a collaboration between the Horizon Digital Economy Research Institute, artist company Active Ingredient, Dr Carlo Buontempo from the Met Office Hadley Centre, Brazilian curator Silvia Leal, staff in Computer Science, Psychology, Performance and New Media from Horizon (University of Nottingham and University of Exeter), and a number of communities in Brazil and the UK. The project is funded by RCUK.
Timestreams is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Timestreams is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
This documentation is licensed under a Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales License.
Support, feedback and collaboration
The Relate Project members are interested in your experience using the Timestreams plugin. Contact us if you require additional support or have feedback for us.
The remainder of this document describes how to set up a Marvell DreamPlug® to support the Timestreams plugin. It also presents various cases the Relate project team consider the plugin could be used for on a plug computer.
The following sections describe procedures to install required and optional components to use Timestreams on a Marvell DreamPlug®. The procedures presume installation device is running Debian GNU/Linux 6.0 and is a clean install. Note that some DreamPlugs ship with Ubuntu or other operating systems (OS). We recommend making sure that the chosen OS is one that is maintained for ARM processors.
Follow these instructions to set up the plug computer to be in a fit state of use. In particular follow the instructions to upgrade the distribution, set the time zone, reset the ssh keys, reset the root password, and enable the ethernet connection. You may also wish to add a non-root user using adduser.
If your plug computer is behind a proxy server then you can set it up to use the proxy following these instructions. Most of the time it is best to set up the proxy variable for all users by adding “export http_proxy=http://proxy_url:proxy_port/” to /etc/profile.
Your DreamPlug® should have Apache webserver installed by default setup to server pages from /var/www. To check if it is serving simply browse to http://ipaddress. You can determine the ip address using the ifconfig command.
Install the Zip utility using the command apt-get install zip. This lets you zip and unzip files.
It’s very important to keep the time synchronised between your plug computer and the rest of the network. NTP is a utility that can handle time synchronisation for you. Install it using apt-get install ntp then configure it using the advice from here, here and here.
Install MySQL. The quickest way is with: apt-get install mysql-client-5.1 mysql-server-5.1. See this page for details.
Install Php. There are various extensions for Php that can optionally be installed as well. Here’s the apt-get list we use:
apt-get install php5-mysql php5-curl php-pear php5-xmlrpc php5-xsl php5-json php5-odbc followed by /etc/init.d/apache2 restart. Then apt-get install phpmyadmin and configure the database for phpmyadmin. If http://localhost/phpmyadmin/ doesn’t show up then edit as appropriate: ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf. Then do /etc/init.d/apache2 reload.
WordPress can be installed once a webserver, Php and MySQL are present. Follow these instructions to install WordPress. At the time of writing it is advisable to avoid apt-get for WordPress as it provides the deprecated 2.7 version rather than a more modern 3.x version.
The default WordPress installation provides a single blog but it can be configured to support a network of blogs. This is called Multsite. The Timestreams plugin can be installed for use with single or multisite installations. Follow these instructions if you want to set up multisite WordPress.
If your plug computer is behind a proxy you’ll need to add proxy settings to WordPress for it to work correctly. Add and configure the following to your WordPress wp-config.php file:
define(‘WP_PROXY_BYPASS_HOSTS’, ‘localhost, www.example.com’);
Timestreams may be installed once WordPress is running on the plug. To install the plugin:
- Download the Timestreams plugin from here.
- Activate the Timestreams plugin. If you are using Timestreams in all blogs for a WordPress multisite installation then you may wish to network activate it.
- Activate the Blogusers plugin. If you are using Timestreams in all blogs for a WordPress multisite installation then you may wish to network activate it.
- Configure settings in the WordPress admin left menu for settings > Timestreams.
Cron and Daemoneyes
Timestreams relies on WordPress’ wp-cron feature for regular actions. To ensure regularity of wp-cron you should add a real cron job to call wp-cron (yes really). To do so add the following to crontab -e: wget http://localhost/[WordPress install location]/wp-cron.php > /dev/null 2>&1
Once your plug computer is set up you may wish to back it up. There are good instructions to back up your plug computer SD card here. In general we do the following: Verify the mount name of the micro-SD card in the computer by typing df then dd if=/dev/[sdx] bs=5898240 of=[backup file path].
Your plug computer can be made into a portable device by battery-powering it. The Relate project successfully demonstrated this by powering a DreamPlug using a PowerTraveller PowerGorilla. To use the PowerGorilla you will need a Gorilla-pad connector. Note that you will need to replace the connector head for the PowerGorilla usb power cord with one that is the correct width for the plug computer’s plug size.
If you want you can charge the PowerGorilla with a SolarGorilla while operating the plug computer.
The Relate project has successfully captured data from a home weather station into Timestreams on a plug computer. It makes use of the pywws python software. The following are instructions for setting up Pywws on a DreamPlug to capture data into Timestreams from a USB wireless weather forecaster (N96FY).
- Install and turn on your weather station.
- Make sure that Python is installed in your plug computer (apt-get it if not). Then apt-get install python-dev.
- apt-get install libusb
- apt-get install git
- Install pywws in a location you want to run it from using: git clone https://github.com/jim-easterbrook/pywws.git
- apt-get install make
- cd pywws then call make
- Test the weather station with python TestWeatherStation.py. You should get a dump of a load of numbers to the screen.
- Follow steps from 5 onwards from here.
The DreamPlug can listen for Bluetooth sensor connections and record data from such sensors. These instructions describe how to collect data from Sensaris Sensepods:
- apt-get install bluez-utils
- Turn on your sensor and run hciconfig -a hci0 on the plug computer to identify the sensor
- add a pincodes folder to /var/lib/bluetooth/[address from last step]
- run hcitool scan on the plug computer and add entries from the given bluetooth address for the sensor.
- Install and activate the Daemoneyes plugin into your WordPress installation.
- DownloadTimespod and add a Daemoneyes entry for it.