🏠 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

  1. What is Home Assistant and why you need it
  2. Advantages over Tuya Cloud API
  3. Requirements
  4. Home Assistant Installation
  5. Setting up integrations in Home Assistant
  6. Setup in 3D Printer Control Panel
  7. Linking plugs to printers
  8. Usage and automation
  9. 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:

  1. 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!
  2. 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
  3. 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

  1. Open: https://www.home-assistant.io/installation/raspberrypi
  2. 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

File size: ~500MB-1GB

Step 2: Write to microSD

  1. Download Balena Etcher: https://www.balena.io/etcher/
  2. Run Etcher
  3. Flash from file → select downloaded image .img.xz
  4. Select target → select your microSD card
  5. Flash! → writing will start (5-10 minutes)
  6. Wait for completion and message "Flash Complete!"

⚠️ Warning: All data on microSD will be deleted!

Step 3: First boot

  1. Insert microSD into Raspberry Pi
  2. Connect Ethernet cable (recommended) or configure Wi-Fi
  3. Connect power (USB-C 15W+)
  4. 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

  1. Open browser on computer
  2. 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

  1. Create account:

    • Name: your name
    • Username: login (e.g., admin)
    • Password: create password
    • Confirm password: repeat
  2. Set location:

    • Find your city on map
    • Or enter address
    • Timezone will be set
  3. Choose units:

    • Metric (metric system)
  4. Skip analytics (or allow)

  5. 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

  1. Download VMDK/VHDX image: https://www.home-assistant.io/installation/
  2. Create new VM:
    • RAM: 4GB
    • CPU: 2 cores
    • Disk: 32GB
    • Network: Bridged (important!)
  3. Import downloaded image
  4. Start VM
  5. Open http://homeassistant.local:8123
  6. 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)

  1. In Home Assistant open:
    • SettingsDevices & ServicesAdd Integration
  2. In search enter: "Tuya"
  3. Select "Tuya Smart Life"
  4. Enter data:
    • Country: Russia (or your country)
    • Account Type: Smart Life
    • Username: your Smart Life email
    • Password: Smart Life password
  5. Click "Submit"
  6. 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!

  1. In Home Assistant open:
    • SettingsDevices & ServicesAdd Integration
  2. In search enter: "Yandex Smart Home"
  3. Click on result "Yandex Smart Home"
  4. Authorize via Yandex ID:
    • Enter Yandex login
    • Enter password
    • Confirm access
  5. Click "Submit"

All devices from "Home with Alice" will appear in HA!

Time: 5 minutes
Difficulty: 🟢 Easy


Other plugs integration

TP-Link (Kasa):

  1. Add Integration → "TP-Link Kasa Smart"
  2. Devices will be found automatically

Sonoff (eWeLink):

  1. Add Integration → "Sonoff"
  2. Enter eWeLink data

Xiaomi (Mi Home):

  1. Add Integration → "Xiaomi Miio"
  2. Enter device token

And so on for other brands...


Device check

After adding integrations:

  1. Open SettingsDevices & Services
  2. You'll see integration list:
    • Tuya (if added)
    • Yandex Smart Home (if added)
    • And others
  3. Click on integration → see device list
  4. Each plug should have:
    • Entity ID - for example: switch.printer_ender3
    • State - on or off
    • Friendly Name - clear name

All plugs are ready to use!


Creating Long-Lived Access Token

⏱️ Time: 2 minutes
🎯 Goal: Get token for 3D Printer Control Panel

Steps:

  1. In Home Assistant click on your name (bottom left corner)
  2. Scroll down to section "Long-lived access tokens"
  3. Click "Create Token"
  4. Enter token name: 3D Printer Control Panel
  5. Click "OK"
  6. 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

  1. Start 3D Printer Control Panel
  2. Click button 🔌 Plugs in top menu
  3. Modal window will open

6.2. Select Home Assistant

  1. You'll see two selection cards
  2. Click on card 🏠 Home Assistant
  3. Home Assistant setup section will open

