A self-contained Smart Home development environment using Docker, Home Assistant, and GitHub Codespaces.
Automate your smart home with a local-first architecture. Control existing devices (Nest, Ring, Hue, Yale, Aqara) and prototype new hardware (ESP32, Raspberry Pi) in a single private Git repository.
- GitHub account with Codespaces access (included with free tier)
- Docker installed locally (optionalβpre-installed in Codespaces)
# 1. Clone or open in Codespaces
git clone https://github.com/yourusername/SmartHome_JustClick.git
cd SmartHome_JustClick
# 2. Start the stack
./scripts/start-dev.sh
# 3. Access Home Assistant
# Open http://localhost:8123 in your browserFirst startup takes 3-5 minutes. Home Assistant initializes the database and loads integrations.
βββββββββββββββββββββββββββββββββββββββ
β GitHub Codespaces / Local β
βββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββββββββββββββββββ β
β β Home Assistant (8123) β β
β β β’ Device integrations β β
β β β’ Automations β β
β β β’ UI dashboard β β
β ββββββββββββββββββββββββββββββββ β
β β controls β β
β ββββββββββββββββββββββββββββββββ β
β β ESPHome (6052) β β
β β β’ ESP32 firmware compiler β β
β β β’ Local hardware prototypes β β
β ββββββββββββββββββββββββββββββββ β
β β compiles β β
β ββββββββββββββββββββββββββββββββ β
β β Your Devices β β
β β β’ Nest/Ecobee thermostats β β
β β β’ Ring doorbell β β
β β β’ Philips Hue lights β β
β β β’ Yale smart locks β β
β β β’ Aqara sensors β β
β ββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββ
Communication methods:
- Cloud APIs (Google, Amazon, Philips, etc.) for device control from Codespaces
- MQTT (optional) for local-first setups with home network bridge
- Local protocols (Zigbee, Z-Wave, Matter) via physical hub on home network
SmartHome_JustClick/
βββ README.md # This file
βββ foundation.md # Detailed setup & architecture docs
βββ docker-compose.yml # Docker services configuration
βββ .devcontainer/
β βββ devcontainer.json # GitHub Codespaces config
β
βββ homeassistant/
β βββ configuration.yaml # HA main config
β βββ automations.yaml # Automation definitions
β βββ scripts.yaml # Helper scripts
β βββ scenes.yaml # Scene definitions
β βββ blueprints/ # Reusable automation blueprints
β
βββ esphome/
β βββ prototypes/ # ESP32/ESP8266 device configs (.yaml)
β
βββ openclaw-skills/
β βββ smart-home-core/ # AI skill definitions (future)
β βββ SKILL.md
β βββ tools.py
β βββ claw.json
β
βββ docs/
β βββ ARCHITECTURE.md # Detailed architecture
β βββ DEVICE-SETUP.md # Per-device integration guides
β βββ TROUBLESHOOTING.md # Common issues & fixes
β βββ CLAWHUB-REFERENCE.md # Original 7 markdown files
β
βββ scripts/
βββ start-dev.sh # Start Docker stack
βββ recover.sh # Recovery/reset containers
βββ docker-diagnostic.sh # Check Docker status
βββ install-tools.sh # Install Docker + compose
βββ restart-ha.sh # Restart Home Assistant
βββ check-containers.sh # View container logs
βββ TROUBLESHOOTING.md # Script usage guide
# Start the entire stack
./scripts/start-dev.sh
# Stop all containers
docker-compose down
# Stop and remove volumes (WARNING: deletes data)
docker-compose down -v# View live Home Assistant logs
docker logs -f homeassistant
# Check all container status
docker ps -a
# Full diagnostics
./scripts/docker-diagnostic.sh
# Container status & logs
./scripts/check-containers.sh# Edit Home Assistant main config
nano homeassistant/configuration.yaml
# Add automation rules
nano homeassistant/automations.yaml
# Add ESPHome device
nano esphome/prototypes/my_device.yaml# If containers won't start
./scripts/recover.sh
# Full system reset
docker-compose down -v && docker system prune -f && ./scripts/start-dev.shHome Assistant natively integrates with:
| Device | Protocol | Integration | Effort |
|---|---|---|---|
| Nest Thermostat | Cloud API | API key | |
| Ecobee | Cloud API | Ecobee | API key |
| Ring Doorbell | Cloud API | Ring | Email/password |
| Philips Hue | Zigbee/Cloud | Hue | Bridge or credentials |
| Yale Smart Lock | Z-Wave/WiFi | Yale | Device pairing |
| Aqara Sensors | Zigbee | Aqara | Hub required |
| Custom ESP32 | Local WiFi | ESPHome | YAML config |
Setup time: Usually 5-15 minutes per device (get credentials, add integration, pair if needed).
# homeassistant/configuration.yaml
nest:
client_id: YOUR_GOOGLE_CLIENT_ID
client_secret: YOUR_SECRETThen restart: docker-compose restart homeassistant
# homeassistant/automations.yaml
- alias: "Good Morning"
trigger:
platform: time
at: "07:00:00"
condition:
condition: time
weekday: [mon, tue, wed, thu, fri]
action:
- service: light.turn_on
entity_id: light.bedroom
data:
brightness: 50
- service: climate.set_temperature
entity_id: climate.thermostat
data:
temperature: 72# esphome/prototypes/living_room_sensor.yaml
esphome:
name: living_room_sensor
esp32:
board: esp32dev
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
sensor:
- platform: dht
pin: GPIO4
temperature:
name: "Living Room Temperature"
humidity:
name: "Living Room Humidity"| Service | URL | Purpose |
|---|---|---|
| Home Assistant | http://localhost:8123 | Main dashboard & automation UI |
| ESPHome | http://localhost:6052 | Hardware compiler & device management |
| OpenClaw | http://localhost:8080 | AI skills (optional, currently disabled) |
β Local-first by default
- All automations run locally
- No external dependencies for core functions
- Devices control via cloud APIs (encrypted)
β Credentials management
- Never commit
.envfiles or credentials - Use Home Assistant secrets file:
homeassistant/secrets.yaml - All sensitive data stored in
.gitignore
β Network isolation (when running on home network)
- Use separate VLAN for IoT devices
- Configure firewall rules in your router
- See docs/ARCHITECTURE.md for details
In GitHub Codespaces (free tier):
- Container images: ~2-3 GB (one-time download)
- Runtime memory: <2 GB
- Disk usage: ~800 MB runtime data
- Total footprint: Fits easily in free tier
Cost: $0 if you stop Codespaces when done (Settings β Stop Codespace)
# 1. Edit automations
nano homeassistant/automations.yaml
# 2. Restart HA to reload
docker-compose restart homeassistant
# 3. Test in dashboard
# http://localhost:8123 β Automations
# 4. Commit when working
git add homeassistant/automations.yaml
git commit -m "Add good morning routine"
git push# 1. Write ESP32 config
nano esphome/prototypes/new_device.yaml
# 2. Connect your ESP32 via USB (local only)
./scripts/esphome-flash.sh new_device
# 3. Device appears in Home Assistant
# Verify in Integrations β ESPHome Devices# 1. Stop containers when not using
docker-compose down
# 2. Commit your changes
git add -A
git commit -m "Work snapshot"
git push
# 3. Stop Codespace in GitHub
# Settings β Stop Codespace (saves hours)
# 4. Resume later
# Codespace will restart from your last state"Port 8123 shows 400 Bad Request"
- Home Assistant is still initializing (first startup: 3-5 min)
- View logs:
docker logs -f homeassistant - Wait for "Setup passed" message
"Port 8080 shows 502 Bad Gateway"
- OpenClaw is currently disabled (optional feature)
- Home Assistant alone is fully functional
- Skip this port for now
Permission errors with homeassistant/.storage/
- Fix permissions:
sudo chown -R $USER:$USER homeassistant/.storage - Or skip from Git: Already in
.gitignore
Container won't start
- Run diagnostics:
./scripts/docker-diagnostic.sh - Try recovery:
./scripts/recover.sh - Full reset:
docker-compose down -v && docker-compose up -d
More help: docs/TROUBLESHOOTING.md
| Document | Purpose |
|---|---|
| foundation.md | Detailed architecture & design decisions |
| docs/QUICK-START.md | 5-minute setup walkthrough |
| docs/LOCAL-RASPBERRY-PI.md | β Move to local/Raspberry Pi production |
| docs/DEVICE-SETUP.md | Per-device integration guides |
| docs/ARCHITECTURE.md | Complete system architecture |
| scripts/TROUBLESHOOTING.md | Common issues & solutions |
This is a personal smart home repo! But if you want to:
- Add a new device integration β Create docs/DEVICE-SETUP.md section
- Improve automation β Test locally, then commit
- Create reusable blueprint β Save to
homeassistant/blueprints/ - Build new hardware β Add ESPHome config to
esphome/prototypes/
MIT License - See LICENSE file for details
Coming in 1-3 months: Natural language automation with OpenClaw + Ollama/llama.cpp
"Turn on bedroom and set temperature to 72"
β
Local AI understands intent
β
OpenClaw routes to Home Assistant
β
Your devices respond
Why add it later?
- YAML automations are powerful enough to start
- AI layer adds 20+ min setup
- Better to master basics first
- Zero cost when you add it
See: docs/OPENCLAWINTEGRATION.md for full AI integration guide (read in Phase 3)
- Start the stack:
./scripts/start-dev.sh - Access Home Assistant: http://localhost:8123
- Add your first device: Settings β Devices & Services β Add Integration
- Create your first automation: Automate tab β Create automation
- Stop when done:
docker-compose downor stop Codespace
- Home Assistant Docs: https://www.home-assistant.io/docs/
- ESPHome Docs: https://esphome.io/
- Community Forums: https://community.home-assistant.io/
Last updated: March 2026
Status: Ready for development β