Home Controller
A unified smart home automation system that enables control and monitoring of Miele appliances, LG ThinQ devices, HUUM saunas, and Phyn water monitors through Claude using the Model Context Protocol.
README
Home Controller - Smart Home MCP Integration
A unified home automation system for controlling Miele, LG ThinQ, HUUM Sauna, Phyn Water Monitor, and A.O. Smith Water Heater appliances through Claude Code using the Model Context Protocol (MCP).
Features
Miele Integration (Custom Node.js MCP Server)
- Get list of all connected Miele devices
- Get detailed status of any device (oven, refrigerator, freezer, etc.)
- Control devices (start, stop, pause, power on/off)
- Real-time device monitoring
LG ThinQ Integration (Official Python MCP Server)
- Control LG washers and dryers
- Monitor device status in real-time
- Get device capabilities and available programs
- Subscribe to device events
HUUM Sauna Integration (Custom Node.js MCP Server)
- Monitor sauna temperature and status
- Start and stop sauna heating remotely
- Set target temperature (40-110°C)
- Control sauna lighting
- Check door state and safety status
Phyn Water Monitor Integration (Custom Node.js MCP Server)
- Monitor water pressure, temperature, and flow rate
- Get historical water consumption data (daily/monthly/yearly)
- Control main water shutoff valve (Phyn Plus)
- Support for multiple Phyn devices (Plus and Smart Sensors)
- Perfect for building water usage reports
A.O. Smith Water Heater Integration (Custom Node.js MCP Server)
- Monitor heat pump water heater temperature and status
- Set target water temperature (95-140°F)
- Change operation mode (Heat Pump, Hybrid, Electric, Vacation)
- View energy consumption data
- Check hot water availability status
Automated Email Reports
- Daily reports at 10pm with usage recap
- Weekly reports on Saturday 8am with trends
- Tracks: water usage, laundry cycles, sauna sessions, oven uses
- Historical comparisons: vs yesterday, 7-day avg, 4-week avg, 12-week avg
- 12-week sparkline trends in weekly reports
- Gmail SMTP with macOS launchd scheduling
Slash Commands
/laundry-status- Quick check on washers and dryers/kitchen-status- Check all Miele kitchen appliances/sauna-status- Check HUUM sauna status/home-status- Complete overview of all devices/start-washer- Interactive washer control/start-dryer- Interactive dryer control/start-sauna- Interactive sauna control/stop-sauna- Turn off the sauna/check-alerts- Check for notifications and alerts/water-status- Check water system pressure and flow/water-report- Get water consumption report/water-heater-status- Check heat pump water heater status/set-water-heater- Interactive water heater control
Prerequisites
-
For Miele:
- Miele account with connected appliances
- Miele Developer Portal credentials (Client ID and Client Secret)
- Node.js v18+ installed
-
For LG ThinQ:
- LG ThinQ account with connected appliances
- LG ThinQ Personal Access Token (PAT)
- Python 3.11+ installed
-
For HUUM Sauna:
- HUUM sauna with UKU WiFi controller
- HUUM mobile app account
- Node.js v18+ installed
-
For Phyn Water Monitor:
- Phyn Plus and/or Phyn Smart Water Sensors
- Phyn mobile app account
- Node.js v18+ installed
-
For A.O. Smith Water Heater:
- A.O. Smith iComm-enabled water heater (Voltex, etc.)
- iComm mobile app account
- Node.js v18+ installed
Setup
Miele Setup
Step 1: Get Miele API Credentials
- Go to Miele Developer Portal
- Create an account or log in
- Create a new application
- Add redirect URI:
http://localhost:3000/callback - Note your Client ID and Client Secret
Step 2: Configure Miele Environment
- Edit
.envand add your credentials:MIELE_CLIENT_ID=your_client_id_here MIELE_CLIENT_SECRET=your_client_secret_here
Step 3: Authenticate with Miele
Run the authentication helper:
npm run auth
Important for US Users:
- The auth script uses the legacy OAuth endpoint (
api.mcs3.miele.com) - This is required for US Miele accounts
- EU users may need different endpoint configuration
This will:
- Open your browser to authenticate with Miele
- Exchange the authorization code for an access token
- Save the token to your
.envfile (valid for 30 days)
LG ThinQ Setup
Step 1: Get LG ThinQ Personal Access Token
- Go to LG ThinQ Developer Portal
- Create an account or log in
- Navigate to the PAT (Personal Access Token) section
- Generate a new token with these permissions:
- View all devices and statuses
- Device control and event subscription
- Device push notifications
- Energy consumption inquiry
Step 2: Configure LG ThinQ Environment
- Edit
.envand add your credentials:THINQ_PAT=your_personal_access_token_here THINQ_COUNTRY=US
Step 3: Install LG ThinQ MCP Server
The LG ThinQ MCP server is already installed via pipx:
# Already installed at ~/.local/bin/thinqconnect-mcp
# Verify installation:
~/.local/bin/thinqconnect-mcp --help
HUUM Sauna Setup
Step 1: Get HUUM Account Credentials
- Download the HUUM mobile app (iOS/Android)
- Create an account or log in
- Connect your HUUM sauna with UKU WiFi controller
- Note your login credentials (email and password)
Step 2: Configure HUUM Environment
- Edit
.envand add your credentials:HUUM_USERNAME=your_email@example.com HUUM_PASSWORD=your_password_here
Note: The HUUM API uses Basic Authentication with the same credentials you use in the mobile app.
Step 3: Install Dependencies
The HUUM MCP server uses the same Node.js dependencies as the Miele server:
npm install
Phyn Water Monitor Setup
Step 1: Get Phyn Account Credentials
- Download the Phyn mobile app (iOS/Android)
- Create an account or log in
- Connect your Phyn devices (Plus or Smart Sensors)
- Note your login credentials (email and password)
Step 2: Configure Phyn Environment
- Edit
.envand add your credentials:PHYN_USERNAME=your_email@example.com PHYN_PASSWORD=your_password_here PHYN_API_KEY=E7nfOgW6VI64fYpifiZSr6Me5w1Upe155zbu4lq8
Note: The Phyn API uses AWS Cognito authentication with the same credentials you use in the mobile app. The API key is a public key used by the Phyn service.
Step 3: Install Dependencies
The Phyn MCP server uses the same Node.js dependencies plus the Cognito library:
npm install
A.O. Smith Water Heater Setup
Step 1: Get iComm Account Credentials
- Download the A.O. Smith iComm mobile app (iOS/Android)
- Create an account or log in
- Connect your iComm-enabled water heater
- Note your login credentials (email and password)
Step 2: Configure A.O. Smith Environment
- Edit
.envand add your credentials:AOSMITH_EMAIL=your_email@example.com AOSMITH_PASSWORD=your_password_here
Note: The A.O. Smith API uses the same credentials you use in the iComm mobile app.
Step 3: Install Dependencies
The A.O. Smith MCP server uses the same Node.js dependencies:
npm install
Email Reports Setup
Step 1: Configure Gmail SMTP
- Enable 2-Factor Authentication on your Gmail account
- Go to Google Account → Security → App passwords
- Generate an app password for "Mail"
- Add to
.env:GMAIL_USER=your-email@gmail.com GMAIL_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx REPORT_RECIPIENT=recipient@email.com
Step 2: Test Email Reports
# Test daily report
node email-reports/email-report.js daily
# Test weekly report
node email-reports/email-report.js weekly
Step 3: Schedule with launchd (macOS)
-
Copy and customize the template plist files:
cp launchd/com.homecontroller.daily-report.plist.example launchd/com.homecontroller.daily-report.plist cp launchd/com.homecontroller.weekly-report.plist.example launchd/com.homecontroller.weekly-report.plist -
Edit the plist files to replace
/path/to/Home Controllerwith your actual path -
Install the launchd jobs:
cp launchd/*.plist ~/Library/LaunchAgents/ launchctl load ~/Library/LaunchAgents/com.homecontroller.daily-report.plist launchctl load ~/Library/LaunchAgents/com.homecontroller.weekly-report.plist -
Verify they're loaded:
launchctl list | grep homecontroller
Testing Your Setup
Test Miele Integration
# Test API connection
./test-miele.sh
# Or start the MCP server
npm start
Test LG ThinQ Integration
# Test with environment variables
export THINQ_PAT=$(grep THINQ_PAT .env | cut -d= -f2)
export THINQ_COUNTRY=$(grep THINQ_COUNTRY .env | cut -d= -f2)
~/.local/bin/thinqconnect-mcp
Test HUUM Sauna Integration
# Test the HUUM MCP server
node test-huum-sauna.cjs
This will:
- Initialize the HUUM MCP server
- List available tools
- Get current sauna status (temperature, door state, etc.)
Test Phyn Water Monitor Integration
# Test the Phyn MCP server
node test-phyn-mcp.cjs
This will:
- Initialize the Phyn MCP server
- List available tools
- Get all Phyn devices
- Get current device status (pressure, temperature, flow)
- Get water consumption data
Test A.O. Smith Water Heater Integration
# Test the A.O. Smith MCP server
node test-aosmith-mcp.cjs
This will:
- Initialize the A.O. Smith MCP server
- List available tools
- Get all water heaters
- Get current device status (temperature, mode, hot water status)
- Get energy usage data
Available Tools
Miele MCP Server
get_devices
Get all Miele devices connected to your account.
get_device_status
Get detailed status for a specific device.
- Parameters:
deviceId(string)
device_action
Perform an action on a device.
- Parameters:
deviceId(string)action(string): one of "start", "stop", "pause", "powerOn", "powerOff"
LG ThinQ MCP Server
The official LG ThinQ MCP server provides:
- Device list query
- Device status monitoring
- Device control (start, stop, settings)
- Device capabilities query
See thinqconnect-mcp documentation for full details.
HUUM Sauna MCP Server
get_sauna_status
Get current status of the HUUM sauna including:
- Current temperature
- Target temperature
- Heater on/off state
- Door state (open/closed)
- Humidity level
- Start/end times
start_sauna
Start the sauna and set target temperature.
- Parameters:
targetTemperature(number): Target temperature in Celsius (40-110)
- Safety: Always verifies door is closed before starting
stop_sauna
Stop/turn off the sauna heater.
toggle_light
Toggle the sauna light on/off.
Phyn Water Monitor MCP Server
get_devices
Get all Phyn devices connected to your account (Phyn Plus and Smart Sensors).
get_device_status
Get detailed status for a specific device.
- Parameters:
device_id(string) - Returns: pressure, temperature, flow rate, valve status, online status
get_consumption
Get historical water consumption data.
- Parameters:
device_id(string)duration(string):YYYY/MM/DDfor daily,YYYY/MMfor monthly,YYYYfor yearly
shutoff_valve
Open or close the main water shutoff valve (Phyn Plus only).
- Parameters:
device_id(string)action(string): "open" or "close"
A.O. Smith Water Heater MCP Server
get_devices
Get all A.O. Smith water heaters linked to your iComm account.
get_device_status
Get detailed status for a specific water heater.
- Parameters:
junction_id(string) - Returns: temperature setpoint, mode, hot water status, online status
set_temperature
Set the target water temperature.
- Parameters:
junction_id(string)temperature(number): Target temperature in Fahrenheit (95-140)
set_mode
Change the water heater operation mode.
- Parameters:
junction_id(string)mode(string): "HEAT_PUMP", "HYBRID", "ELECTRIC", or "VACATION"
get_energy_usage
Get energy consumption data for a water heater.
- Parameters:
junction_id(string) - Returns: lifetime kWh, average daily usage, recent usage history
Using with Claude Code
Project-Level Configuration (Recommended)
The .mcp.json file in this directory configures all five servers:
{
"mcpServers": {
"miele": {
"type": "stdio",
"command": "/absolute/path/to/miele-mcp-wrapper.sh",
"args": []
},
"lg-thinq": {
"type": "stdio",
"command": "/absolute/path/to/lg-thinq-mcp-wrapper.sh",
"args": []
},
"huum": {
"type": "stdio",
"command": "/absolute/path/to/huum-mcp-wrapper.sh",
"args": []
},
"phyn": {
"type": "stdio",
"command": "/absolute/path/to/phyn-mcp-wrapper.sh",
"args": []
},
"aosmith": {
"type": "stdio",
"command": "/absolute/path/to/aosmith-mcp-wrapper.sh",
"args": []
}
}
}
Note: Wrapper scripts automatically load environment variables from .env.
Global Configuration
To use these servers from anywhere, copy the config:
cp .mcp.json ~/.claude/mcp.json
Then restart Claude Code.
Slash Commands
Slash commands are available in .claude/commands/:
/laundry-status- Quick status check for washers/dryers/kitchen-status- Check all Miele kitchen appliances/sauna-status- Check HUUM sauna temperature and status/home-status- Dashboard view of all appliances/start-washer- Interactive washer program selection/start-dryer- Interactive dryer program selection/start-sauna- Interactive sauna control with temperature/stop-sauna- Turn off the sauna/check-alerts- View notifications and completed cycles/water-status- Check water pressure and flow/water-report- Get water consumption report/water-heater-status- Check heat pump water heater status/set-water-heater- Interactive water heater control
Example Usage
Once configured in Claude Code, you can use natural language:
"What appliances do I have?"
"Check my refrigerator temperature"
"Is my laundry done?"
"Start the washer on delicate cycle"
"Heat the sauna to 80 degrees"
"What's the sauna temperature?"
"Turn off the sauna"
"What's my water pressure?"
"How much water did I use this month?"
"Shut off the water"
"What's my water heater temperature?"
"Set water heater to 120 degrees"
"Put water heater in vacation mode"
"/laundry-status"
"/sauna-status"
"/water-status"
"/water-heater-status"
Troubleshooting
Miele Issues
"401 Unauthorized" errors
- Your access token has expired (tokens last 30 days)
- Run
npm run authto get a new token
Device not responding
- Ensure device is powered on and connected to WiFi
- Verify the device supports Miele@mobile app
- Check that remote control is enabled on the device
US Region Issues
- US accounts must use the legacy OAuth endpoint
- The auth script is pre-configured for US accounts
- EU users may need to modify
auth.jsto use the new endpoint
LG ThinQ Issues
PAT not working
- Verify your PAT at https://thinq.developer.lge.com
- Check that all required permissions are granted
- Ensure
THINQ_COUNTRYmatches your account region
Server not found
- Verify pipx installation:
which thinqconnect-mcp - Check PATH includes
~/.local/bin - Run
pipx ensurepathif needed
HUUM Sauna Issues
"401 Unauthorized" or authentication errors
- Verify your HUUM credentials in
.env - Ensure you're using the same email/password as the HUUM mobile app
- Try logging out and back into the HUUM app to verify credentials
Sauna not responding
- Check that the UKU WiFi controller is powered on and connected
- Verify the sauna is online in the HUUM mobile app
- Ensure your HUUM account is connected to the sauna
Cannot start sauna remotely
- The sauna door must be closed for safety
- Check door state with
/sauna-statusbefore starting - Verify remote safety state is not disabled
Temperature not updating
- The sauna may be off or cooling down (shows low temperature like 2°C)
- Start the sauna to see temperature changes
- Check that the heater is functioning properly
Phyn Water Monitor Issues
"401 Unauthorized" or authentication errors
- Verify your Phyn credentials in
.env - Ensure you're using the same email/password as the Phyn mobile app
- Check that PHYN_API_KEY is set correctly
Devices not showing
- Make sure your Phyn devices are online in the Phyn app
- Verify your Phyn account has devices registered
- Check WiFi connectivity on your Phyn devices
Water consumption not loading
- The Phyn Plus is required for consumption data
- Smart Water Sensors (PW1) don't provide consumption data
- Try different duration formats: YYYY/MM/DD, YYYY/MM, or YYYY
Cannot control shutoff valve
- Only Phyn Plus (PP2) devices have shutoff capability
- Smart Water Sensors (PW1) are monitoring-only
- Ensure the valve is not manually locked
A.O. Smith Water Heater Issues
"401 Unauthorized" or authentication errors
- Verify your iComm credentials in
.env - Ensure you're using the same email/password as the iComm mobile app
- Try logging out and back into the iComm app to verify credentials
Water heater not responding
- Check that the water heater is powered on and connected to WiFi
- Verify the water heater is online in the iComm mobile app
- Ensure your iComm account is connected to the water heater
Energy data not available
- Energy tracking may need to be enabled in the iComm app
- Some older models may not support energy monitoring
- Wait for the water heater to collect usage data
MCP Server Issues
Servers not loading in Claude Code
- Verify
.mcp.jsonis in the correct location - Check that all environment variables are set in
.env - Restart Claude Code after configuration changes
- Review Claude Code logs for errors
Token Maintenance
Miele Token Refresh
Miele access tokens expire after 30 days. When expired:
npm run auth
LG ThinQ PAT
LG Personal Access Tokens don't expire unless revoked. No maintenance needed.
HUUM Credentials
HUUM uses your mobile app login credentials. No token refresh needed - credentials remain valid as long as your account is active.
Phyn Credentials
Phyn uses AWS Cognito authentication with your mobile app login credentials. Tokens are automatically refreshed by the MCP server. No manual maintenance needed.
A.O. Smith Credentials
A.O. Smith uses JWT authentication with your iComm mobile app login credentials. Tokens are automatically refreshed by the MCP server. No manual maintenance needed.
Project Structure
Home Controller/
├── .env # Your credentials (DO NOT commit!)
├── .env.example # Template for credentials
├── .mcp.json # MCP server configuration
├── .gitignore # Excludes .env from git
├── index.js # Miele MCP server (Node.js)
├── huum-mcp-server.js # HUUM Sauna MCP server (Node.js)
├── phyn-mcp-server.js # Phyn Water Monitor MCP server (Node.js)
├── aosmith-mcp-server.js # A.O. Smith Water Heater MCP server (Node.js)
├── auth.js # Miele OAuth helper
├── miele-mcp-wrapper.sh # Miele MCP server wrapper
├── lg-thinq-mcp-wrapper.sh # LG ThinQ MCP server wrapper
├── huum-mcp-wrapper.sh # HUUM MCP server wrapper
├── phyn-mcp-wrapper.sh # Phyn MCP server wrapper
├── aosmith-mcp-wrapper.sh # A.O. Smith MCP server wrapper
├── test-miele-mcp.cjs # Miele integration test
├── test-lg-dryer.cjs # LG ThinQ integration test
├── test-huum-sauna.cjs # HUUM integration test
├── test-phyn-mcp.cjs # Phyn integration test
├── test-aosmith-mcp.cjs # A.O. Smith integration test
├── package.json # Node.js dependencies
├── README.md # This file
├── INSTRUCTIONS.md # User guide
├── CLAUDE.md # Quick reference for Claude Code
└── .claude/
└── commands/ # Slash commands
├── laundry-status.md
├── kitchen-status.md
├── sauna-status.md
├── home-status.md
├── start-washer.md
├── start-dryer.md
├── start-sauna.md
├── stop-sauna.md
├── check-alerts.md
├── water-status.md
├── water-report.md
├── water-heater-status.md
└── set-water-heater.md
Security Notes
- ✅ Credentials stored in
.env(not committed to git) - ✅
.mcp.jsonreferences environment variables - ✅
.gitignoreprevents accidental credential commits - ✅ Tokens are stored locally, never transmitted to Claude
Resources
Miele
LG ThinQ
HUUM Sauna
- HUUM Mobile App (iOS/Android)
- HUUM UKU WiFi Controller
- HUUM Support
- PyHuum Library (Python API reference)
Phyn Water Monitor
- Phyn Mobile App (iOS/Android)
- Phyn Plus
- Phyn Smart Water Sensor
- aiophyn Library (Python API reference)
A.O. Smith Water Heater
- iComm Mobile App (iOS/Android)
- A.O. Smith Heat Pump Water Heaters
- py-aosmith Library (Python API reference)
- Home Assistant Integration
General
Contributing
This is a personal home automation project. Feel free to fork and customize for your own setup!
License
ISC
Support
For issues:
- Miele API: Contact partner.developer@miele.com
- LG ThinQ API: Check the LG Developer Portal
- MCP/Claude Code: See Claude Code documentation
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。