A comprehensive home automation dashboard that integrates with SmartThings, Solarman solar panels, and Bosch smart home devices.
- SmartThings Integration: Monitor and control Samsung SmartThings devices
- Solarman Solar Monitoring: Track solar panel production with interactive charts
- Bosch Device Support: Connect to Bosch Smart Home Controller and IoT Hub devices
- Web Dashboard: Modern responsive web interface
- Docker Support: Containerized deployment with multi-stage builds
- Azure Container Registry: Ready for cloud deployment
- .NET 9.0 SDK
- Docker (optional, for containerized deployment)
- SmartThings Personal Access Token
- Solarman API credentials (optional)
- Bosch Smart Home Controller or IoT Hub access (optional)
git clone <your-repo-url>
cd homeautomationCopy the example environment file and configure your credentials:
cp .env.example .envEdit .env with your actual credentials:
# SmartThings API Configuration (Required)
SMARTTHINGS_PERSONAL_ACCESS_TOKEN=your-smartthings-token-here
# Solarman API Configuration (Optional)
SOLARMAN_EMAIL=your-email@example.com
SOLARMAN_PASSWORD=your-password
SOLARMAN_APP_ID=your-solarman-app-id
SOLARMAN_APP_SECRET=your-solarman-app-secret
# Bosch Smart Home Configuration (Optional)
BOSCH_CONTROLLER_IP=192.168.1.100
BOSCH_CLIENT_NAME=MyHomeApp
BOSCH_CERTIFICATE_PATH=/path/to/certificate
BOSCH_CERTIFICATE_PASSWORD=certificate-password
# Bosch IoT Hub Configuration (Optional)
BOSCH_IOT_HUB_URL=https://api.bosch-iot-suite.com/hub/1
BOSCH_API_KEY=your-bosch-iot-api-keydotnet runThe application will be available at http://localhost:5000
# Build the Docker image
docker build -t homeautomation .
# Run the container
docker run -p 8080:8080 --env-file .env homeautomation# Build and push to ACR (configure ACR_NAME and RESOURCE_GROUP in the scripts)
./build-docker.sh
./deploy-to-acr.shGET /- Web dashboardGET /api/devices- Combined device list from all servicesGET /api/bosch/devices- Bosch devices onlyGET /api/solar/today- Today's solar production dataPOST /api/devices/{deviceId}/command- Send command to SmartThings device
- Go to SmartThings Developer Portal
- Sign in with your Samsung account
- Go to Personal Access Tokens
- Create a new token with device permissions
- Copy the token to your
.envfile
- Register at Solarman Developer Portal
- Create a new application
- Get your App ID and App Secret
- Use your Solarman account email and password
- Ensure your Bosch Smart Home Controller is on your network
- Generate client certificates using Bosch's pairing process
- Configure the controller IP and certificate paths
- Register at Bosch IoT Suite
- Create an IoT Hub service
- Generate API credentials
├── Program.cs # Main application entry point
├── Services/
│ ├── SmartThingsService.cs # SmartThings API integration
│ ├── SolarmanService.cs # Solarman solar data
│ └── BoschService.cs # Bosch device integration
├── Dockerfile # Multi-stage Docker build
├── .env.example # Environment variables template
└── README.md # This file
- Create a new service in the
Services/directory - Register the service in
Program.cs - Add API endpoints for the new service
- Update the web interface to display new device types
- Never commit
.envfiles to version control - Use environment variables for all sensitive configuration
- The
.gitignorefile excludes sensitive files by default - Consider using Azure Key Vault or similar for production secrets
If API credentials are not configured, the application will fall back to mock data:
- SmartThings: Returns empty device list
- Solarman: Generates realistic solar production curves
- Bosch: Shows sample devices with mock status
- Empty device list: Check your API credentials in
.env - Solar data not loading: Verify Solarman credentials and API access
- Bosch devices offline: Ensure controller IP is correct and accessible
- Build errors: Ensure .NET 9.0 SDK is installed
The application logs to console. In Docker, view logs with:
docker logs <container-id>- Fork the repository
- Create a feature branch
- Make your changes
- Update documentation
- Submit a pull request
This project is licensed under the MIT License.