IOTA Hackathon: Open Car Charging Network (Part 2)

PlugInBaby App in iPhone


We’ve stirred much interest in the issuance of our XSC token at the IOTA hackathon in Gdansk. We therefore decided to prolong our rewards campaign for IOTA developers for 1 week:

If you’re a developer who committed code to advance the IOTA network during the month of November, you’ll be eligible. If you think you’re eligible you can request up to 250 XSC until Friday, 1 December 2017.

Fill out this form now! Show us that you’ve got the right stuff!
Developer Incentives Program: Claim XSC Rewards

For more information on the CSC Blockchain Evolution Incentive Scheme, click here and here.


This is the second installment outlining the experiences of the winning team “PlugInBaby” during the IOTA Hackathon. In the first post (found here), we describe the idea generation process.  In this post, team member Rebecca Johnson goes into more detail with regards to how the team built the project and what exactly it accomplishes.

Our PoC decentralizes and democratizes access to a  network of electric vehicle chargers by allowing the chargers to costlessly broadcast their status (offline, occupied, available) via 0 value transactions on the tangle. Next, using a mobile app, users searching for a charging station can query the tangle using 0 value transactions to search for tags of available stations. They can reserve a charging spot and book micro transactions necessary to pay for electricity, all using IOTA.

Concept Doodle
A world where individuals leverage open source software and DIY hardware to decentralise the market for energy.

Using the tangle as a database makes the solution quite elegant. The protocol for sending data and value are essentially the same which removes the need for a centralized payment processing layer and allows for the DIY ethic to extend all the way to the end-user.

This approach is also flexible enough to leave room for participation by utilities and other stakeholders since the hardware and software are open-source.  Improvements are welcome and anyone is free to implement the idea. The code can be found here.

Requirements & Assumptions

  • We restricted ourselves to using only IOTA for implementing the database functionality. This carries the theoretical advantages of future scalability, full decentralization and zero transaction costs for messages sent to and from the tangle as well as a mechanism for machine to machine electricity purchases.
  • We assumed that the API and the interaction between the charger and the car app are out of scope for the hackathon.
  • Charging station vendors need to send status messages for their stations (free, in-use, offline) using 0 balance transactions to the tangle. Our back-end provides this capability via terminal inputs. Since this is just a PoC we didn’t build out an API or UI for this portion.
  • A web-based front-end, a back-end connection to the tangle and an API for communication between the two needed to be built. Given this, the team split into two groups of 3-4 developers each.


The experience of the PlugInBaby team was similar to that of the Freedom Pass team. We started out by following this tutorial from Baltic Data Science and gained speed by utilizing some of the resources from the Q&A with Chris Dukakis of IOTA. After that, we connected to a testnet node and started issuing transactions.

Like the Freedom Pass team, we also considered using a mainnet node but the issue of how to connect with neighbors was eventually a knockout criterion. This was actually due to security concerns. One of our team members had a Java Runtime Environment setup on a remote virtual machine and we considered setting up an instance of the IRI. In the end, however, we weren’t comfortable with the security risks that connecting with unknown nodes presented.

In contrast to the other teams, the “PlugInBaby” team used the IOTA Python Library to build and connect the backend. Documentation for this library is quite sparse in comparison with the JavaScript Library. We’d like to thank Andreas OsowskiLewis Freiberg and  Chris Dukakis of IOTA for their round-the-clock support in getting everything up and running.

Our team member Lukasz Zmudzinski has written a great blog post on his site which outlines which Python methods we used to read and write to the tangle in greater detail. We used the Tornado web framework and asynchronous networking library for this project and wrote our own API  to communicate with the front end.

Team PlugInBaby hard at work on frontend development

Front End:

The front end was written primarily in JavaScript and utilizes server.js for Node.  To accelerate development we started using a boilerplate/skeleton for Node.js web applications. We later used bootstrap and AngularJS to improve the styling and make our web app mobile-ready and responsive.

