Mobile and Connected Devices


The chosen theme for this project was Sustainability and the Environment. Arguable the greatest challenge humanity faces in the coming decade is climate change. One of the easiest ways that this can be addressed is through increasing energy efficiency which not only saves the environment but also saves money. By utilising new inexpensive persuasive technologies, the potential to reduce carbon footprints and promote environmentally friendly lifestyles is easier than ever. The Internet of Things can enable this to be accomplished. It is a network of devices that are interconnected, some devices on the IOT are physical objects that have been made available for use by other devices. This usually done by RESTful services and delivery.


This particular field that the project is focusing on is called Eco-Feedback Technology and is a area of interest in Human Computer Interaction (HCI) and Environmental Psychology. “Eco-feedback technology provides feedback on individual or group behaviors with a goal of reducing environmental impact.” (Froehlich, 2010) Climate Change is one of the biggest threats to society, the environment, economies (Elliott, 2010) and wildlife.

This motivates many different fields including computer science to attempt to innovate a solution that can help mitigate and reduce the effects of climate change.

“As far back as the 1970s, studies have shown that eco-feedback technology can affect consumption behaviors” (Froehlich, 2010)

With the development of the Internet of Things, the ability to get more real time and accurate data about day to day objects, events and interactions has become accessible.


The concept for this project was to build a phone application that helps reduce energy consumption and raise awareness of environment and energy issues. This will be accomplished by encouraging positive behaviour inside a University campus. These digital interventions would hopefully help create a long term behaviour change, focusing on a student accommodation setting where due to the prepaid nature of housing; there is little motivation to reduce energy consumption.

The of using interaction design to steer and change users behaviours has been noted by several studies.

Steering User Behavior with Badges (Anderson et al, 2013) discuss how giving badges to users on online communities and social media sites can lead to increased participation and “…that users will put in non-trivial amounts of work to achieve particular badges, and as such, badges can act as powerful incentives.” The paper introduces a formal model which is evaluated and provides some design principals to help design optimal badges.

Several major websites have provided badges to users, two current and popular examples are Untappd and Swarm. Untappd is a social check in application for beer; you unlock badges around certain themes (e.g. national holidays, beers country of origins, locations).

In Changing commuters’ behavior using rewards: A study of rush-hour avoidance (Ben-Elia and Ettema, 2011) investigated the effect that monetised rewards and credits for a smartphone to change behaviour patterns of commuters.

Gamification is a trend where the use of services, applications and other technologies have game like elements. This helps to increase interaction with a technology. This is possible in a student court context. The court like structure of the University of Lincoln has already had Student Union run events with competition between the different groups. The motivation is possible in these contexts, already the student union gives away free entry to club nights such as Quack in competitions and society deals. The ability to create a positive competitive atmosphere based on energy reduction with the reward of free night club entry for the best court is possible and cost effective. Due to the scope and resources of this project there is limited ability to implement this, however it is possible with a small range of adaptions.

This project consists of three parts; The first being a phone application which will provide the interaction with the system by the user, the second being the raspberry pi which will provide live data to the cloud platform, the third being the cloud platform which will co-ordinate all the separate parts of the system.

Phone Application:

  • The phone applications purpose is to provide feedback to the user,it combines all of the back end logic and provides it in a simple user application. Its main focus is on user ability and changing user behaviour.
  • The key requirements for the phone application that were identified from this concept were:
  • Visual Display of Temperature
  • Visual Display of Energy Used Last Year at this given time
  • Location data

Retrieval of Cloud Data through RESTful API In this initial application of this eco-feedback technology, no rewards have been implemented due to the limited scope of this project. It would however be easy to implement with a restful API.

Cloud Computing:

The purpose of the cloud service is to provide and store the data, communication between the raspberry pi and phone application through the restful API.

Key Requirements Identified were:

  • Restful API integration
  • Storage and Retrieval of Raspberry PI sensors through RESTful API
  • Deliver Restful API of sensor data
  •  Deletion of Data

Exposing the data via a RESTful API, not only secures it but also allows extendibility easily which is important in the IOT.



Below is the implementation and justification of any features to achieve the concept. Raspberry PI The raspberry Pi component of this project was implemented using python. This provided a simple light weight program that cloud communicate with the sensor devices. With the inclusion of requests, it provides simple implementation of http requests that can send the data through the cloud servers restful Interface.

The sensors provide a three features, Temperature, Humidity and Attitude. It was deemed in the application of an eco feedback technology that both Humidity and Attitude were irrelevant. Humidity is still calculated with in the code, should a future application within the context of the system be need. However, at the current time it is not.