6.3. Enter data

  1. Home Assistant URL:

    • Enter your HA server address
    • Examples:
      • http://homeassistant.local:8123 - if on Raspberry Pi
      • http://192.168.1.100:8123 - if IP address is known
      • http://localhost:8123 - if on same computer
  2. Long-Lived Access Token:

    • Paste token you copied earlier
    • Complete (usually ~200 characters)

6.4. Check connection

  1. Click button 🔍 Check connection
  2. Wait 2-3 seconds
  3. 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

  1. Click button 💾 Save
  2. Should appear: "✅ Settings saved!"
  3. 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

  1. Find needed printer card
  2. Click button ✏️ Edit
  3. Modal window will open

7.2. Scroll to "Smart plug" section

  1. Scroll window down
  2. Find section 🔌 Smart plug

7.3. Select Home Assistant

  1. In "Connection type" field select Home Assistant
  2. Fields will appear:
    • Home Assistant entity selection
    • Refresh button 🔄

7.4. Load entities list

  1. Click button 🔄 next to selection field
  2. Wait 1-2 seconds
  3. 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

  1. In dropdown select needed plug
  2. For example: "Ender 3 Printer (switch.printer_ender3)"
  3. 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

  1. Click button "Save"
  2. Window will close
  3. 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

  1. Find printer card
  2. Click button ⚡ POWER
  3. Plug will switch (ON ↔ OFF)
  4. 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

  1. Open Home Assistant: http://homeassistant.local:8123
  2. On main screen you'll see all plugs
  3. Can turn on/off directly from HA
  4. History graphs visible (when turned on/off)

Creating dashboard for 3D farm

In Home Assistant you can create separate dashboard:

  1. SettingsDashboardsAdd Dashboard
  2. Name it: "3D Printer Farm"
  3. 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:

  1. Click 🔌 Plugs in header
  2. Select 🏠 Home Assistant
  3. Enter URL and Token
  4. Click "Save"

❌ "Connection test failed"

Possible causes:

  1. Home Assistant not accessible

    • Check that HA is running
    • Open URL in browser
    • HA page should open
  2. Wrong URL

    • Should start with http://
    • Port should be specified: :8123
    • Correct URL examples:
      • http://homeassistant.local:8123
      • http://192.168.1.50:8123
    • Wrong examples:
      • homeassistant.local (without http://)
      • http://homeassistant.local (without port)
      • https://homeassistant.local:8123 (https instead of http)
  3. Wrong token

    • Check that copied completely
    • Token is very long (~200 characters)
    • No spaces at beginning/end
  4. Token expired or deleted

    • Create new token in HA
    • Delete old token
  5. Firewall blocks

    • Check firewall settings
    • Allow connection to port 8123

❌ "Plugs not found"

Solution:

  1. Check in Home Assistant:

    • Open HA → Settings → Devices & Services
    • Make sure integrations are active
    • Make sure devices are online
  2. Check entity ID:

    • Open HA → Developer Tools → States
    • Find your plugs (start with switch.)
    • Copy exact entity ID
  3. Update list in app:

    • Click 🔄 button in edit window
    • Wait a few seconds

❌ Plug doesn't turn on/off

Check:

  1. Status in Home Assistant:

    • Откройте HA → Settings → Devices & Services
    • Найдите розетку
    • Статус должен быть "on" или "off" (не "unavailable")
  2. 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
  3. 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:

  1. Add Integration → "Generic Camera" (or specific brand)
  2. Specify camera stream URL
  3. Create dashboard with cameras and plugs

Energy monitoring

If plugs support energy measurement:

  1. Additional sensors will appear in HA:
    • sensor.printer_1_power - current power (W)
    • sensor.printer_1_energy - consumption (kWh)
  2. Can create consumption charts
  3. 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:

Community:

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! 🏠

💬 Задайте вопрос

Привет! Я AI-помощник. Чем могу помочь?