Users can query the tangle for the transactions of vendors with free stations and also read dynamic pricing information. The search mechanism uses information written to tags while the state information about the charging station and the station latitude/longitude are written in the message. This information is then passed via API calls to the front-end for interpretation in the UI.

User Experience:

UI Workflow
UI Workflow
  • Step 1:
    The user uses a smartphone app to query the tangle for available charging stations.
  • Step 2:
    The user selects a charging station from the map. Each station has dynamic pricing which is shown in real-time along with the map pin when selecting the station.
  • Step 3:
    The user drives to the station and lets the station know that they have arrived by sending a message to the tangle.
  • Step 4:
    The charging station tells the app that the car is fully charged.
  • Step 5:
    The user’s IOTA wallet is debited and the transaction is signed by the seed stored in the app.
  • Step 6:
    The charger resets its status to available on the tangle and all the transactions/messages are available for verification.
Tangle Output
IOTA Tangle output: Following charging all transactions are available for inspection in the tangle.

What We Learned:

The PlugInBaby PoC demonstrates the feasibility of an IOTA-based search and payment app for IOTA-based DIY chargers but it is far from ready-for-use outside of the lab/hackathon. A number of issues came up which will need to be solved before this system would be appropriate for public use.

  • Tags only allow for 27 characters which wouldn’t be enough to store latitude and longitude data plus a transaction ID without truncation. The team ended up using the message field to store data (location + charger status) while the tags were used to store a searchable charger identifier.
  • Speed is quite limited on the testnet. Specifically, we found that the testnet confirmation times were quite long late at night (2-3 minutes) when fewer users were online running test applications. This is due to the fact that each new transaction must approve two other transactions. This approach scales well but also requires many active nodes to submit and approve transactions. As both the testnet and the mainnet grow this problem should be mitigated.
  • Transaction caching was required to make the demo useable within the alloted three minute presentation time.
  • While the support from the IOTA team was excellent, we noticed that the documentation, particularly regarding the phython libraries, is quite lacking. This makes development a slow trial and error process.
  • Security and privacy are generally open questions within the IOTA ecosystem. The team assumed these issues to be outside the scope of this PoC. That said we raised privacy concerns regarding the possibility of API misuse and the lack of privacy often during the development process. Improved documentation and more descriptive error messages would go a long way towards making these issues easier to handle.
  • Masked Authenticated Messaging (MAM), the planned Private Transaction layer, and the integration of zero-knowledge-proofs into the IOTA ecosystem are exciting areas for new research given the current limitations of IOTA in the area of security and privacy.


To sum up, the team learned a lot about the implementation of an exciting use case that really makes sense for IOTA. Is this the only way to build such a system? No.  There are many other ways to find, navigate to and pay for electric vehicle charging. Many market-ready centralized systems are already up an running.  Our PoC demonstrates, however, that it’s possible to solve this use case using IOTA alone which allows for the possibility of a scalable decentralized approach. This, in turn, could open up the field to many more players and provide a common system for various entities to build upon.

Hackathon Participants
Team „PlugInBaby“ at the IOTA Hackathon in Gdansk, Poland

 Here is an overview of all reports on the IOTA Hackathon’s projects:

1st place – “PlugInBaby”:

…describes the idea and the pivot of the project
Team “PlugInBaby”: Open Car Charging Network (Part 2)
…describes the technical level and provides resources

2nd place – “Freedom Pass”:
Team Freedom Pass: Fraud Detection (Part 1)
…describes the high level of the project
Team Freedom Pass: Fraud Detection (Part 2)
…describes the technical level of the project

Organizing a System of 10 Billion People

In this post, I will make some predictions on the nearer and farther end of the Quantified Self movement. Using McLuhan’s Tetrad, I will argue that Quantified Self will get huge incentives from enhancing healthcare, crowdsourcing science, and support a strong common ground, people will organize their life upon. Also, Quantified Self will weaken institutionalized medical care, and it might even obsolesce governmental surveillance by pushing moral control from institutions back to communities. By this, Quantified Self retrieves a form of communal life that could be called a bucolic, but also global village. Finally, Quantified Self, together with the web and social media, can become part of an adaptive, global operational system that make a population of 10 billion people sustainable.

