🏠 User Guide: Home Assistant Integration
Version: 1.5.33
Date: Oct 11, 2025
Difficulty level: 🟡 Medium
Setup time: ~2 hours (HA installation) + 10 minutes (integration setup)
📋 Table of Contents
- What is Home Assistant and why you need it
- Advantages over Tuya Cloud API
- Requirements
- Home Assistant Installation
- Setting up integrations in Home Assistant
- Setup in 3D Printer Control Panel
- Linking plugs to printers
- Usage and automation
- Troubleshooting
What is Home Assistant and why you need it
What is Home Assistant?
Home Assistant (HA) - is a free open-source platform for smart home management.
🌟 Key features:
- 🔓 Open Source - completely free
- 🏠 Local control - works without cloud
- 🔌 2000+ integrations - support for all popular devices
- 🤖 Powerful automation - endless possibilities
- 📊 Data history - charts and analytics
- 🔒 Privacy - all data stays with you
Official website: https://www.home-assistant.io
Why use Home Assistant instead of Tuya?
✅ Home Assistant advantages:
Versatility - MAIN ADVANTAGE!
One integration → All plug brands:├─ ✅ Tuya/Smart Life ├─ ✅ Yandex plugs 🎯 (no direct API!) ├─ ✅ TP-Link (Kasa) ├─ ✅ Sonoff (eWeLink) ├─ ✅ Xiaomi (Mi Home) ├─ ✅ Meross ├─ ✅ Shelly └─ ✅ And thousands more!Local operation
- Works without internet (after setup)
- Fast response (50-200ms vs 200-500ms for Tuya Cloud)
- Independent of cloud services
- Works 24/7 even during internet outages
Expandability
- IP cameras for print monitoring
- Room temperature sensors
- Lighting control
- Climate control (AC, heater)
- Integration with other systems
Advantages over Tuya Cloud API
| Criteria | Tuya Cloud API | Home Assistant | Winner |
|---|---|---|---|
| Setup simplicity | 🟢 Very simple (30 min) | 🟡 Medium (2 hours) | Tuya |
| Device support | 🟡 Tuya only | 🟢 All brands | HA |
| Yandex plugs | ❌ Not supported | ✅ Supported | HA |
| Response speed | 🟡 200-500ms | 🟢 50-200ms | HA |
| Works without internet | ❌ Doesn't work | ✅ Works | HA |
| Cost | 🟢 Free | 🟢 Free | Tie |
| Cloud dependency | ❌ Full | ✅ None | HA |
| Additional hardware | ✅ Not needed | ❌ Server needed | Tuya |
| Privacy | 🟡 Data in cloud | 🟢 All local | HA |
🎯 When to choose Home Assistant:
✅ You have plugs of different brands (Tuya + Yandex + others)
✅ You have Yandex plugs (no other way!)
✅ You already use Home Assistant for smart home
✅ Need maximum speed response
✅ Need operation without internet
✅ Want to expand functionality (cameras, sensors)
✅ Important privacy of data
🎯 When to choose Tuya Cloud API:
✅ You have only Tuya/Smart Life plugs
✅ Need maximum simplicity setup
✅ Don't want to run additional server
✅ Need remote access from anywhere in the world
Requirements
Hardware for Home Assistant
You will need a constantly running server for Home Assistant.
Option 1: Raspberry Pi (RECOMMENDED)
What to buy:
- 🥧 Raspberry Pi 4 (4GB RAM) - ~6000₽
- 💾 microSD card 64GB (Class 10) - ~800₽
- 🔌 Power supply USB-C 15W - ~500₽
- 📦 Case with cooling - ~500₽
- 🌐 Ethernet cable (optional) - ~200₽
Total: ~8000₽
Where to buy:
- Raspberry Pi: Yandex.Market, Ozon, Aliexpress
- Or ready kit "Raspberry Pi Kit"
Option 2: Old computer/laptop (FREE!)
Suitable:
- ✅ Any PC/laptop up to 10 years old
- ✅ Minimum 2GB RAM
- ✅ CPU: any Intel/AMD
- ✅ Disk space: 32GB+
Pros:
- 🟢 Free (use what you have)
- 🟢 More power than Raspberry Pi
- 🟢 Can use as server for other tasks
Cons:
- 🔴 Higher power consumption (~30-50W vs ~5W for RPi)
- 🔴 Takes up space
Option 3: Virtual machine
If you already have a server:
- VMware ESXi
- Proxmox
- VirtualBox
- Docker
VM requirements:
- RAM: 2GB minimum, 4GB recommended
- CPU: 2 cores
- Disk: 32GB
- Network: Bridged (important!)
Software
✅ Home Assistant OS - image for installation
✅ Balena Etcher - for writing image (if Raspberry Pi)
✅ 3D Printer Control Panel version 1.5.30+
Home Assistant Installation
⏱️ Time: 1-2 hours (most time is waiting)
🎯 Goal: Start Home Assistant server
Choose one of the installation options:
Option A: Raspberry Pi (RECOMMENDED)
Step 1: Download image
- Open: https://www.home-assistant.io/installation/raspberrypi
- Download image for your model:
- Raspberry Pi 4/5:
haos_rpi4-64-XX.X.img.xz - Raspberry Pi 3:
haos_rpi3-64-XX.X.img.xz
- Raspberry Pi 4/5:
File size: ~500MB-1GB
Step 2: Write to microSD
- Download Balena Etcher: https://www.balena.io/etcher/
- Run Etcher
- Flash from file → select downloaded image
.img.xz - Select target → select your microSD card
- Flash! → writing will start (5-10 minutes)
- Wait for completion and message "Flash Complete!"
⚠️ Warning: All data on microSD will be deleted!
Step 3: First boot
- Insert microSD into Raspberry Pi
- Connect Ethernet cable (recommended) or configure Wi-Fi
- Connect power (USB-C 15W+)
- Wait 20 minutes - first boot is long!
- LEDs will blink
- Raspberry Pi will be hot - this is normal
- Don't turn off power!
Step 4: Open web interface
- Open browser on computer
- Go to: http://homeassistant.local:8123
❌ If it doesn't open:
- Wait another 5-10 minutes
- Try to find Raspberry Pi IP address:
- Open router → device list
- Find "homeassistant" or "raspberrypi"
- Use IP:
http://192.168.X.X:8123
- Check Ethernet connection
- Reboot Raspberry Pi
Step 5: Initial setup
Create account:
- Name: your name
- Username: login (e.g., admin)
- Password: create password
- Confirm password: repeat
Set location:
- Find your city on map
- Or enter address
- Timezone will be set
Choose units:
- Metric (metric system)
Skip analytics (or allow)
Click "Finish"
✅ Home Assistant is installed and working!
Option B: Docker (for advanced)
Requirements:
- Linux server (Ubuntu, Debian, etc.)
- Docker installed
Installation:
# 1. Создать папку для конфигурации
mkdir -p ~/homeassistant
# 2. Запустить Home Assistant в Docker
docker run -d \
--name homeassistant \
--restart=unless-stopped \
-e TZ=Europe/Moscow \
-v ~/homeassistant:/config \
--network=host \
ghcr.io/home-assistant/home-assistant:stable
# 3. Проверить статус
docker logs -f homeassistant
# 4. Дождаться сообщения "Home Assistant is running"
# 5. Открыть http://localhost:8123
Then perform Step 5 from Option A (Initial setup).
Option C: Virtual machine
- Download VMDK/VHDX image: https://www.home-assistant.io/installation/
- Create new VM:
- RAM: 4GB
- CPU: 2 cores
- Disk: 32GB
- Network: Bridged (important!)
- Import downloaded image
- Start VM
- Open http://homeassistant.local:8123
- Perform initial setup (Step 5 from Option A)
Setting up integrations in Home Assistant
⏱️ Time: 10-30 minutes
🎯 Goal: Add plugs to Home Assistant
Tuya plugs integration
Method 1: Via Tuya Cloud (RECOMMENDED)
- In Home Assistant open:
- Settings → Devices & Services → Add Integration
- In search enter: "Tuya"
- Select "Tuya Smart Life"
- Enter data:
- Country: Russia (or your country)
- Account Type: Smart Life
- Username: your Smart Life email
- Password: Smart Life password
- Click "Submit"
- Confirm authorization
✅ All plugs from Smart Life will automatically appear in HA!
Time: 5 minutes
Difficulty: 🟢 Easy
Method 2: Locally via LocalTuya (for advanced)
This method is more complex, but provides local control without internet.
Required:
- HACS (Home Assistant Community Store)
- Local Key for each plug
- Plug IP addresses
Not recommended for beginners - use Method 1.
Yandex plugs integration
🎯 Important: This is the only way to use Yandex plugs!
- In Home Assistant open:
- Settings → Devices & Services → Add Integration
- In search enter: "Yandex Smart Home"
- Click on result "Yandex Smart Home"
- Authorize via Yandex ID:
- Enter Yandex login
- Enter password
- Confirm access
- Click "Submit"
✅ All devices from "Home with Alice" will appear in HA!
Time: 5 minutes
Difficulty: 🟢 Easy
Other plugs integration
TP-Link (Kasa):
- Add Integration → "TP-Link Kasa Smart"
- Devices will be found automatically
Sonoff (eWeLink):
- Add Integration → "Sonoff"
- Enter eWeLink data
Xiaomi (Mi Home):
- Add Integration → "Xiaomi Miio"
- Enter device token
And so on for other brands...
Device check
After adding integrations:
- Open Settings → Devices & Services
- You'll see integration list:
- Tuya (if added)
- Yandex Smart Home (if added)
- And others
- Click on integration → see device list
- Each plug should have:
- Entity ID - for example:
switch.printer_ender3 - State - on or off
- Friendly Name - clear name
- Entity ID - for example:
✅ All plugs are ready to use!
Creating Long-Lived Access Token
⏱️ Time: 2 minutes
🎯 Goal: Get token for 3D Printer Control Panel
Steps:
- In Home Assistant click on your name (bottom left corner)
- Scroll down to section "Long-lived access tokens"
- Click "Create Token"
- Enter token name:
3D Printer Control Panel - Click "OK"
- COPY TOKEN - it won't show again!
Token looks like this:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5ZjNkNGE4ZjRhOGY0YThmNGE4ZjRhOGY0YThmNGE4ZiIsImlhdCI6MTYzMzA0MDAwMCwiZXhwIjoxOTQ4NDAwMDAwfQ.abcdefghijklmnopqrstuvwxyz1234567890
📝 Save token in:
- Notepad
- Password manager
- File
PRIVATE_NOTES.md
⚠️ If you lose it - you'll need to create new token (delete old one).
Setup in 3D Printer Control Panel
⏱️ Time: 3 minutes
🎯 Goal: Connect app to Home Assistant
6.1. Open settings
- Start 3D Printer Control Panel
- Click button 🔌 Plugs in top menu
- Modal window will open
6.2. Select Home Assistant
- You'll see two selection cards
- Click on card 🏠 Home Assistant
- Home Assistant setup section will open
6.3. Enter data
Home Assistant URL:
- Enter your HA server address
- Examples:
http://homeassistant.local:8123- if on Raspberry Pihttp://192.168.1.100:8123- if IP address is knownhttp://localhost:8123- if on same computer
Long-Lived Access Token:
- Paste token you copied earlier
- Complete (usually ~200 characters)
6.4. Check connection
- Click button 🔍 Check connection
- Wait 2-3 seconds
- Should appear: "✅ Connection established!"
❌ If error:
- Check URL correctness (should start with
http://) - Check token correctness (copied completely)
- Make sure Home Assistant is running and accessible
- Try opening URL in browser
- Check network (computer and HA in same network)
6.5. Save settings
- Click button 💾 Save
- Should appear: "✅ Settings saved!"
- You can close window
✅ Home Assistant connected! Token saved encrypted.
Linking plugs to printers
⏱️ Time: 2 minutes per printer
🎯 Goal: Link each plug to printer
7.1. Open printer editing
- Find needed printer card
- Click button ✏️ Edit
- Modal window will open
7.2. Scroll to "Smart plug" section
- Scroll window down
- Find section 🔌 Smart plug
7.3. Select Home Assistant
- In "Connection type" field select Home Assistant
- Fields will appear:
- Home Assistant entity selection
- Refresh button 🔄
7.4. Load entities list
- Click button 🔄 next to selection field
- Wait 1-2 seconds
- All plugs from Home Assistant will appear in list
Examples:
Ender 3 Printer (switch.printer_ender3)Yandex plug 1 (switch.yandex_socket_1)TP-Link plug (switch.tplink_plug_1)
❌ If list is empty:
- Make sure plugs are added to Home Assistant
- Check in HA: Settings → Devices & Services
- Click 🔄 again
7.5. Select entity
- In dropdown select needed plug
- For example: "Ender 3 Printer (switch.printer_ender3)"
- After selection automation section will appear ⚙️ Automation
7.6. Configure automation
Same 4 options as for Tuya will appear:
✅ Auto-shutdown after print completion
- Recommended: ✅ Enable
- Delay: 5 minutes (or your choice)
✅ Auto-shutdown on print error
- Recommended: ✅ Enable
✅ Auto-shutdown on overheating (MCU > 70°C)
- Recommended: ✅ MUST enable!
7.7. Save settings
- Click button "Save"
- Window will close
- On printer card will appear button ⚡ POWER
✅ Plug linked to printer!
Usage and automation
Usage is exactly the same as with Tuya Cloud API!
Manual control
- Find printer card
- Click button ⚡ POWER
- Plug will switch (ON ↔ OFF)
- Button color will change:
- 🟢 Green = On
- 🔴 Red = Off
Automatic operation
All automations work exactly the same as with Tuya:
- ✅ Auto-shutdown after print
- ✅ Auto-shutdown on error
- ✅ Overheating protection
For more details see Tuya User Guide
Additional Home Assistant features
Monitoring via HA web interface
- Open Home Assistant:
http://homeassistant.local:8123 - On main screen you'll see all plugs
- Can turn on/off directly from HA
- History graphs visible (when turned on/off)
Creating dashboard for 3D farm
In Home Assistant you can create separate dashboard:
- Settings → Dashboards → Add Dashboard
- Name it: "3D Printer Farm"
- Add cards:
- Entities Card - list of all plugs
- History Graph - on/off graph
- Button Card - large control buttons
Automations in Home Assistant
Can create additional automations:
Example: Night shutdown
automation:
- alias: "3D Farm - Night Shutdown"
trigger:
- platform: time
at: "23:00:00"
condition:
# Only if no active prints - condition: state
entity_id: sensor.printing_count
state: "0"
action:
- service: switch.turn_off
target:
entity_id:
- switch.printer_1
- switch.printer_2
- switch.printer_3
Пример: Утреннее включение
automation:
- alias: "3D Farm - Morning Start"
trigger:
- platform: time
at: "07:00:00"
action:
- service: switch.turn_on
target:
entity_id:
- switch.printer_1
- switch.printer_2
- switch.printer_3
Voice control
Configure integration with:
- Alice (Yandex) - via Yandex Smart Home
- Google Assistant - via Google Home
- Alexa - via Alexa Home Skill
You'll be able to say:
- "Alice, turn on Ender printer"
- "Alice, turn off all printers"
Troubleshooting
❌ "Home Assistant not configured"
Solution:
- Click 🔌 Plugs in header
- Select 🏠 Home Assistant
- Enter URL and Token
- Click "Save"
❌ "Connection test failed"
Possible causes:
Home Assistant not accessible
- Check that HA is running
- Open URL in browser
- HA page should open
Wrong URL
- Should start with
http:// - Port should be specified:
:8123 - Correct URL examples:
http://homeassistant.local:8123http://192.168.1.50:8123
- Wrong examples:
- ❌
homeassistant.local(without http://) - ❌
http://homeassistant.local(without port) - ❌
https://homeassistant.local:8123(https instead of http)
- ❌
- Should start with
Wrong token
- Check that copied completely
- Token is very long (~200 characters)
- No spaces at beginning/end
Token expired or deleted
- Create new token in HA
- Delete old token
Firewall blocks
- Check firewall settings
- Allow connection to port 8123
❌ "Plugs not found"
Solution:
Check in Home Assistant:
- Open HA → Settings → Devices & Services
- Make sure integrations are active
- Make sure devices are online
Check entity ID:
- Open HA → Developer Tools → States
- Find your plugs (start with
switch.) - Copy exact entity ID
Update list in app:
- Click 🔄 button in edit window
- Wait a few seconds
❌ Plug doesn't turn on/off
Check:
Status in Home Assistant:
- Откройте HA → Settings → Devices & Services
- Найдите розетку
- Статус должен быть "on" или "off" (не "unavailable")
Try from Home Assistant:
- Turn on/off plug in HA itself
- If works in HA, but not in app:
- Check entity ID (should match)
- Re-save printer settings
Check network:
- Plug should be on network (Wi-Fi)
- Home Assistant should be accessible
🎓 Advanced features
Notifications in Home Assistant
Configure notifications when printer turns off:
automation:
- alias: "Notify when printer powered off"
trigger:
- platform: state
entity_id: switch.printer_1
to: "off"
action:
- service: notify.mobile_app
data:
message: "Printer power turned off"
Camera integration
Add IP cameras for monitoring:
- Add Integration → "Generic Camera" (or specific brand)
- Specify camera stream URL
- Create dashboard with cameras and plugs
Energy monitoring
If plugs support energy measurement:
- Additional sensors will appear in HA:
sensor.printer_1_power- current power (W)sensor.printer_1_energy- consumption (kWh)
- Can create consumption charts
- Integrate with 3D Printer Control Panel analytics
💰 Solution cost
Option 1: Raspberry Pi 4
Hardware:
- Raspberry Pi 4 (4GB): 6000₽
- microSD 64GB: 800₽
- Power supply: 500₽
- Case: 500₽
- Total: ~8000₽
Power consumption:
- ~5Вт × 24ч × 365 days = 44 kWh/year
- At 5₽/kWh = ~220₽/year
Payback:
- If 5 printers × 730₽ savings = 3650₽/year
- Payback in 2-3 years
Option 2: Old laptop (FREE)
Hardware:
- Old laptop: 0₽ (use what you have)
Power consumption:
- ~30Вт × 24ч × 365 days = 263 kWh/year
- At 5₽/kWh = ~1315₽/year
But:
- For 5-printer farm savings 3650₽/year
- Net benefit: 3650 - 1315 = 2335₽/year
📊 Comparison with Tuya Cloud API
| Parameter | Tuya Cloud API | Home Assistant |
|---|---|---|
| Hardware cost | 0₽ | 8000₽ (or 0₽ if you have PC) |
| Usage cost | 0₽ | 0₽ |
| Setup time | 30 minutes | 2 hours |
| Complexity | 🟢 Easy | 🟡 Medium |
| Tuya support | ✅ | ✅ |
| Yandex support | ❌ | ✅ |
| Other brands support | ❌ | ✅ |
| Works without internet | ❌ | ✅ |
| Speed | 200-500ms | 50-200ms |
| Expandability | ❌ | ✅ |
| Privacy | Data in cloud | All local |
🎯 Final recommendation:
Choose Tuya if:
- You have only Tuya plugs
- Need simple setup
- Don't want additional hardware
Choose Home Assistant if:
- You have Yandex plugs 🎯
- You have plugs of different brands
- Already use HA
- Need operation without internet
- Want more features
You can use BOTH!
- Tuya for some printers
- HA for other printers
- Choose what's more convenient
✅ Successful setup checklist
Home Assistant:
- HA installed and running
- Available at http://homeassistant.local:8123
- Integrations added (Tuya/Yandex/others)
- Plugs visible in HA
- Access Token created and saved
3D Printer Control Panel:
- HA configured in app (🔌 Plugs)
- Connection tested ✅
- Plugs linked to printers
- Automation configured
- ⚡ button appeared on cards
- Turn on/off works
📚 Additional resources
Official documentation:
- Home Assistant: https://www.home-assistant.io/docs/
- Getting Started: https://www.home-assistant.io/getting-started/
- Integrations: https://www.home-assistant.io/integrations/
Community:
- Forum: https://community.home-assistant.io/
- Discord: https://discord.gg/home-assistant
- Reddit: https://reddit.com/r/homeassistant
- Telegram (Russian): @homassistant_ru
Video tutorials (YouTube):
- "Home Assistant on Raspberry Pi" - step-by-step installation
- "Home Assistant for beginners" - basics
- "Tuya integration in Home Assistant" - setup
🎉 Conclusion
You have configured Home Assistant integration!
Now you can:
- ✅ Control plugs of any brands
- ✅ Use Yandex plugs (unique!)
- ✅ Work without internet (locally)
- ✅ Expand system (cameras, sensors, etc.)
- ✅ Use all smart home capabilities
Welcome to the world of Home Assistant! 🏠