Sensor Andrew Google Android (SAGA) Project overview:
This project was completed for HCI 05-837, Ubiquitous Computing. Stephanie and I, Tawanna built the infrastructure needed to utilize the Sensor Andrew Network and the Android development platform. We decided to detect one of the actions listed on Stepgreen.org – turning lights off when not in the office.
By combining Sensor Andrew Network data and location-specific information available from the Android phone, new applications are able to take advantage of the user’s own activity while also using location-specific data to augment the activity recognizer. For example, if a user does not remember whether they turned off the lights in their office, while the phone could sense whether the lights were on in the user’s current location, Sensor Andrew’s light sensors would also indicate light in other places where people might not be present. Additionally, the Sensor Andrew network currently requires access to a computer or internet source to look at the data, the phone could be used for interruptibility to determine when to tell the user they have left the lights on. Neither of these technologies could be used alone to do this task.
Our final deliverables included:
- a flexible and robust system that provide applications with a central access point for obtaining a variety of sensor data
- the design of an application that showcases our system and provides service that could not be implemented on one technology alone (e.g., a novel way of utilizing sensor data to show environment-friendly behavior)
Our application can detect when a user turns off their light while out of the office and posts this action to Stepgreen.org. We provide a description of our project and the steps we took to implement it. The class write up for the project is attached as well as our submission to the Ubicomp conference.
- Sensor Andrew Firefly Sensor (detects light, acceleration, temperature, audio, voltage).
- 1 ASUS WL-500 Router for each network. You will need to install software called the ASUS Setup/Sensor Andrew Gateway Agent (SAGA) Sensor Network Dashboard on the router. We obtained our image from the Sensor Andrew team. This image changed frequently so you may need to contact the team for the latest version.
- Google Android phone (developer platform – enable GPS satellites, use wireless networks)
- We obtained approximately 21 Sensor Andrew Firefly sensor nodes to deploy in offices located in the Gates-Hillman building and Newell Simon Hall. We got our sensors from the Sensor Andrew team.
- A server to host your database
- Our database resides on the kettle server. The kettle server contains the a mySQL database called “saga” (sensor andrew google android) that stores all sensor information. Saga’s responsibilities are to store the Sensor Andrew sensor data and user location (latitude and longitude coordinates) data (this is the sensor table within the saga database located on our kettle server). Below is a screenshot image of the saga sensor table (the last column is the voltage column)
- Device_ID: A unique identifier (user name in the case of the the mobile phone and the sensor ID in the case the data originated from the sensor)
- Device_Type: The source of the data being recorded (sensor or mobile)
- Time: The date and time the data was obtained (2009-10-20T15:03:46)
- Latitude: A user’s location x coordinate
- Longitude: A user’s location y coordinate
- Altitude: Not used due to GPS instability but is available
- Light: The raw value representing light intensity from the Firefly sensor
- Acceleration: The raw value representing the acceleration value from the Firefly sensor
- Heading: Not used
- Temperature: The raw temperature value from the Firefly sensor
- Audio: The raw noise value from the Firefly sensor
- Voltage: The raw voltage from the Firefly sensor
- The other table in the saga database is the “Users” table. The Users table holds static values for the user id, the officeID, or each user’s office location (gps coordinates), a calibration value and a delta value. This table helped us to identify whether or not a user was in the office (we kept calibration values to help us adjust for changes in the sensor – voltage and to help us calibrate for our location – gps).
- PHP Filter – applications interface with this script to get the different analyses. This filter serves as the primary interface between the Android application and all underlying detection scripts (light, audio, etc…). See diagram.
- insert_table.php – inserts data into proper db column for associated user
- test_table.php – gives back current db table
- lightsOn.php – determines whether a particular user is in their particular office and whether the lights are on/off
- audio – not implemented
- A client/subscriber to read Sensor Andrew data code obtained from the Sensor Andrew team.
- To subscribe to sensor data accessed the code from the Sensor Trac page (contact the team for password information. The username is guest). Here’s an overview of our steps:
- Check the code out of SVN and install loudmouth and the sox library. Be sure to install the pre-req libraries (get sox only).
- Install instructions are located here
- To subscribe to your sensors (this is so you can retrieve their values), go to this directory: sensor-andrew/sox/tools/subscribe_sample
- Our android application. Below are screen shots from the final application. We created an Android widget so that we could see the information in the application desktop. Our application populates our database with the user’s current location data. Our application retrieves the current light status from the filter.php file.
- lights, or lightsOn.php: our Google Android code to log location and retrieve light status our client/subscriber to read Sensor Andrew data. To detect audio or vibration, one could create another php file.
With help from the Sensor Andrew team, we set up a saga account to show our sensor output. Unfortunately, the sensors are not regularly being monitored so it is possible that the sensor batteries are dead or they have been relocated.