Organization: Cetas Information Technology Pvt Ltd
Project Version: 1.0.0.0
Status: Research and Development (RND)
This project is a comprehensive Business Central extension that integrates IoT (Internet of Things) telemetry data with Microsoft Dynamics 365 Business Central. It enables real-time monitoring, collection, and management of IoT sensor data (specifically DHT11 temperature and humidity sensors) and presents this data through interactive dashboards and reporting pages within Business Central.
The primary purpose of this RND project is to:
- Bridge IoT Devices with Business Central: Connect physical IoT devices (Raspberry Pi with DHT11 sensors) to Business Central using Azure IoT Hub.
- Real-time Data Collection: Capture sensor telemetry data (temperature, humidity, timestamps) and store it securely.
- Business Intelligence: Provide interactive dashboards and reports for analyzing IoT telemetry patterns.
- Scalable Architecture: Design a cloud-native solution using Azure services (IoT Hub, Functions, Azure Cosmos DB).
- Demonstrate Modern Integration Patterns: Showcase best practices for IoT-to-ERP integration.
βββββββββββββββββββ
β IoT Devices β
β (Raspberry Pi β
β + DHT11) β
ββββββββββ¬βββββββββ
β
ββ MQTT/HTTPS
βΌ
βββββββββββββββββββββββββββββββ
β Azure IoT Hub β
β (Central message broker) β
ββββββββββ¬βββββββββββββββββββββ
β
ββ Event stream
βΌ
βββββββββββββββββββββββββββββββ
β Azure Functions β
β (Data processing & routing) β
ββββββββββ¬βββββββββββββββββββββ
β
ββ Process & transform
βΌ
βββββββββββββββββββββββββββββββ
β Azure Cosmos DB β
β (NoSQL data storage) β
ββββββββββ¬βββββββββββββββββββββ
β
ββ Query API
βΌ
βββββββββββββββββββββββββββββββ
β Business Central β
β (Pages, Tables, Reports) β
βββββββββββββββββββββββββββββββ
- Source: DHT11 sensors on Raspberry Pi devices
- Action: Reads temperature and humidity values every 5-10 seconds
- Transport: Python script (
az_iot_dht11.py) sends data to Azure IoT Hub via MQTT - Output: JSON payload with sensor readings and timestamps
- Trigger: Azure IoT Hub receives telemetry message
- Processing: Azure Function (
AzureFuntion.csx) processes incoming data - Tasks:
- Validates sensor data
- Transforms data format
- Enriches with metadata (device ID, location)
- Applies business rules
- Output: Structured data ready for storage
- Database: Azure Cosmos DB (NoSQL, globally distributed)
- Partition Strategy: Hierarchical partition keys for optimal performance
- Storage Structure:
{ "id": "unique-document-id", "deviceId": "device-001", "temperature": 25.5, "humidity": 60.2, "timestamp": "2025-12-05T10:30:45Z", "location": "Office-Room-1", "organizationId": "cetas-001" }
- API Layer: REST API endpoint to query Cosmos DB
- Business Central Tables:
TelemetryIoT(Main table storing core telemetry data)
- Data Retrieval: Scheduled job or on-demand query to fetch latest telemetry
- Pages:
TelemetryIoTCard.Page.al: Detailed view of individual telemetry recordsTelemetryIoTAPI.Page.al: API configuration and managementTelemetryCuePage.Page.al: Cube/analytical view for data analysisTelemetryListPart.Page.al: List view showing multiple records
- Features:
- Real-time dashboard display
- Historical trend analysis
- Alert configuration (temperature/humidity thresholds)
- Export capabilities
-
az_iot_dht11.py: Main IoT device script- Reads DHT11 sensor data
- Connects to Azure IoT Hub
- Sends telemetry at regular intervals
- Handles connection retry logic
-
az-dht11.service: System service definition- Ensures script runs as a background service on Raspberry Pi
- Auto-restart on failure
- System integration
-
AzureFuntion.csx: Azure Function code- Processes incoming IoT Hub messages
- Routes data to Cosmos DB
- Implements business logic
TelemetryIoT.Table.al: Stores telemetry data- Fields: Device ID, Temperature, Humidity, Timestamp, Status
- Primary Key: Unique identifier for each reading
- Used for reporting and analytics
TelemetryIoTCard.Page.al: Single record detail viewTelemetryListPart.Page.al: List of records (used as subpage)TelemetryCuePage.Page.al: Analytical data cubeTelemetryIoTAPI.Page.al: API configuration interface
- Business logic and utility functions
- Data validation and transformation
- Integration with external services
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 1: DEVICE LAYER β
β IoT Device (Raspberry Pi + DHT11) measures environment data β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 2: AZURE IOT HUB INGESTION β
β Device sends data via MQTT protocol to Azure IoT Hub β
β Hub acts as central message broker β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 3: SERVERLESS PROCESSING β
β Azure Function triggers on new message β
β Validates, transforms, and enriches data β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 4: DATA PERSISTENCE β
β Processed data stored in Azure Cosmos DB β
β NoSQL database optimized for scale and global reach β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 5: BUSINESS CENTRAL RETRIEVAL β
β Scheduled job or API call fetches data from Cosmos DB β
β Data synced to TelemetryIoT table β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β STEP 6: PRESENTATION & ANALYTICS β
β Users view dashboards in Business Central β
β Analyze trends, set alerts, generate reports β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Central management point for all IoT devices
- Security: Device-to-cloud authentication and authorization
- Scalability: Handles millions of messages per day
- Message routing to different backends (Azure Functions, Cosmos DB, etc.)
- Serverless architecture: Pay only for processing time
- Event-driven: Automatically triggered by IoT Hub messages
- Cost-effective for batch processing
- Easy integration with other Azure services
- Global distribution: Low-latency access worldwide
- Elastic scalability: Handles variable workloads
- Multi-model support: JSON documents, graphs, key-value
- Built-in analytics with change feeds
- Excellent for IoT data retention and historical analysis
- Single source of truth for business operations
- Integrated dashboards and reporting
- User-friendly interface for non-technical users
- Extensibility through add-ins and APIs
- Compliance and audit trails
RND-Project/
βββ app.json # Extension metadata and configuration
βββ README.md # Documentation
βββ IOTWebService.xml # Web service definition
βββ LICENSE # License information
β
βββ Python src/ # IoT device code
β βββ az_iot_dht11.py # DHT11 sensor reading & IoT Hub communication
β βββ az-dht11.service # Systemd service file for Linux
β βββ AzureFuntion.csx # Azure Function for data processing
β
βββ src/ # Business Central extension code
β βββ table/
β β βββ TelemetryIoT.Table.al # Main telemetry data table
β βββ page/
β β βββ TelemetryIoTCard.Page.al # Single record view
β β βββ TelemetryIoTAPI.Page.al # API management
β β βββ TelemetryCuePage.Page.al # Analytical view
β β βββ TelemetryListPart.Page.al # List subpage
β βββ codeunit/ # Business logic and utilities
β
βββ Translations/
β βββ RND-Project.g.xlf # Multi-language support file
β
βββ Resources/ # Static assets
βββ Applogo/ # Application branding
βββ Data/ # Sample/reference data
βββ Images/ # UI images and icons
- Azure Subscription (IoT Hub, Functions, Cosmos DB)
- Raspberry Pi with DHT11 sensor
- Business Central environment
- AL language extension for VS Code
- Device Development: Modify Python scripts on Raspberry Pi
- Cloud Processing: Update Azure Function logic in
AzureFuntion.csx - Business Central: Develop tables and pages in AL language
- Testing: Validate end-to-end data flow
- Deployment: Package extension and deploy to Business Central
- Device Authentication: IoT Hub enforces device-level authentication
- Data Encryption: TLS/SSL for data in transit
- Access Control: RBAC in Business Central for data access
- Secrets Management: Azure Key Vault for storing connection strings
- Audit Logging: Track all data access and modifications
- Message Throughput: Azure IoT Hub: Millions of messages/day
- Data Storage: Cosmos DB with auto-scaling based on demand
- Query Performance: Optimized partition keys for fast lookups
- Business Central: Indexed tables for responsive UI
- Machine learning for anomaly detection
- Predictive maintenance alerts
- Mobile app for field monitoring
- Multi-site dashboard aggregation
- Advanced analytics with Power BI integration
- Automated remediation actions
Organization: Open Source
Project Lead: Mir Kasim Ali Naqvi
LinkedIn: https://www.linkedin.com/in/mir-kasim-ali-naqvi-04971a236
See LICENSE file for details.
Last Updated: December 5, 2025