Categorize IoT Software Platforms: Distinguish cloud platforms, application frameworks, and edge solutions by their architectural roles
Select Appropriate Platforms: Choose cloud, edge, or open-source solutions based on scale, budget, and integration needs
Deploy Device Management: Configure fleet provisioning, OTA updates, and remote monitoring platforms
Evaluate Platform Trade-offs: Assess vendor lock-in, cost, and scalability when making platform decisions
Key Concepts
Microcontroller Unit (MCU): Integrated circuit combining CPU, RAM, flash, and peripherals optimised for embedded control applications.
Microprocessor Unit (MPU): High-performance processor requiring external RAM, storage, and peripherals, used in Linux-based IoT devices like Raspberry Pi.
Schematic: Electrical diagram showing component connections using standardised symbols, used to guide PCB layout.
PCB (Printed Circuit Board): Fiberglass substrate with etched copper traces connecting electronic components into a permanent assembly.
ESD Protection: Diodes and resistors protecting sensitive IC pins from electrostatic discharge during handling and in-field use.
Decoupling Capacitor: Small capacitor placed close to IC power pins to suppress high-frequency noise on the supply rail.
Design Rule Check (DRC): Automated PCB verification ensuring trace widths, clearances, and drill sizes meet the fabrication process constraints.
31.2 Prerequisites
Before diving into this section, you should be familiar with:
IoT Reference Models: Understanding the layered IoT architecture provides context for where software platforms fit
Prototyping Software: Knowledge of development environments helps evaluate platform support
MQTT Protocol: MQTT is the dominant messaging protocol for IoT platforms
For Beginners: What are IoT Software Platforms?
Think of IoT platforms like app stores + operating systems for smart devices.
Just like your phone needs iOS or Android to run apps, your IoT devices need platforms to connect, communicate, and be managed. Platforms give you pre-built tools—authentication, device management, data storage—that would take months to build from scratch.
Three types of platforms you’ll encounter:
Platform Type
What It Does
Example
Cloud Platform
Connect devices to internet, store data
AWS IoT, Azure IoT Hub
Edge Platform
Process data locally before sending to cloud
Home Assistant, EdgeX
Development Framework
Tools for building IoT applications
Node-RED, Arduino IDE
Start simple: For hobbyists, Node-RED and Home Assistant are friendly entry points. For production, consider AWS IoT Core or Azure IoT Hub.
Sensor Squad: The Software Ecosystem
“Hardware without software platforms is like a phone without an app store!” said Max the Microcontroller. “IoT platforms handle all the plumbing – connecting devices, storing data, managing updates, and keeping everything secure. You just focus on building your application.”
Sammy the Sensor asked about options. “There are three main types,” Max explained. “Cloud platforms like AWS IoT Core and Azure IoT Hub run in the cloud and handle millions of devices. Application frameworks like Node-RED and Home Assistant make it easy to build IoT apps with visual tools. And edge platforms like EdgeX process data locally before sending it to the cloud.”
Lila the LED shared a tip. “For beginners, start with Node-RED. You drag and drop blocks to connect sensors, process data, and trigger actions – no heavy coding required. For a smart home, Home Assistant integrates with over 2,000 device types right out of the box.” Bella the Battery added the production perspective. “When you are ready to scale up to thousands or millions of devices, cloud platforms provide the infrastructure. But choose carefully – switching platforms later is expensive. Look for ones that support standard protocols like MQTT so you are not locked in.”
31.3 Section Overview
This section covers the complete IoT software platform landscape across four focused chapters:
Key Insight: Below ~36 million messages/month, cloud platforms are often cheaper due to free tiers. Above 100 million messages/month, self-hosted can save $1,000+/month, but requires DevOps expertise for setup, security, monitoring, and maintenance.
31.4 Platform Selection Quick Reference
Scale
Recommended Approach
< 100 devices
Open-source (Home Assistant, ThingsBoard) or cloud free tiers
100-10,000
Managed cloud platforms (AWS IoT, Azure IoT)
> 10,000
Enterprise cloud or custom infrastructure
31.5 Visual Reference Gallery
RTOS Architecture Overview
RTOS Structure
RTOS provides a structured foundation for complex IoT firmware, enabling reliable multi-tasking with predictable timing and resource management.
Fog-Edge-Cloud Network Architecture
Fog Edge Cloud Network
Modern IoT software platforms span edge to cloud, with appropriate frameworks for each tier’s resource constraints and capabilities.
Myth: “Cloud platforms lock you in permanently” Reality: Using standard protocols (MQTT, HTTP) with abstraction layers enables migration between platforms
Myth: “Open-source means free” Reality: Self-hosting requires DevOps expertise, servers, and maintenance - often higher TCO than managed cloud for small scales
Matching Quiz: IoT Platform Types
Ordering Quiz: Platform Selection by Scale
Common Pitfalls
1. Publishing All Sensor Data at Maximum Rate Without Filtering
Sending raw sensor readings at maximum frequency consumes unnecessary bandwidth and storage, and can cause broker backpressure that drops messages from other devices. Apply edge-side dead-band filtering and send only meaningful updates; reserve full-rate data for local debug sessions.
2. Using a Single MQTT Topic for All Device Data
Publishing all sensor types to one flat topic prevents selective subscriptions, makes stream processing complex, and inhibits per-sensor access control. Use a structured topic hierarchy (e.g. iot/{deviceId}/{sensorType}) that enables selective consumption and per-topic ACL policies.
3. Not Designing for Device Shadow Conflicts
When multiple clients update the device shadow simultaneously without conflict resolution, the device receives contradictory desired-state updates and enters an oscillating state. Implement optimistic locking with version numbers on shadow updates and define a clear precedence order for conflicting state sources.
Label the Diagram
31.7 Summary
Cloud platforms (AWS, Azure, GCP) provide managed infrastructure for scalability, security, and enterprise integration
Application frameworks (Node-RED, Home Assistant) enable rapid development through visual programming and pre-built integrations
Edge platforms (Greengrass, Azure IoT Edge, EdgeX) bring cloud capabilities to local devices for latency and offline requirements
Device management (Balena, Mender) solves operational challenges of fleet updates and monitoring
Open-source options (ThingsBoard, FIWARE, Mainflux) provide flexibility and cost savings for self-hosted deployments
Platform selection depends on scale, budget, expertise, integration needs, and strategic priorities
Worked Example: Migrating from Proprietary Platform to Open-Source MQTT
Scenario: A company built their smart home product on a proprietary IoT platform (fictional “CloudConnect”) in 2020. In 2023, CloudConnect raised prices from $0.10/device/month to $2.00/device/month. With 10,000 deployed devices, monthly costs jumped from $1,000 to $20,000 — unsustainable for a $39 product. The team decides to migrate to self-hosted Mosquitto MQTT + ThingsBoard.
Step 1: Analyze the Existing Architecture
Current (CloudConnect proprietary):
// Device firmware (locked to CloudConnect)#include <CloudConnect.h>CloudConnect cloud("device-id-12345");void loop(){float temp = readSensor(); cloud.send("temperature", temp);// Proprietary API cloud.loop();// Proprietary event handling}
Backend:
CloudConnect cloud (black box, no access)
Data stored in CloudConnect database (no export)
Mobile app uses CloudConnect SDK
Problems:
Device firmware hard-coded to CloudConnect API
No OTA update capability (firmware can’t be changed remotely)
Historical data trapped in CloudConnect (2 years of sensor data)
Phase 1: Add OTA update to existing firmware (if possible) - Push OTA update with new MQTT firmware to all devices - If no OTA: Devices must be physically updated (mail USB programmer to customers)
Phase 2: Data export and migration
Use CloudConnect API to export historical data (if available)
If no export API: Accept data loss (painful lesson)
Import to ThingsBoard via REST API
Phase 3: Mobile app rewrite
Replace CloudConnect SDK with MQTT library (e.g., Eclipse Paho)
Update API endpoints to point to ThingsBoard REST API
After 1 month, the company saves $19,945/month forever.
Step 5: Lessons Learned
What went wrong initially:
No OTA update mechanism → couldn’t migrate remotely (some devices needed physical update)
Hard-coded vendor API → required full firmware rewrite instead of just changing endpoint
No data export plan → lost 2 years of historical data
Proprietary mobile SDK → required mobile app rewrite
What they should have done from day 1:
✅ Use standard MQTT from the start (no vendor lock-in)
✅ Build OTA update capability (migrate devices remotely)
✅ Store data locally + mirror to cloud (always have backup)
✅ Use open SDKs in mobile app (easy to switch backends)
✅ Abstract backend API into a separate service layer
The abstraction pattern (prevents future lock-in):
// backend.h (abstraction interface)class IoTBackend {virtualvoidconnect()=0;virtualvoid sendData(constchar* key,float value)=0;};// mqtt_backend.cpp (MQTT implementation)class MQTTBackend :public IoTBackend {voidconnect(){ mqtt.connect(...);}void sendData(constchar* key,float value){ mqtt.publish(topic, json);}};// main.cpp (use abstraction)IoTBackend* backend =new MQTTBackend();backend->connect();backend->sendData("temperature", temp);// Switching backends later: just change the implementation, not the application code
Key takeaway: The convenience of a proprietary platform (CloudConnect) becomes a trap when: (1) vendor raises prices, (2) vendor shuts down, or (3) vendor changes terms. Always use standard protocols (MQTT, HTTP) with abstraction layers to maintain the ability to migrate.
Decision Framework: Cloud Platform vs Self-Hosted Open-Source
Factor
Cloud Platform (AWS IoT, Azure)
Self-Hosted (Mosquitto, ThingsBoard)
Setup time
1-2 days (managed service)
1-2 weeks (install, configure, secure)
Operational burden
None (vendor manages)
High (updates, backups, monitoring)
Scalability
Automatic (millions of devices)
Manual (add servers as needed)
Cost at 100 devices
$10-50/month
$10-20/month (small VPS)
Cost at 10,000 devices
$1,000-5,000/month
$100-500/month (larger VPS + bandwidth)
Cost at 1M devices
$50,000-200,000/month
$5,000-20,000/month (cluster + engineering)
Vendor lock-in risk
High (proprietary APIs)
None (open-source, portable)
Data ownership
Vendor holds data
You own data completely
Expertise required
Low (managed service)
High (DevOps, security, databases)
Uptime SLA
99.9%+ guaranteed
You manage (no SLA)
Use cloud platform when:
Rapid prototyping (need working backend in hours)
No DevOps expertise on team
Unpredictable scale (could be 100 or 100,000 devices)
Enterprise integrations (Salesforce, SAP, etc.)
Compliance requirements (HIPAA, SOC 2) covered by vendor certifications
Data sovereignty requirements (cannot store data in US/EU/etc.)
Custom features needed (modify open-source code)
Vendor lock-in is unacceptable (long-term product)
Team has DevOps expertise (or willing to hire)
Predictable scale (know device count within 2x)
Hybrid approach (common for mature products): 1. Year 1: Cloud platform (rapid development, validate product-market fit) 2. Year 2: Hybrid (keep cloud, add self-hosted for cost savings on high-volume data paths) 3. Year 3+: Primarily self-hosted (cloud as backup/disaster recovery)
Example progression:
0-1,000 devices: AWS IoT Core ($50-100/month), fast development
10,000+ devices: Primarily self-hosted ($2,000/month), AWS for enterprise customers only
In 60 Seconds
This chapter covers software platforms and frameworks, explaining the core concepts, practical design decisions, and common pitfalls that IoT practitioners need to build effective, reliable connected systems.
Common Mistake: Using Platform Free Tier in Production
The Problem: A developer builds an IoT product using AWS IoT Core free tier (250,000 messages/month free). During prototyping with 10 test devices, they never exceed the free tier. The product launches, and within 2 weeks, they have 500 paying customers. Month-end arrives, and AWS bills them $8,500.
What went wrong:
Free tier limits (AWS IoT Core example): - 250,000 messages/month (inbound/outbound combined) - After free tier: $1.00 per million messages
The killer: The developer didn’t realize they were sending one message per second (not per minute) due to a bug in retry logic. The actual message rate was: - 500 devices × 60 seconds × 60 minutes × 24 hours × 30 days = 1.296 billion messages/month
Corrected cost: 1,296 million messages = 1,296 × $1.00 = $1,296 (just for IoT Core) Plus all the other services scaling proportionally: $8,500 total bill
The fix (cost controls for production):
Set billing alerts: AWS CloudWatch alarm at $100, $500, $1,000 thresholds
Use AWS Budgets: Hard cap ($500/month) with email alerts
Test with realistic device count: 10 test devices is not representative of 500 production devices
Calculate costs before launch: Use AWS Pricing Calculator with actual usage projections
Consider hybrid approach: AWS for control plane, self-hosted MQTT for telemetry (90% cost reduction)
Lesson: Free tier is for prototyping, not production. Always calculate production costs based on actual device count and message frequency before launching.
31.11 What’s Next
If you want to…
Read this
Learn about data visualisation for connected devices