Sponsored Looking around the environment you currently live in, can you spot how common IoT is? You might own a smartwatch, a plant monitoring device, a smart bulb installed in your lamp, a smart air conditioning system or even a smart building. All these devices are usually connected online and provide various services. Unfortunately, the devices are equipped with a broad range of connectors, APIs, and interfaces that differ from one another, making them challenging to integrate. An interesting approach would be to create a single application, which would communicate with the devices and gather information from the sensors.
However, would it even be possible to develop such a solution in one neatly designed modern application? If so, would it be extremely difficult? With low-code, it’s not impossible or difficult! At Objectivity, we proved this to be true when we got the opportunity to create an application which tackles one of enterprises’ most common problems – limited parking spots.
In preparation for the Mendix World 2019 conference, we created a prototype of an application that would help solve this very issue – The Parking App. This prototype was our successful attempt at implementing IoT integration using the Mendix low-code platform and other complimentary services.
The Parking App
The main goal of the application is to ensure employees that a parking spot is waiting for them when they arrive at work. Thanks to the app’s features, they don’t need to drive around looking for an available parking spot – they know the number of the spot in advance, once booking is confirmed. One of the main requirements was to make the app very simple for end users to use and to minimise the number of required actions needed to book a parking spot. We also added an administrative module for the management of the parking configuration and for reporting and analysis purposes, so that improvements to parking management can be suggested in the future.
As the IoT devices, we used the widely available ESP8266 with additional HC-SR04 distance sensors. The devices measured the distance from the object – in our case from a car model. If an object reached a certain proximity from the sensor, it triggered a call to an external API which then signalled that there is a car in our parking spot. Once the object moved away, the call was triggered again, stating that the spot is now available. The device included two red and green diodes, which indicated whether the spot is booked or available, respectively. We created two devices of this kind, which are capable of acting independently from each other. However, the architecture enables the solution to be easily scaled and for new IoT devices to be added without much extra effort.
The application also included an integration with Azure Functions, which took over the traffic generated by the IoT devices. Additionally, the Azure Functions (which also made use of Cosmos DB) stored the information about the status of IoT devices.
Whereas the Mendix application was used for integrating the abovementioned IoT devices and Azure services. It provided a user-friendly interface for both mobile (end users) as well as administrator web access. We also included a Power BI reporting tool for the management of data that allowed for the visualisation of interactions within The Parking App.
Below is a typical scenario of application usage:
1. You request a parking spot.
2. You’re given the number of an available parking spot (if one is available), thereby also commencing the countdown until the reservation expires.
3. You arrive at the appropriate parking spot, marked with a red LED diode.
4. You receive confirmation that you parked your vehicle.
5. You depart from the parking spot and receive a mobile notification that you left (the LED diode turns green).
Obviously, there are a couple of cases where the happy flow described above will fail, hence the application is extended with several additional scenarios which handle those exceptions. All in all, The Parking App is not a final product yet and is still being improved on. However, even at this stage, it has already showed us that IoT integration using the Mendix platform is straightforward and fast, and that it can yield results sooner than expected. If you would like to find out more about The Parking App, do not hesitate to reach out to us directly.
How is it integrated?
When it comes to integrations available within the Mendix platform, the variety of native components is something that usually fulfils most of the requirements given while developing an application. The platform offers a number of possibilities to easily consume and publish an API in your solution, and covers:
1. App Services
4. Web services
Some might think that low-code platforms are limited in terms of their functionalities and that they only solve a narrow range of problems (such as the most common ones). However, it’s worth noting that low-code development platforms are constantly evolving, and new features are being added almost on a daily basis – making them very robust tools for rapid application development.
At Objectivity, we look at low-code platforms and the features they provide as a baseline which can be easily extended and customised with additional extensions. What’s also important is that, by applying different architecture designs, it’s possible to solve many of today’s current IT problems. The Parking App is a good example of how we can tackle some of these issues through leveraging one of the platforms we use in our daily work.
Editor’s note: For more information on how low-code can benefit your organisation, download Objectivity’s latest whitepaper: “Gain more by doing less”.