[Empire Strikes Hack] How Team Eco Force help us all use Energy sustainably

Martin Di Martino-Marriot
Vodafone UK Engineering
8 min readMay 2, 2023

At Vodafone UK we recently ran our next hackathon — an opportunity for employees to work together to build something exciting in a two days. With over 200 people taking part across 6 locations it was a truly collaborative event. In this series of blogs we explore what teams got up to during the event.

Our third post is from Martin a Frontend Engineer who tells us about what their team did to solve the problem of Sustainability using a public API to inform users of how to optimise their energy usage.

Here’s a little insight into my experience taking part in the Global ‘Empire Strikes Hack’ Hackathon and what our team got up to.

Ahead of the Hackathon, The Dark Emperor and host David Lindley in Engineering, posed three problem statements each team was to set about solving; Sustainability, Customer Experience and Communities.

I opted for Sustainability, with the inspiring goal — How might we use technology to build a more sustainable future?

Before I knew it was quickly assembled among a group of similarly inclines colleagues from across disciplines to come up with and deliver an idea. Among us were a cross-section of specialisms; engineers in front and back-end, platform, mobile app development, UX, and a Business Analyst, and we’d not met each other or worked together before! This dynamic and ability to adapt and organise together around a shared goal, is the value we each get from these events.

The rules were that we could do some prep work — coming up with ideas, assigning roles, researching what resources are available — but not actually start coding or creating our presentation before the event.

Empire Strikes Hack 2023 — Speechmark, London

After a day and a half of Hacking, we’d have just seven minutes to present, to convince the High Council judges and our audience of our idea; and we’d be judged on Innovation and creativity, our implementation of the idea, a compelling presentation, and future potential of our idea. Then only 3 minutes to take questions.

Pre-work

Preparation is key to success given the limited time and potential technical glitches on the day, and our best chance of winning is in how we use that time. I quickly organised our team to have some collaboration sessions ahead of the event, not least to introduce each other, but also what we’d like to each do for the challenge. We brainstormed ideas and assigned roles, which was a great opportunity in itself to try something different to our regular roles.

I decided to use my organisational skills to initially align us and facilitate ideas from everyone about our problem statement, and think about how we can align to one of Vodafone’s Purpose Pillars: Planet, with the goal of Helping society to decarbonise.

“For Vodafone, our most important contribution to tackling climate change is by enabling our customers… to reduce their environmental footprint using our digital technologies and services.”

Vodafone have made already significant progress in enabling industry to be sustainable, with a focus on agriculture, logistics and manufacturing in particular. We wanted to offer something else for consumers, in helping them to reduce their own carbon footprint.

We shared a few ideas and did some research into publicly-available data we might use toward them, and discovered the concept of Carbon Intensity (CI), and an API provided by National Grid which provided a localised forecast and live data on carbon efficiency!

Carbon intensity is a measure of how clean our electricity is. It refers to how many grams of carbon dioxide (CO2) are released to produce a kilowatt hour (kWh) of electricity.

Electricity that’s generated using fossil fuels is more carbon intensive in its means of production, whereas sources, such as wind, hydro or solar power, produce next to no CO2 emissions, so their carbon intensity value is much lower and often zero.

We were able to hit the available endpoints this API provided in Postman to see what we had to work with

The API was easy to consume without authentication, and gave us forecast and actual national and regional CI ratings for the next 24hrs.

We had The Force on our side with Jedis from the Vodafone App team — Lina and Felicity, and so we decided we could implement a feature in the MVA app; an existing customer touchpoint to empower customers with this energy data, not just for charging their device, but for informing their daily decisions on energy use.

We jumped in a Mural board to capture the key features we could implement, and ideas abound!

Alas, we would only have such a short amount of time, so we identified our key features for an achievable MVP to demonstrate the value and potential of this idea.

In order to minimise delay and get right to it on the day, our Jedis in app development ran crash-course knowledge sessions on the fundamentals of Android Studio and device emulation so we could be confident we could actually implement and demo a feature directly in the intended environment of the MVA App. We came to understand how the MVA app uses JSON responses from its back-end to define and populate the views in order to create mocks.

