February 26, 2020
Building an IoT solution where a mobile app talks to a device always means thinking ahead to ensure they will properly exchange data. For this, a stable app-to-device connection is required. Our team recently built a mobile application that operates a smart thermostat. We interviewed the developers to see what they did to solve the connection problem.
An air conditioning manufacturer wanted to create a mobile app (iOS, Android) for their connected thermostat. The application would display current temperature settings and allow users to remotely adjust their home temperature.
The client had a system of distributed servers underpinning the thermostat’s logic, which meant heterogeneous sensor data were stored on different servers in the Skyport cloud.
Thus, we needed to connect the app to multiple servers and make sense of the heterogeneous sensor data.
We had the option to develop an app and connect it to the Skyport servers directly. However, this type of connection would have lacked flexibility—any changes in the data or server operation formats would have required changing both the Android and iOS apps on the code level.
Going down this road would not have been the expert route, as the code would have ended up being difficult to maintain and extend.Andrew, Android Team Lead
We added an additional back-end layer between the device and the servers that adjusts the connection with Skyport.
Our back end functions as a middleware solution. It collects data from various servers, patterns it, and delivers it to the mobile app in the required format.Konstantin, Back-end Developer
As the data are homogeneous now, the connection between the app and thermostat is more stable. It is a lot easier to add new features, as we just have to update the back end and the app versions instead of updating both the Android and iOS apps.
For these modes we needed to develop several visual components:
We needed to implement a custom UI to view weekly temperature schedules. As we didn’t find a ready-made basic scrolling component that helps users to toggle between the days of the week, we had to develop one from scratch.
We decided to create a multi-purpose widget to display any range of days on the screen that the customer required. This allowed us to customize the display settings as we saw fit.Sergei, Senior Software Engineer
We created widgets that showed when Away and Schedule modes were deactivated so users would know what to expect and could plan accordingly.