How to Make a Software for the Internet of Things (IoT)?
In the era of digitalization, many aspects of people’s lives are being significantly improved by remotely controllable devices & whole infrastructures — the so-called Internet of Things.
This industry is continually growing & bringing new products: a nearly $250B market is starting to surge and projected to be no less than 5 times bigger by 2027.
Not only “things” get improved but software for its remote control gets diversified as well. Nowadays, it can be fully tailored to your specific devices. Apps for smaller “things”, i. e. for a smart home and extensive dashboards for large-scale devices, from medical appliances at hospitals to smart sprinklers on agricultural fields.
So, if you’d like to build IoT software of any type or simply learn more about it — welcome!
✅ Top Things to Pay Attention to When Developing a Software for Your IoT Device
The process of IoT software development may be quite a challenge in terms of technological nuances. Yet, to avoid potential pitfalls and make the Internet of Things development process smoother and easier, we recommend paying attention to a few things. Here they are!
Firmware is a software program that’s “responsible” for communication between hardware systems:
- Hardware Boards.
- Edge Computing.
The firmware can be developed using different languages from C to Python. The most basic & easy-to-use platform for developing the firmware is Arduino.
As for the software (with the successfully functioning firmware) management features development, we at Stormotion use various tech-stack such as React, React Native, Java/Kotlin, and many others.
Depending on your use case, certain teck-stack might be more suitable for you.
If you need any help with the development or want to decide which tech-stack can be more suitable for your use case, feel free to reach out to us!
What we’d like to draw your attention to here is firmware updating. Nowadays, the easiest way to do it is Over-the-Air (OTA) updates. Meaning that the new version will be simply installed remotely.
It’s that important since sometimes it can be prohibited for users to stick to the older versions of firmware, which, basically, blocks access to the thing until it’s updated.
Imagine if somebody won’t be able to open the door because of an outdated version of the firmware when being late for a flight. That can damage the brand’s reputation and cause a loss of trust.
So, first and foremost, think about making it optional or warn about the forthcoming update several times in advance. Moreover, it might be a good idea to offer users to schedule it by themselves.
If your use case implies integration of third-party devices, you should pay attention to these aspects of IoT software development:
- Data Acquisition Module.
- Data Processing Module.
- Communications Module.
Let’s review them one by one.
# 1: Data Acquisition Module
The Data Acquisition Module is a part of the hardware that helps to receive physical signals coming from a “thing” and convert them into digital signals that a computer is able to process.
The physical signals here imply:
- Light & others.
When working with this part, there are several aspects that we’d recommend taking into account:
- Signals that will be measured. It’s essential to decide on what sensors and devices for measurement you’ll need.
- The number of sensors.
- The needed speed for physical signals measurement — indicators such as sample rate.
- The measurement accuracy needed — indicators such as sensor resolution.
Once you have answers to these questions, it’ll help you determine the requirements for this module (your use case, particularly).
# 2: Data Processing Module
This part of the devices serves several goals:
- Data processing.
- Data storing & other computing operations.
Your role here is to clearly understand & explain the end goal of the Internet of Things development so you can guide your development or engineering teams.
Here, the key points might be:
- The amount of data that’ll be processed. This indicator will depend on the number of sensors, whether you need real-time control and analytics or not, how much space you want to leave for future updates, size constraints, etc.
- The amount of data you’ll need to store locally. So, the data you’ll obtain can be either sent to the Cloud (or any external storage) or stored locally. Defining how much data you’ll need to store temporarily to do all necessary calculations or for buffering purposes if your cloud connection is off. Besides, don’t forget to consider whether or not you’ll need your “thing” to work offline, and if yes, for how long — it defines the capacity of the local storage.
At first, it may seem not that significant but eventually, these two indicators will have an impact on your development costs, size of the “thing”, number & complexity of features, etc.
# 3: Communications Module
This part of the hardware is intended to enable communication between your external storage and with any third-party integrations/devices.
It can be set up by using communication ports such as USB or wireless protocols (we’ll talk about that in the next subsection).
This device can be either integrated with other parts of the hardware or be a separate device. The second option is called a gateway architecture.
It might be more cost-efficient since you can place only one gateway for an area that will collect data from all sensors and send it to the storage.
How to Choose the Right IoT Connectivity Option?
When developing a platform for the IoT, you need to enable data exchange between many layers and parts of the structure — “things”, gateways, sensors, servers, end-user solutions, etc.
This communication is possible because of the so-called IoT protocols which can be considered a language that machines use for data transmission.
There are quite a few of them, so when choosing one protocol for your IoT solution, there’s a number of factors that should be taken into account. For instance, bandwidth, connectivity range, power consumption, price, industry, and many others.
For you to better understand what all these protocols are about, we’ve decided to make a table with the main characteristics of each protocol:
|Wi-Fi||10- to 100-meter connectivity range, affordable & widely-used. However, its efficiency depends on how far from a signal source the device is|
|Bluetooth||There are options with 1, 10, and 100 meters of connectivity range, high data exchange speed & decent security level, low costs|
|LPWAN||A large range up to 40 kilometers (or even more), data transferring speed, and energy consumption are low, widely used in agriculture, urban development, transporting, etc.|
|Ethernet||Controls the data transferring via the Local area network (LAN), must be physically connected to the devices by using cables, high speed of data down- & uploading|
|RFID||Consists of readers, tags, and application, is enabled by attaching tags to the objects, don’t require line-of-site so many signals can be read remotely from different places|
|Cellular||The widest bandwidth among all protocols, high energy consumption, may not be a good option for remote use of battery-powered networks|
|ZigBee & Other Mesh Protocols||Low current and intermediate power consumption, 100-meter connectivity range. Simple in use, resistant to unauthorized readings and data exchange errors, scalable, with a big number of nodes possible to place|
|MQTT||For battery-powered devices, low energy consumption, easy-to-use, operation over wireless networks, minimum bandwidth use|
|DDS||Designed for real-time M2M communication, scalable & fast data exchange. It’s not that popular among IoT solutions but still used in industrial IoT such as transports, robotics, etc.|
|XMPP||Best for consumer-oriented IoT, scalable. However, doesn’t offer Quality of Service or end-to-end encryption (E2EE), which worsens the security|
|AMQP||Great for queuing, message orientation, routing ( point-to-point as well as publish-and-subscribe), a decent level of security, robust communications model. NOT recommended to use for sensor devices with limited memory & power/network bandwidth|
|LwM2M||Designed for resource-constrained devices specifically, great for device management and telemetry|
🕳️ Potential Pitfalls & How to Avoid Them
When developing an application for your IoT device, it might be useful to know about possible nuances that can negatively impact your costs, quality of the user-experience, or the development speed if approached wrongly.
So, let’s briefly review the main pitfalls that can await you during the development.
# 1: Firmware
As we have already discussed, firmware enables the communication between the parts of your hardware.
What’s important here is that the development speed will directly depend on whether or not your firmware is ready-to-use.
In case it’s ready, the only thing at this stage of development that can slow the process are bugs that are normally solved quickly.
However, if the firmware is at the early stages of development, the process becomes markedly slower. It’s because it might be complicated to control both Internet of Things development processes (application and firmware), test them, fix bugs, etc., simultaneously.
So, we’d highly recommend you consider looking for devices with already developed and tested firmware before you start the Internet of Things software development.
# 2: Security
One of the major problems of the IoT industry is security since there are not enough standards that developers/engineers can follow to make the system 100% reliable, which means that they have to figure out their own way to do it.
Besides, the number of devices such as sensors is high for most IoT solutions that make them more vulnerable and easier for hackers to spot a breach in a security system.
To increase the security, think about doing the following:
- “Security by design”. It’s a system that allows to prevent rather than fix any breaches in a security system with help of regular testing, authentication safeguards, and following the best cybersecurity practices.
- Regular updates. Through trial and error, you can figure out the best way for you to make the device as secure as possible, so we’d recommend making updates as soon as you have something to improve in your security system.
- Use reliable certificates such as SSL/TLS for encryption and authentication.
- Multi-factor authentication. It can include biometric authentication (fingerprinting, face- and voice scanning, etc.), end-to-end encryption (full encryption of the next that only a sender and recipient can read), personal questions, email/phone number confirmation. Complex password that’s changed once in a while, etc.
# 3: Inconsistency
If your app is intended to allow users to control several devices within one app, you might face the problem of your app being inconsistent with certain devices from other brands.
Per se, if a user buys your smart toaster but then opts for a fridge from another company, you can’t guarantee that they’ll be able to combine these devices’ control in your app, which can damage your services’ quality.
All of that is because the standardization isn’t unified, all companies use different APIs, protocols, and security features.
And the most tricky thing is that you can’t really do anything about it. The solution might be to allow integrating third-party services through their APIs, but that depends on your specific use case.
# 4: Recovery Mode
It might be a good idea to add a recovery mode into your IoT application for cases when users need to restore the lost data from a cloud or another storage for whatever reason.
This feature is something that should be implemented before developing an app as well since to do so you’ll need to allow access to the device's bootloader, which is easier to do when manufacturing the “thing” itself.
# 5: Quality Assurance
Each & every update of the IoT firmware should be then tested how it affects the application to fix new bugs, test the app’s behavior, see if a cloud or another storage are synchronized well enough with the systems, etc.
However, the most important part here is that these quality tests can’t be performed well enough as a simulation, meaning that your development team might need to do it manually or with real devices (if possible) so that services you provide are as seamless as possible.
☁️ Platforms to Use for IoT Development
So that the IoT development would be a little easier, there are various platforms on the market — a ready-to-use set of features and tools. Its functionality can cover various needs such as connectivity, data flow, app functionality.
Let’s take a closer look at what services an IoT platform can provide:
- Hardware connection, e. g. between a “thing” & sensors.
- Work with implementing and managing protocols.
- Add authentication and security features.
- Analyze, gather, and provide infographics of the data from sensors “things”.
- Connect current systems with the parts of the hardware.
To navigate you through an IoT platforms market, we’ve decided to make a list of the most widely-used & trustworthy platform providers with a variety of services. Here you are:
- IBM Watson.
- Azure IoT from Microsoft.
- Google Cloud IoT.
- AWS IoT.
- Salesforce IoT.
- Arduino IoT Cloud.
- Carriots (or Altair).
In fact, there’s no specific case when we could tell that you likely should use an IoT platform, or a specific type of it like a cloud-based one — it really depends on your personal preference.
However, by using such a platform, you can speed up the development process and reduce the up-front costs. Yet, in the long run, it might be less beneficial since the fee is usually for subscription or use-based that can increase in the future.
⚙️ Top Functionality of an IoT Software
In this section, we’ll review the main components of IoT software ( which can be developed as a mobile app, website, dashboard, etc.) services that a user might need.
However, we’d like to draw your attention not to the feature itself but to certain nuances and non-obvious aspects it may have.
# 1: Data Collection 📥
The backend of your software is responsible for data collection and, in fact, there are multiple ways of how you can organize it, which can save you energy, resources, and money if chosen correctly.
So, your data collection strategy can depend and be based on these factors:
- Frequency & Accuracy. Basically, in this method, you correlate the desired accuracy of the data with the frequency of collection needed to reach it. It can happen if a certain level of accuracy is sufficient, with a higher level not giving any additional value. So, you can reduce the measurement frequency, which will save you resources used for data collection while still allowing option accuracy level.
- Time. In case there’s a specific period of time, after which the data won’t be considered fresh and relevant, you can set a maximum time gap between the last and the next measurements. In this way, your data collection will be performed with an interval fully tailored to your use case.
- Energy. In fact, this one is similar to the frequency example. However, here the key factor is energy consumption, meaning that a certain accuracy & amount of data is sufficient and the energy consumption can be minimized to as little as it’s enough to reach the goal.
- Privacy. If you need to measure only a certain amount of data without going any deeper even by accident, you can add the so-called “noise” to the measurement process. It’ll interfere process once the needed level of data accuracy is reached, allowing you to still be compliant with all necessary regulations & respect privacy.
# 2: Data Processing 🔄
Data processing is quite demanding in terms of resources, meaning that you should be attentive when deciding what to process and what not.
First and foremost, you should pay attention to how much data you need to analyze to keep your system functioning. After that, try to limit it to this amount of data so the process would be cost-, energy-, and time-efficient. Besides, you’ll need additional tools for handling the data which creates additional costs.
If you use third-party processing solutions, make sure to properly look into their statistics and your service agreement (which is often neglected). Something you might look for is how often the system is exposed to breaches, what are the terms of changing the vendor, etc.
Furthermore, it might be a good idea to allow real-time data processing since it can be essential for some industries like agriculture, healthcare, weather forecasting, or even smart door locks.
# 3: Data Storage 📚
Normally, IoT devices don’t have much storage which makes it essential for most use cases to use external storage.
So, when choosing this storage, you should pay attention to its ability to quickly retrieve the data for whatever needs. You can also use the one that allows searching the data by timestamps and other filters so you could easily find what you need.
Additionally, it might be a good idea to make the data exportable and moveable to various formats to see different highlights for comparison & analysis.
# 4: Data Engineering 📊
Data analytics is one of the crucial activities that IoT solutions perform to be able to function & bring value to end-users. Its core function is to separate the chunks of data that come in every day while “things” are functioning and extract the necessary information from it so it can be transferred to a user.
Basically, this is the process that needs to be done before visualizing it for customers so they won’t have to look at raw data but at something valuable to track dynamics, have clear conclusions, and make data-driven decisions.
It’s essential to offer real-time data analysis so users can take immediate actions when needed (depends on each specific use case). Additionally, the data analytics can:
- Be performed over a given period of time so users can observe the general tendency and trends.
- Offer conclusions and steps to take, based on the analysis.
- Help you make marketing campaigns more personalized and targeted & others.
# 5: Data Visualization 📈
To present the analyzed data to end-users, you’ll need certain tools for visualization. Most often, this function implies:
- The visualization itself (Real-time table, sensor overview, charts & tables, etc.).
- History so users can access previous data visuals.
- Notifications to make sure that users know when something new comes up.
- Alerts — something that requires immediate attention and/or action.
We’d like to pay special attention to alerts. Here, it’s of high importance to develop a habit to instantly pay attention to the urgent situation, and you can help your users with it.
Think about adding special sound effects when an alert comes up or marking it with a flashy icon so it’ll stand out among other ones.
Also, it might be a good idea to categorize the visualized data. To be more specific, don’t offer too many graphs to represent the same data but for different variables. Instead, consider making it manageable for users to choose what variable is represented now.
Take smart sprinkles as an example. Instead of showing humidity on each field with separate charts, add a tab where the users will choose what field to represent.
# 6: Device Management 💻
You’ll most likely need to add different features for users to control the “thing” along with its components. It often includes:
- Provisioning (adding a device to the system) and Authentication.
- Configuration and Control (turn on/off, change modes, etc.). It’s important for further control of the device’s components (like frequency of data measurements, data transferring to the cloud, etc.).
- Monitoring and Diagnostics. This feature is intended to display all processes, warn if something is off, and regularly diagnose to see if there are any breakdowns.
- Software Maintenance and Updates. It can help you & your users to fix everything remotely (if possible).
Additionally, you can implement a feature for grouping parts of the device like sensors. It might be a good idea to add a hierarchy of groups. For instance, sensors are located in one device, and devices are grouped as a fleet.
Also, think about adding an extended searching feature to your device management functionality. It can include searching by:
- Device ID.
- Device state (on/off, working/broken, etc.).
- Device type (if you have several) & others.
This searching feature would be more suitable for broader “things”, for hospitals, per se, however, it’s applicable to devices of any type & scale. Everything depends on your use case.
🤖 How to Integrate an IoT with Third-Party Devices like Google Home & Alexa?
Once such virtual AI (artificial intelligence) assistants entered the market, it was truly disrupted. And the good news is that you can integrate your IoT device with them to provide additional value to your users.
Naturally, each assistant provider that makes their devices integrable offers an API for this purpose. Any voice-controlled command is enabled by “skills” and “action” in Amazon Alexa and Google Home respectively. These commands need to be implemented into a server, which will perform them by — it’s required for integration.
For Google Home, you can use any server but Alexa’s “skills” need to be executed on the AWS Lambda server.
Surely, there are many ready-to-use commands that are available, so it might be a good idea to educate yourself on these commands. In case you’ll find all that you need, you’ll be able to skip this step.
👨💻 Our Expertise: Platoon Fit & Vaping Device
Once we at Stormotion worked with Platoon Fit — a fitness project from Alex Obe that offers its customers 45-minute workouts with a special emphasis on health monitoring devices. What we did for them was data transactions integration from cadence and heart rate sensors that customers place on their body into the workout application. If you’d like to learn more about this case, feel free to follow the link at the bottom of this section.
What they needed us to do is to develop an app that will count the number of inhales, state of charge, amount of filler left, etc., which is a great example of how small devices can use data analytics for a better user experience.
Additionally, we’ve developed an application for a vaping device. This company made the so-called White-Label product, meaning that they’re not the actual manufacturers. They buy mainboards for the device and tailor them to their use case with several protocols.
What they needed us to do is to develop an app that will count the number of inhales, state of charge, amount of filler left, etc., which is a great example of how small devices can use data analytics for a better user experience.
💰 What Affects IoT Application Development Costs?
When planning your IoT application development costs, it’s important to make sure that you have enough budget. But while the exact numbers can’t be predicted since each case is unique, there are a couple of features that you and your development team might consider during calculations.
- Number & complexity of features.
- Scope of the device.
- Chosen technology.
- Third-party services costs (if needed).
- Your developers’ hourly rate.
As you can see, the process of IoT software development has quite a few pitfalls, needs to be thought out well in advance, and requires much technical knowledge.
However, the game is worth the candle since the market is relatively new, and most new “things” thrill the industry, allowing you to gain greater profits.
Keep in mind, your specific use case defines many things during the development. Surely, we can give you general advice and prevent you from making certain mistakes from our experience. But eventually, your preferences & needs will be the decisive factor in many cases.
If you need any help with the development and have some questions left, feel free to reach out to us. We’ll find a way to help you!