Organizing a System of 10 Billion People

Quantified Self – this means tracking your life, analyzing the data, sharing intimate details, and changing behaviour. Self-tracking has become a huge thing recently. It is a complex built on three rather new technological pillars: wearable technology, hardware to measure your life, sensors that everyone can carry around, second ubiquitous mobile technology, thus the means to emit the data at once into the cloud, and finally social media everyone participates in and by which everyone is connected to everyone else.

The third column, social networks, has already laid the ground for people to accept, their lives becoming more transparent to others, to keep track on many things, like their friends and interconnections, their daily routine like food which they take images of and share, and also the special events, the highlights, that are in particular shared.

So, tracking your life and sharing it with others has become a rather common thing. Quantified Self now ads measured data to that. Be it your work-out, your running, cycling or other sports activities, be it dietary data, or be it data about chronically conditions, your blood pressure, your muscular tremor or even your mood.

Quantified Self already supports the lives of people suffering from bipolar distortion, from Parkinson disease, cardio-vasculary disorders and many other objectives that would usually demand a much higher attention from medical doctors than anybody can afford or would like to maintain because of its time consumption.

What does Quantified Self enhance?

From healthcare to selfcare

To keep people healthy, more self-determined even under chronic conditions, is a huge, immediate benefit of Quantified Self. By providing cheep analytics like test strips for all kinds of metabolic blood tests, easily ordered via Amazon, Quantified Self brings medical support to people living in regions without hospitals nearby or without standard public healthcare systems.

This benefit is strong. It alone will promote Quantified Self to a huge extent. When a society realizes how much efficiency is gained by citizens tracking their vital data, there will also be monetary incentives for doing it. This might start with getting tax breaks or deductibility, and go on with discounts on health or life insurances.

Crowdsourcing science

Quantified Self does not only support the self-trackers themselves. It is also collects data on many individuals. Self-tracking does not only include tracking health. People track their whereabouts, their financials, and – often without being aware of – all kinds of other data tracked by their smartphones automatically and continuously. Thus, Quantified Self is in fact a huge collection of different experiments on social behavior, mobility, health, life conditions – on a large scale. Some experiments are literally crowdsourcing the data collection to the self-trackers.

The benefit of having this data available is huge. Doctors’ records are only showing a small portion of people’s life. Quantified Self can draw a much more complete picture. Huge advances in early diagnosing illnesses and finding cures for individuals will be possible.

A common ground

Sharing personal data via Quantified Self also works as an extension of sharing thoughts, opinions, and events via social networks. You connect with others by sharing your life, and particularly by exchanging with others, getting back from them what you gave before. Sharing creates bonds that wave the social fabric denser. We realize what is relevant to others, what is the matter with them, and we can show respect for their condition.

What does Quantified Self make obsolete?

Disrupting medical care

Bringing your own medical data to the doctor will certainly not only create joyful reactions. Self-tracking is the first step of becoming more independent from experts. Whenever people started to massively share things, two developments occurred: crowdsourcing became more and more efficient and effective, and the proprietary hubs decayed. We will see this happen. Most likely, it begins at the periphery. First, the classic practitioners will feel decreasing numbers of visitors. The small laboratories will see falling numbers in prescribed analyses. Maintaining a small medical shop will become less and less profitable.

People will also become more demanding. The passive that is the etymological root of patient will change into active, educated, knowing, and no longer taking the expert for granted. People will start to question the solidarity of health insurances. Why would they still pay for others who willingly and consciously bring their health at risk? Of course they would demand discounts, making risky behavior even more expensive. In the end, with most medical support at hand, provided by advanced self-tracking analytics and the crowd, people would not only have become autonomous, but also autarkic.

Surveillance becomes pointless

