IoT app development comes up often at SEP, since many of our projects integrate with a client’s devices. SEP’s consumer and industrial IoT software development page covers what we build, and this post covers what I learned on one project. On my project, devices reached users through a mobile app that connects to the device over Bluetooth and uploads its data to the cloud, or through the cloud and a web application.
I spent three months on an IoT product integration at SEP. The work spanned web, mobile, API, and cloud software, and I wrote this for engineers who are starting out in IoT or about to.
If you’re relatively new to IoT, and in my case to the company, an IoT app has a lot of moving parts to take in. Jumping into the deep end can be scary, even with an experienced, supportive team acting as a life preserver, but it’s how I learned the “IoT strategy.”
IoT App Development Across the Stack
My project stacked several layers.
- The device runs its own firmware.
- A connection layer carries data between the device and the cloud, and a mobile app can relay it over Bluetooth.
- Cloud services, such as an IoT hub, receive, store, and process the data.
- Web and mobile applications show that data to users and let them send commands back.
The lessons below come from working across those layers on one product.
1. Simulation Speeds Up IoT App Development
Pressing buttons on a physical device and waiting for it to run takes time. A client on a tight timeline may also have every spec for how the device should work before the device is in a working state.
Testing with a physical device is still how you confirm the integration works. So what do you do when that testing is slow, or impossible, while you’re working on a ticket?
A device simulator fills that gap and saves a lot of waiting on hardware. Using a device’s defined specs, we can build a quick simulation of it. Devices with similar specs can share functionality, so you rarely build a simulator from scratch, and a language that supports object-oriented programming makes that reuse easier.
Containerize the Firmware
If you can access a device’s firmware, as our team could, you can containerize it and simulate the device directly. We stumbled on this recently, and we were excited to stop writing some simulator code and let the existing firmware do the work.
Our emulated device had a Bluetooth component too. The mobile app connected to it through a Bluetooth board, and we tested that path by hand. Emulation also put more devices in play than we had physical units for, which matters when hardware is limited.
Seed Device Events
A seeding tool built on the simulated device helps too, because it generates many device events at once. Say you’re working on a ticket about a device’s event history and need a report built from those events. Unit tests can simulate them.
But if an IoT hub in the cloud already captures device events, you can send requests to it to create historical events. Then you can see those events in the parts of the application connected to the hub. The same object-oriented approach lets you reuse the seeding for other devices whose events are generated similarly.
We built the simulator and the seeding once, and we reuse them for some regression checks, quick ticket turnaround, and working in parallel with client teams. A simulator only behaves like the real device if you understand the real device.
2. IoT Requires Deep Domain Knowledge
The hardest part of picking up IoT app development on an existing product is learning the device and the systems already around it.
For me, water softeners and filtration systems did not come naturally. SEP’s smart water apps case study covers this product area. It took time listening to my teammates’ discussions and reading the codebase to put two and two together.
What My Team Does Today
Here is how we learn the domain on this project.
- A verbal domain walkthrough for new teammates
- A glossary of terms and technical docs in Coda
- A client crash course, which my teammates took when they picked up the project
- The client’s manuals for the devices
- The client’s LinkedIn posts about how some of their products work
- Hands-on time with the device
- Teammates, plus the existing code and documentation
Ideas for IoT App Development Onboarding
I still asked a lot of repeat questions once I got into the software, because I forgot some details or hadn’t written them down. A written domain onboarding guide would help new teammates and cut down on those questions.
I heard from a fellow SEPeer who has worked on projects with specialized medical domains. On two of them, the team prepared a PowerPoint presentation or a pamphlet-style PDF, framed as “So you’re testing for…,” that gave a quick intro to the domain. Both helped a lot.
My team didn’t have or build these specifically, but they sound like good ideas based on what I’ve heard from other SEPeers.
- A short PowerPoint or pamphlet-style PDF that introduces the domain in plain language
- A quick reference guide to the domain for looking things up later
- Diagrams, which help visual learners like me
- A recommendation for a book you can read on the domain
If you join an existing team like I did, lean on your teammates. Asking questions is a good way to pick up that knowledge, even if you’re only asking someone to repeat something. Without that, there may be a lot of reading and independent research in your future.
Take time to learn your domain. Without it, trivial implementations can look like mountains of work.
3. Embrace the Unknowns in IoT App Development
Working without the physical device means simulating it, and that means knowing how the device will behave. Our team often got those behaviors from spec sheets, but where do the specs come from?
A client or separate team may be building the device in parallel. The device may then deviate from the spec sheet, or the other team may have outside communication yours can’t see. How do you account for all of that?
The best answer is communication with stakeholders, and knowing who to reach out to at each stage of development. You may have one point of contact for all of it, but you still need to know these questions are worth asking.
Assuming can mean rework, so ask early and often. Bumping into unknowns and peculiarities is normal on an IoT product.
4. Pre-Market IoT App Development Calls for Flexibility
When the definition of the IoT product isn’t finalized, assume what you built isn’t final either. The device deviating from its spec sheet, which I described in Lesson 3, happened to my team when a value range changed.
What helped was how we wrote the code that interacts with device specs. We kept it reusable and followed good design patterns, and we decoupled it enough that we could update one piece without updating everything. With that in place, a change to one spec didn’t ripple through the rest of the application.
Frequent communication and quick-turnaround testing on real devices helped us identify the causes of the deviations quickly. That flexibility kept us moving when the target shifted.
5. Question Everything and Communicate Well
On an IoT product you depend on everything and everyone else, and they depend on you, because integrations get complicated and have many moving parts. That makes talking with your team and the client constant work. Any question is worth asking, and some communication styles get you an answer faster than others.
Code reviews, tests, and documentation carry communication too, so improving them improves how your team talks. I’ve noticed that when I leave detailed tests, I get more feedback on my reviews. Detailed tests are easier to read, so reviewers ask more questions about the integration. Those questions send us back to stakeholders sooner, and the next round of feedback comes faster.
What I’d Tell the Next New IoT Engineer
Walk through the product’s workflow first. Then build some domain knowledge, such as how a water softener works. On day one, I’d start a running glossary and write down every term as I hear it, so I’m not asking the same question three times.
You Might Also Like
- What Are Embedded Systems? A Definition (with Cool Animal Facts)
- Security in the Age of the Internet of Things
- Smart Water Apps Simplify Life for Homeowners & Dealers
✨ AI Post Recap
IoT app development is easier when a team can test without the physical device. After three months on one IoT product integration, a new SEP engineer found that device simulators and containerized firmware keep work moving, that learning the device comes before writing code, and that specs change. Reusable, decoupled code and early questions to stakeholders absorb those changes.
How do you test an IoT app when the physical device isn’t ready? Build a device simulator from the device’s specs, or containerize the device’s firmware to simulate it directly. A seeding tool can then send historical events to the IoT hub in the cloud, so you can test event history and reports without hardware.
What is the hardest part of starting in IoT app development? Learning the device and the systems around it, which comes before writing any code. Reading manuals, working with the device, studying the existing codebase, and asking teammates all help.
How do you handle device specs that change during IoT development? Keep the code that interacts with device specs reusable and decoupled, so one piece can change without touching everything else. Frequent communication and quick testing on real devices help you find the cause of a deviation fast.