Combining the power IoT Sensors and Artificial Intelligence/Machine Learning to Predict Occupation

At Asteria, we are passionate about connecting the world. Our latest product, Gravio is designed to bridge the potential of the physical world with the power of software. We worked closely with our partner Kortical, a provider of AI and in London to test how far we can push it combining their AI/ML SaaS platform with our sensor data gathered with Gravio.

The Hypothesis

We wanted to find out how accurately we can predict the number of people in an office based on just one door sensor that detects door openings.

We also wanted to explore how the accuracy can be improved by mixing in other data sources such as the employee’s diaries indicating external meetings and public holidays.


Picture of Gravio Hub IoT solution and Aqara/Lumi door and windows sensor
Picture of Gravio Hub IoT solution and Aqara/Lumi door and windows sensor
Gravio Hub left, and rentable door/window sensors on the right
  • After a few weeks of data collection, the raw CSV data from the sensors alongside with manually validated data was injected into the Kortical platform for analysis and training. For this process, the Kortical platform trains and tests thousands of different models completely automatically.
GUI of Kortical platform “The Kore”
GUI of Kortical platform “The Kore”
Training interface
  • Based on the historical injected data, the Kortical platform can start making predictions in the future.
  • The models can now be fed with real-time Gravio data to make accurate predictions.
  • The predictions can then be visualised in standard dashboards such as Microsoft Power BI, Google Data Studio, Tableau, or in a custom JavaScript-based dashboard on a screen. Gravio can also trigger external actions such as sending a Slack message or an SMS through the off-the-shelf Gravio action components.

The Findings

After the 3 month trial, we could identify a confident AI/ML model that would be able to predict the number of people in the Kortical office with an accuracy of 1.5 people out of 15 using just one Gravio door sensor and a Google Calendar integration.

Statistics of predictions and actuals of Gravio sensor data source only
Statistics of predictions and actuals of Gravio sensor data source only
Predicted vs actual data from door sensor only
Statistics of predictions and actuals of Gravio sensor data source combined with calendar data
Statistics of predictions and actuals of Gravio sensor data source combined with calendar data
Predicted vs. actual data from door sensor and calendar
Deviation of prediction vs. actual diagram
Deviation of prediction vs. actual diagram
The difference was a maximum of 1.5 people after picking the right prediction model and data source

The experiments also revealed the main indicators and factors that determine the number of people in the office:

Door sensor only: the day of the week was the biggest indicator of the number of people that are going to be in the office.
Door sensor combined with calendar data: The calendar data became the second most important indicator.

The benefit of using a door sensor rather than a people counting camera is the price, setup cost, maintenance cost and last but not least the protected privacy. This experiment demonstrated that cost-effective sensors, a simple setup and a strong AI/ML platform can potentially be an excellent alternative to complicated and heavy-maintenance surveillance gear.

The Potential

The teams at Kortical, as well as Asteria, are convinced, this setup has great untapped potential, and many systems in the future will be set up in that way in order to be more efficient, reliable, cost-effective but also extensible. Businesses in the future will want to move away from using purpose-built systems (such as people counters) to more generally applicable and flexible systems (such as a Kortical/Gravio combination) in order to use it more flexibly, reliably and also for being able to hook it into other systems by triggering third party actions and integrating into other APIs. Furthermore, additional layers of Artificial Intelligence and Machine Learning will be able to not only make predictions but also, in combination with other real-time counting mechanisms, detect anomalies based on how a prediction stacks up against the actual measurement.

The combined system can then also make decisions based on detected patterns and determine automatically when humans should intervene in a system. This mechanism could potentially make many “monitoring” tasks much more efficient and reliable.

Potential Applications

  1. Airbnb hosts could install a simple system and a door sensor to detect how many people are actually renting their home. This way illegal Airbnb parties could be prevented or at least detected.
  2. Speaking of parties, an event venue could use the sensors on their doors to detect the number of people during an event and also to determine the remaining capacity of the venue for safety and security reasons. This could replace the cumbersome manual counting that many bouncers currently conduct manually.
  3. Retail spaces could use a similar type of sensors to predict the footfall of a shop or restaurant, and determine how the footfall changes if parameters inside the shop such as ambient light, sound, shop window decoration changes.

Next Steps

Currently, due to the computing power required to calculate the models, the system runs in the cloud, and the learning vs. application phase are distinct phases. We envisage a future where these kinds of learnings are conducted in the edge, independent of network connectivity, and in real-time with ever-improving, recursive/recurrent, deep AI/ML models. Asteria, as well as Kortical, are excited to explore in the future, how both our systems combined are capable to create more value than the sum of its parts.

About Gravio

Gravio is the IoT Platform of Asteria, that connects sensor data, machine learning, artificial intelligence and connectivity to third party applications. Visit to get started with your own sensor kit.

Technology. Design. User Experience. IoT. Switzerland ~ London ~ Hong Kong

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store