The spook business might get in trouble with Quantified Self, too. This sounds contradictory at first: didn’t the NSA turn Facebook, Google, and the whole web into a giant surveillance machine? Surveillance is characterized by entities watching many “objects”, which often are not even aware of being watched. This is what the prefix “sur” means: from above. The end point of surveillance is the panoptikon as envisioned by Jeremy Benthem in the 18th century: a society confined within a circular prison that surrounds a central watchtower. Very few guards are needed to contain a panoptic prison.

With every step in life becoming tracked and stored, it will be increasingly difficult for authoritarian security forces to conduct their atrocities that keep people small. We already witness police violence all over the world, documented and published at once, via smartphone. Surveillance turns into souvaillance, watching back. Without the hierarchical gradient, surveillance as means of suppression becomes pointless. If it is just evidence for wrongdoing that is needed, people voluntarily will provide that with their own gadgets.

What does come back from the past through Quantified Self?

The Global Village

The all-seeing panoptic eye of governmental control will vanish. What comes instead is your neighbors being able to see into most of you and your life. Society will degrade to community. As people start to question insurances and ask to bring their own wellbehaving into calculation, people will also start to question anti-communal behavior as a whole. Instead of showing off with prestigious wealth, locking yourself behind gated communities, keeping “the 99%” outside, provoking aspiration, people will start to pose as meaningful members of the community.

People will care. Everyone becomes their neighbors’ keeper. Help is always near, as is judgement. This of course bears some serious problems: while some behavior in public is broadly accepted for men, the same might be taboo for women. Narrow communities are usually not too tolerant against those deviating from what is regarded as “normal”. We will have to fight unprecedented forms of ableism – the movie GATTACA might serve as a good illustration.

No longer being on your own means becoming embedded into a lively community with all its warmth and kindness, and at the same time, coming under the full power of moral control. Individual deviance might get strictly sanctioned. Although deeply liberal by empowering the personal self, the quantified society will enforce communal morale. A bucolic global village with communitarian moral control might not sound like fun. However, compared with authoritarian security regimes most of humanity has to live with nowadays, is far worse. Quantified Self guides people to act responsibly for themselves as well as for others. In the end, we might gain more freedom than we give up.

What does Quantified Self finally flip into?

Stabilizing the global society

Quantified Self as extended social media weaves a smooth tissue of social fabric between people on a global scale. The emergent communal control warrants sustainable behavior like no legal system ever could. By building a communitarian, voluntaristic moral society of all humanity, Quantified Self might be a step towards a global social operating system.

System theory (although I am not really fond of it, I must admit) gives a good explanation, why global movements like social media and Quantified Self have occurred just now and why both will not be temporary but will accompany us for a long time.

When the global population started exploding at the beginning of the 20th century, major disturbances took place even threatening the further existence of the whole system – mankind: the world wars, atomic warfare, destruction of the environment, climate crisis, and huge economic inequality, to name a few. However, systems tend to stabilize. I believe that the web, social media, open data, and Quantified Self may let the system regain stability under the changed condition of a population unmet in size and density.

The noo-sphere

With social media, we already feel permanently connected to our community. With self tracking, we will be aware of our peers even more seamlessly. First, we will be connected with others cognitively and emotionally, but with wearable technology this connection even turns physical. Also, we will become aware of all the data that surrounds us. Data will look like extra dimensions invisible for the unarmed eye, but meaningful and rich for our head-up displays and also getting directly knit into our lives by interacting with our health and wellbeing. We already experience the world getting augmented by the data-sphere. But this experience of specialness will vanish. Data will become integral with our sensory, biological self. And, as we get more and more connected, our feeling of being tied into one body will also fade, as we become data creatures, bodiless, angelized.

Note on McLuhan’s Tetrad
McLuhan’s Tetrad: a framework to foresee effects of changes of media and technology on culture and society in different dimensions.

Health, Fitness, Science, Communication
Temperance, Communal Life, Caring, Bucolic Village, Moral Control
Quantified Self
Reverses into
Organizing a System of 10 Billion, Noo-Sphere, Angelization, Weltgeist
General Practioners, The Psychiatrist’s Couch, Surveillance