It was an inspiring demonstration of new colleagues coming together, helping each other and getting it done together toward a shared goal!

We were set; and felt pretty safe we had our environments set up and could make things appear in the emulator…what could go wrong?

The hacking

After the rousing kick-off speeches for a sustainable future, there was a feeling of excitement and bustle at The Speechmark over breakfast. Then all the teams broke out to get to work!

As we got to work displaying API data in the app via the emulator, we were quickly encountering the relatively slow feedback cycle in app development; more used to hot-reloading and instant visual feedback in the browser with React. Android development requires a higher degree of patience and several minutes of painful wait-time between compiles to see if our experimenting worked. This did not lend itself to iterating and moving fast in our hackathon scenario!…

Meanwhile, we were getting environment failures during development, which along with slow feedback cycles, meant we needed to rethink our approach as we risked running out of time with nothing to show if we kept pressing on.

So after a short cost/benefit evaluation, we valiantly decided to abandon our initial approach of using Android Studio and implement the demo in something that would allow us to move quicker; React Native.

We spun up a new app, mocked the boilerplate visuals of the MVA app and were soon freed up, and Hugo was able to display the API’s Carbon Intensity data in different ways more quickly. We could pull each others’ code and see our latest changes; no recompiling, or failing MVA back-end.

With all this raw data about forecast and actual CI data coming from the API, we now needed to consider how best to visually present that to be most useful in the app, so we designed the UI in Figma to inform how to present the data indicate how it might look if implemented using Vodafone’s unique ‘SourceWeb’ components already used in the app, such as the billing graph component for plotting the data over a day.

Visuals we created in Figma

We split ourselves into sub teams to work on different tasks, merging and pulling branches. There was something warm and nostalgic about collaborating in a room, calling each other to pull branches, and pairing in person! Between us, we were pulling the public CI data itself, implementing it on a graph, and inspecting the devices’ battery charge history.

How our MVP implementations looked, with notification popup

We finally started to see our new views come to life, managing to create the MVP features we’d set ourselves to do…

  • Creating a new MyEnergy Hub in the app
  • Showing the day’s Carbon Intensity data on a graph
  • Percentage of battery charge taken during low intensity time
  • Recommendation of when next to charge the device and the day’s highs and lows
  • Information about Carbon Intensity
  • The suggestion of gamifying charging the device during low CI periods, implementing a functioning ‘share’ tile to post an achievement of maximising low intensity energy use over the week

Next up was our stretch goal; showing notifications in React native! Now flagging and discovering difficulties, we parked this venture for the next day. We’d run out of time, and cookies.

After a bit of a late finish and a super-eager early start — of course including a quick sweep of the breakfast buffet, we set back to work on the finishing touch and final bit of our MVP; triggering push notifications.

We quickly discovered we could use a react-native-push-notification library to implement this and with that, our demo was complete. We grabbed a screen-record of the whole journey and after a final run-through our demo we were done!

When the big event came, the team took the stage and did a great job of presenting not only our process and our unexpected glitches, but how the app supports our sustainability goals, and empowers users with data to become more carbon aware; the team supporting each other in handling questions being put to us from a keen panel!

Next steps for MyEnergyHub

The possibilities of a MyEnergy Hub in the app are huge, and provides not only a useful tool to empower customers with data to more sustainable living, but is a valuable step toward Vodafone’s ambitious sustainability goals. It engages consumers with the app, building loyalty with our brand, and has the potential for sustainable brand partnerships and customer benefits via VeryMe rewards.

We hope this would set the example for others in the industry to invest in similar sustainable initiatives; collectively we can make a difference through awareness.

The event was a huge success, really well-supported and organised by our host David Lindley, and a positive learning experience that created many new connections among our people. Well done to all my colleagues in EcoForce. We got it done together!

Team Eco Force 💪

Want to know more?

If this article has inspired you, and you want to know more please reach out to us on our various social media channels.

If you want to work with us, find us on LinkedIn and drop us a message, we would love to hear from you! ✉️

--

--

Martin Di Martino-Marriot
Vodafone UK Engineering

Front-end and Developer at Vodafone. Bouldering, MTB, always a learner.