Published On 2020-05-12

Industry 4.0 Car Parking Marketplace (IOTA+iBeacon+ML)

A PoC for Industry 4.0 Car parking market place where machines negotiates and consumes service without human interaction.


How many times have you seen above sign? I bet several times if not hundreds or thousands. In the United States alone we waste $73 billions every year to look for parking. In Germany on an average one driver spends 48 hours every year searching for parking. This is just the waste of gasoline and diesel in terms of money. Now think about the CO2 produced by this extra usage of fuel. According to ABI research, 8 millions self driving cars will hit the road by 2025. We need a sustainable system where cars and garage can can communicate with each other in real time indicating which garage is available and take reservation within certain time ensuring less time in looking around. As a result less waste of resources and less pollution.


With the revolution of Industry 4.0 and connected machines, cars and parking garages can be connected. Utilizing IOTA market place a driver ( Service Requester, SR ) looking for parking ( short term or long term ) send request for service to the market place via Tangle. Nearby garages ( Service Providers, SP ) will send proposal against the request they received. Once proposals are received vehicle can approve or reject proposals. If driver accepts the request on vehicle dashboard, fastest route will appear on screen. Vehicle will start advertising iBeaconsignals and sends the iBeacon UUID to the garage.

On the other hand garage will be waiting for the vehicle to arrive by scanning that beacon signal. Once vehicle approaches near the garage, garage will receive iBeacon signal and send payment request to the vehicle. Once driver makes the payment, garage will be opened.

Working prototype / demo


This project is a perfect blend of cloud computing and IoT. Digram below may appear a bit complicated at first glance but I I kept the architecture as simple as possible. Entire communication is based on REST and MQTT protocols.

Car dashboard calls REST API of SR wrapper ( a python flask web app deployed on EC2 container) to initiate parking request. Wrapper then calls API of IOTA service requester deployed on another EC2 container. SR wrapper then listen for incoming request from MQTT and publish messages to MQTT which is consumed by car dashboard such as proposals, request for payments etc.

Other important and interesting technology I have used is iBeacon which is basically low energy bluetooth signals transmitted by HM-10 module every half seconds advertising it's 32 bit UUID, major, minor and rssi. Using rssi we can determine how close the beacon transmitter is. Using this technology we can determine if targeted vehicle has approached the garage.

iBeacon transmitter box

This piece is mounted in the car and communicate dashboard over MQTT. When car accepts a proposal, it sends a message to iBeacon box to start advertising beacon signal. I have used NodeMCU and HM-10 BLE module. LiPo battery and TP4045 charging module is optional is you have another source to power NodeMCU. Connection is super simple as there are only two wires.


HM-10 VCC to MCU D5

Upload IOTACAR.ino program to NodeMCU.

Vehicle Dashboard

I pretended an Ionic web app as running on iPad browser as vehicle dashboard. As Ionic is hybrid app, you can deploy as web application and display that on Raspberry Pi as well. I am leaving it on your imagination :)


Garage is a bigger setup compared to beacon box but fairly straight forward. Connect all the modules as per schematic and upload IOTAGarage.ino program to NodeMCU.

Autonomous Decision Making

We can choose to deploy a fully automated system where driver will just initial a parking request. Everything else from there on will be happen automatically. Using sophisticated ML algorithm using Tensor flow, both Service Provider and Service Requester can negotiate on pricing.

In this project, I picked automated proposal acceptance as the target use case. First of all we need to prepare the training dataset with various parameters which has influence on the decision making. I selected 5 ( distance, price, reviews, availability of surveillance camera, no of parking ) parameters. More is better. Now put different data and mark desired output of A ( accept ) or R ( reject ). In reality, we need to gather data based on real user interaction with several other parameters such as social safety index around the place, lights around the parking after dark, crime index etc etc. Once we have right dataset with thousands of data, we can build out model and train with training data. I worked on a tiny dataset of 58 records and model prediction accuracy is around 75% which is not great but at least you get the concept here. I did not spend much time to prepare a well distributed sample of data. You can go on and add another 100 records to get better prediction.

Once you are satisfied with the accuracy of your model, use it in your program to automatically take the decision to approve or reject the proposal. You need to store other parameters which were used to train the model such as reviews, number of parking spot etc. So you need to build a profile all service providers and maintain the data somewhere.

Checkout the full article on Hackster