A choice of 1-minute update intervals was chosen because the temperature change between these times will be marginal and there is no point adding irrelevant data to the database. The uploading of the data values was done through a HTTP PUT command which sends the data to the cloud server. The intervals are inside a while loop which doesn’t exit while the script is running, thus need external Cloud Server Phone App Raspberry PI Temp Sensor External REST APIs interruption to stop. The possibility of an error with the end point for the PUT requests have been handled in an exception, giving feedback through the console to the user. This was not only useful, but necessary in the debugging of the program. The Current sensor value is output and then the relevant information on the problem.

Cloud Service

The cloud service was developed using python with the Tornado library. A restful API was developed which connected to a SQL Lite database. The API would store, retrieve and delete from the database. The server accepts: GET, PUT and DELETE.

The URI template for server followed this scheme “sensors/all”” and /sensor/([0- 9]+. This allows for requests such as GET http://serveraddress:portnumber/sensor/1. This also allows for retrieval of past data in the database. Additionally, you could implement multiple sensors with the court environment. This is not needed with the correct set up of system but is possible.

The database accepts values, of a unique ID, current temperature value and Unix time.This keeps the data stored for recall via ID (which is updated every minute) or via Unix time.

Each client is sent status codes to confirm that the RESTful transaction has occurred.Except in the GET request which returns JSON. The server console gives a print out of what type of request was completed and the IP address of the client that has attempted it.

Error handling was implemented which catches any errors and gives feedback to the server. It enables the sever to avoid issues, the Tornado warning are enabled which also gives the libraries specific error message which helps with debugging.

Phone Application

The Phone Application was developed in Android Studio using the Android API 21 with Google Play services. This allowed for a range of functionality to be implemented including Google Specific location services.

The Phone has several different features. The first is a Energy Feedback dialogue which provides the user with the previous years energy level at the current time. It also provides the users current long and latitude which lets them understand their location. It loads the user’s current location from the phones Geolocation manager. Additionally, the Raspberry Pi sensor data is loaded from the cloud via the Retrofit Library. This allowed for the implementation of into the temperature in Celsius to be output in a text view. The Time of the last update from the sensor to the server is provided as text view as well. This is done in the format of Hour and Minutes. It is derived from the RESTful apis Unix time which is returned by the GET request of the latest sensor temperature.

The external API is called via phone application used in the structure: ar=15&hour=18:00. This is calculated via the phones system time. There are some courts which are unavailable via this API, which has been handled by inputting a 0.

The next feature was some static tips for reducing energy consumption aimed at students. This is a simple, yet useful feature that gives feedback to the user. Further tips could be added to the application specific to each Court, using the user preferences.

The next feature was the implementation of a tweeter timeline. Given the users preferences, it will provide their time line loaded from the settings activity.

The final activity in the system is the setting panel. This saves the users preferences in a shared preference which can be retrieved by any activity within the application. It takes several inputs (as displayed below) and allows the user to store or retrieve them for editing. This is data is used in the other activities such as twitter or court for reference. The other fields are there for any further extensions to the program such as gamification with rewards or incentives.


Overall, this project provides a implementation of an eco feedback technology which aims to encourage user behavioural changes through raising awareness of energy usage and reduction tips. Through the use of the Internet of Things an temperature RESTful api has been implemented into the phone application and provided an awareness for users.

Further Work

Further work could be carried out to gamify this application and incentive the user to reduce their consumption further.

Reference List

Reference List is organised using Harvard Standard Referencing (University of  Lincoln Style)


Anderson, A., Huttenlocher, D., Kleinberg, J. and Leskovec, J. (2013) Steering user behavior with badges. In: Proceedings of the 22nd International Conference on World Wide Web International World Wide Web Conferences Steering Committee, 95-106.

Ben-Elia, E. and Ettema, D. (2011) Changing commuters’ behavior using rewards: A study of rush-hour avoidance. Transportation Research Part F: Traffic Psychology and Behaviour, 14(5) 354-368.

Elliott, L. (2016) Climate Change Disaster Is Biggest Threat to Global Economy in 2016, Say Experts. [online] London: The Guardian. Available from [Accessed 22/04/2016].

Froehlich, J., Findlater, L. and Landay, J. (2010) The design of eco-feedback technology. In: Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, Atlanta, 10/03/2010. Atlanta: ACM, 1999-2008.





Leave a Comment

Please keep in mind that comments are moderated and rel="nofollow" is in use. So, please do not use a spammy keyword or a domain as your name, or it will be deleted. Let us have a personal and meaningful conversation instead.

ProjectEco feedback Technology

ModuleMobile and Connected Devices

DescriptionDeveloped a Android mobile phone application alongside a RESTful API, backend and a smart device. This was an integration of several different devices and technologies which falls inside the Internet of Things

TechnologyPython, Java, Linux, SQL LITE, Tornado, Requests, Cloud Computing, Raspberry PI, Data Sensors, Mobile Development, Android, Circuit Engineering, Internet of Things

View Code