A project showcasing a containerized chat application, which communicates and causes actions on a raspberry pi
- webapp/ - Python Flask web application with chat interface powered by Azure AI Foundry
- functions/ - Azure Functions for MCP endpoints (GetTelemetry and SendAction)
- infra/ - Infrastructure as Code (Bicep) for Azure resources
- raspberry-pi/ - Python applications for receiving telemetry and action messages on Raspberry Pi
User Browser
↓ (HTTPS)
Web Application (Azure App Service - Flask)
↓ (Azure AI SDK)
Azure AI Foundry (GPT-4o-mini)
↓ (Function Calling / MCP Tools)
Azure Functions (MCP Endpoints)
↓ (Service Bus)
Azure Service Bus Topics (Telemetry & Action)
↓ (Subscriptions)
Raspberry Pi Services
├─ Telemetry Receiver → Sensor Reading
└─ Action Receiver → Action Execution
A Python Flask-based web application that provides:
- Interactive chat interface for users
- Integration with Azure AI Foundry for intelligent conversations
- MCP tool integration for function calling to control Raspberry Pi
- Application Insights telemetry and monitoring
See webapp/README.md for details.
HTTP endpoints that receive requests and forward them to Service Bus topics:
GetTelemetry- Sends telemetry requests to the Telemetry topicSendAction- Sends action requests to the Action topic
See functions/README.md for details.
Two Python services that run on the Raspberry Pi:
-
Telemetry Receiver - Receives messages from the Service Bus Telemetry topic and processes them based on the SensorKey field (Temperature, Light, CPU).
-
Action Receiver - Receives messages from the Service Bus Action topic and processes them based on the ActionType field (Camera, etc.).
See raspberry-pi/README.md for installation and usage.
Azure resources deployed using Bicep templates, including:
- Container Registry
- App Service (for web application)
- Function App (for MCP endpoints)
- Service Bus (with topics and subscriptions)
- OpenAI Service (GPT-4o-mini)
- AI Foundry Hub
- Application Insights (monitoring and telemetry)
See infra/README.md for deployment instructions.
# Create resource group
az group create --name rg-pichat-dev --location eastus
# Deploy infrastructure
cd infra
az deployment group create \
--resource-group rg-pichat-dev \
--template-file main.bicep \
--parameters main.bicepparamcd functions
func azure functionapp publish <function-app-name># Build and push container image
cd webapp
az acr build --registry <acr-name> --image chat-app:latest .
# Configure App Service with environment variables (see webapp/README.md)See raspberry-pi/README.md for setup instructions.
Once deployed, access the web application at your App Service URL (e.g., https://pichat-dev-app.azurewebsites.net). The chat interface allows you to:
- Ask questions about sensor data: "What's the current temperature?"
- Control devices: "Take a picture with the camera"
- Get system information: "What's the CPU usage?"
The AI will automatically call the appropriate Azure Functions to interact with your Raspberry Pi.