Modul 10: Platform IoT (Node-RED, AWS, Azure, Google)
1. Platform IoT: Gateway menuju Solusi Cerdas
Platform IoT menyediakan infrastruktur dan tools yang diperlukan untuk menghubungkan, mengelola, dan menganalisis perangkat IoT dalam skala besar. Modul ini membahas platform-platform utama yang digunakan dalam industri dan bagaimana memilih platform yang tepat untuk kebutuhan spesifik.
Mengapa Platform IoT Penting?
- Scalability: Mendukung jutaan perangkat yang terhubung
- Security: Menyediakan keamanan end-to-end
- Data Management: Pengolahan dan analisis data real-time
- Integration: Integrasi dengan sistem existing
- Development Speed: Mempercepat pengembangan solusi IoT
Tujuan Pembelajaran
- Memahami arsitektur platform IoT utama
- Menguasai Node-RED untuk rapid prototyping
- Mengimplementasikan solusi menggunakan AWS IoT
- Membandingkan fitur platform IoT cloud
- Memilih platform yang tepat untuk use case tertentu
2. Overview Platform IoT Populer
Node-RED
Type: Open-source, Flow-based
Best for: Rapid prototyping, Education
Pricing: Free & Open Source
- Visual programming interface
- Extensive node library
- Easy integration dengan hardware
AWS IoT
Type: Enterprise Cloud Platform
Best for: Large-scale deployments
Pricing: Pay-as-you-go
- Highly scalable
- Deep integration dengan AWS services
- Enterprise-grade security
Azure IoT
Type: Enterprise Cloud Platform
Best for: Hybrid cloud scenarios
Pricing: Pay-as-you-go
- Strong enterprise integration
- AI and ML capabilities
- Edge computing support
Google Cloud IoT
Type: Enterprise Cloud Platform
Best for: Data analytics & AI
Pricing: Pay-as-you-go
- Powerful data analytics
- Machine learning integration
- Global infrastructure
3. Node-RED: Visual Programming untuk IoT
Apa itu Node-RED?
Node-RED adalah tool visual programming yang dibangun di atas Node.js, dirancang khusus untuk menghubungkan perangkat hardware, APIs, dan online services dengan cara yang baru dan menarik.
Fitur Utama Node-RED
Browser-based Editor
Interface visual yang dapat diakses melalui browser
Extensible
Ribuan nodes tersedia melalui palette manager
Easy Integration
Integrasi mudah dengan MQTT, HTTP, WebSockets
Rapid Prototyping
Membangun aplikasi IoT dalam hitungan menit
Node-RED Simulator
Build Your First Flow
Drag nodes here to build your flow
Contoh Flow: Sensor Data Processing
4. AWS IoT: Enterprise IoT Platform
AWS IoT Architecture
AWS IoT menyediakan suite lengkap services untuk menghubungkan perangkat IoT ke cloud AWS, mengelola perangkat, memproses data, dan membangun aplikasi.
AWS IoT Core Services
IoT Core
Device connectivity & management
IoT Analytics
Data processing & analysis
IoT Events
Event detection & response
Greengrass
Edge computing
SiteWise
Industrial data collection
ThingsWise
Industrial data collection
AWS IoT Architecture Example
Smart Home IoT Architecture dengan AWS
IoT Devices
ESP32, Sensors, Actuators
AWS IoT Core
MQTT Broker, Device Shadow
Lambda Functions
Data Processing
DynamoDB
Data Storage
QuickSight
Data Visualization
Contoh Kode: ESP32 ke AWS IoT
5. Azure IoT: Microsoft's IoT Platform
Azure IoT Hub Features
- Device Provisioning Service: Zero-touch device registration
- IoT Edge: Cloud intelligence di edge devices
- Time Series Insights: Real-time analytics untuk IoT data
- IoT Central: SaaS solution untuk IoT applications
Azure IoT Services Comparison
| Service | Use Case | Pricing Model |
|---|---|---|
| IoT Hub | Device connectivity & management | Per message |
| IoT Central | SaaS IoT applications | Per device |
| IoT Edge | Edge computing | Free with IoT Hub |
6. Google Cloud IoT: AI-Powered IoT
Google Cloud IoT Core (Deprecated) & Alternatives
Meskipun Google Cloud IoT Core telah di-deprecate, Google menyediakan alternatif yang powerful dengan integrasi AI/ML:
- Cloud Pub/Sub: Real-time messaging
- Cloud Dataflow: Stream & batch processing
- BigQuery: Data analytics
- AI Platform: Machine learning
Google Cloud IoT Architecture
IoT Devices
MQTT Clients
Cloud Pub/Sub
Message Ingestion
Cloud Functions
Data Processing
AI Platform
Machine Learning
Data Studio
Visualization
7. Perbandingan Platform IoT
| Feature | Node-RED | AWS IoT | Azure IoT |
|---|---|---|---|
| Pricing | Free & Open Source | Pay-per-use | Pay-per-use |
| Learning Curve | Low (Visual) | Medium | Medium |
| Scalability | Limited | Very High | Very High |
| Enterprise Features | Basic | Comprehensive | Comprehensive |
| Best For | Prototyping, Education | Large-scale Production | Enterprise Integration |
Platform Selection Guide
Education & Prototyping
Choose: Node-RED
Free, visual, easy to learn
Enterprise Scale
Choose: AWS IoT
Highly scalable, comprehensive
Microsoft Ecosystem
Choose: Azure IoT
Seamless Office 365 integration
AI/ML Focus
Choose: Google Cloud
Advanced analytics capabilities
8. Hands-on Lab: Membangun IoT Dashboard
Lab: Smart Temperature Monitoring System
Bangun sistem monitoring suhu menggunakan Node-RED dan simulasi data sensor.
Step 1: Install Node-RED
Install Node-RED pada komputer atau Raspberry Pi Anda:
Step 2: Start Node-RED
Jalankan Node-RED dan akses melalui browser:
Step 3: Buat Flow Simulasi Sensor
Drag and drop nodes berikut:
- Inject node: Untuk generate data acak
- Function node: Untuk processing data
- Debug node: Untuk melihat output
- Dashboard nodes: Untuk UI (install node-red-dashboard)
Step 4: Deploy dan Test
Klik "Deploy" dan buka dashboard di http://localhost:1880/ui
🎯 Challenge: Tambahkan Fitur Alert
Modifikasi flow untuk mengirim notifikasi ketika suhu melebihi 30°C!
- Gunakan "Switch" node untuk conditional logic
- Tambahkan "Email" node atau "Notification" node
- Test dengan berbagai nilai threshold