🔌 User Guide: Tuya Smart Plugs Integration
Version: 1.5.33
Date: October 11, 2025
Difficulty Level: 🟢 Easy
Setup Time: ~30 minutes
📋 Table of Contents
- What is Tuya and Why You Need It
- What You'll Need
- Step 1: Setting Up Plugs in Smart Life
- Step 2: Register on Tuya IoT Platform
- Step 3: Create Cloud Project
- Step 4: Connect API
- Step 5: Link Smart Life Account
- Step 6: Setup in 3D Printer Control Panel
- Step 7: Link Plugs to Printers
- Usage and Automation
- Troubleshooting
What is Tuya and Why You Need It
What is Tuya?
Tuya is a platform for smart devices. If you use the Smart Life or Tuya Smart app to control your smart plugs - that's Tuya.
Why Connect Plugs to Printers?
🎯 Key Benefits:
Automatic Shutdown After Printing
- Printer finished → waits 5 minutes → automatically shuts down
- Power savings (20W × 12h = 240W/day)
- Safety (no accidental power-on)
Overheat Protection
- MCU temperature > 70°C → immediate power shutdown
- Fire prevention
- Equipment protection
Remote Control
- Turn on/off from anywhere in the world
- Via computer, phone, tablet
- No need to walk to the printer
Error Automation
- Print error → automatic shutdown
- Prevent further damage
What You'll Need
Hardware
✅ Tuya-Compatible Smart Plug
Compatibility Check:
- The plug is controlled via Smart Life or Tuya Smart app
- The box says "Works with Tuya" or "Compatible with Smart Life"
Popular Models:
- Smart Life plugs (any)
- Gosund plugs
- Nous plugs
- BlitzWolf plugs
- LSC Smart Connect
- And many others
💰 Price: $7-$25 per unit
Software
✅ Smart Life App (should already be installed)
✅ 3D Printer Control Panel version 1.5.30+
✅ Browser for Tuya IoT Platform registration
Accounts
✅ Smart Life Account (should already exist)
✅ Email for Tuya IoT Platform registration
Step 1: Setting Up Plugs in Smart Life
⏱️ Time: 5 minutes per plug
🎯 Goal: Add all plugs to Smart Life app
1.1. Open Smart Life App
📱 Launch Smart Life app on your phone
1.2. Add Plugs
- Click "+" button (Add Device)
- Select "Socket" or "Electrical Outlet"
- Plug the socket into power
- Hold the button on the socket for 5 seconds (indicator should blink)
- Follow app instructions:
- Connect to plug's Wi-Fi
- Enter your Wi-Fi password
- Wait for setup to complete
- Give the plug a clear name, for example:
- "Printer Ender 3"
- "Printer Prusa"
- "Printer 1", "Printer 2", etc.
1.3. Test Operation
- In Smart Life app tap the plug
- Try turning it on/off
- The plug should respond (you'll hear relay click)
✅ Repeat for all plugs
Step 2: Register on Tuya IoT Platform
⏱️ Time: 5-10 minutes
🎯 Goal: Create developer account
2.1. Open Website
🌐 Go to: https://iot.tuya.com
2.2. Registration
- Click "Sign Up" (or "Register")
- Fill out the form:
- Email: your email
- Password: create a password
- Confirm Password: repeat password
- Check "I agree to the terms"
- Click "Sign Up"
- Check your email - you'll receive confirmation letter
- Click the link in the email to activate your account
2.3. Log In
- Go back to https://iot.tuya.com
- Click "Sign In"
- Enter your email and password
- Click "Sign In"
✅ You are now logged in to Tuya IoT Platform!
Step 3: Create Cloud Project
⏱️ Time: 5 minutes
🎯 Goal: Create a project to manage devices
3.1. Create Project
- In the left panel select "Cloud" → "Development"
- Click "Create Cloud Project" button
- Fill out the form:
- Project Name:
3D Printer Control(or any other) - Description:
Control 3D printer power(optional) - Industry: Select "Smart Home"
- Development Method: Select "Smart Home"
- Data Center: Select your region:
- Europe - for Russia and Europe
- Central Europe - alternative for Europe
- Western America - for USA
- Eastern America - for Canada
- China - for China
- India - for India
- Project Name:
- Click "Create"
3.2. Save Access ID and Access Secret
⚠️ IMPORTANT! Your credentials will appear now - save them!
After creating the project you will see:
- Access ID - example:
vfdkj3kf9dkf3kd9fk3d - Access Secret - example:
kf9d3kf9d3kf9d3kf9d3kf9d3kf9d3kf
📝 Copy and save both values to:
- Notepad
- Password manager
- Or
PRIVATE_NOTES.mdfile in the project
❗ Access Secret can only be viewed once! If you lose it - you will have to create a new project.
Step 4: Connect API
⏱️ Time: 2 minutes
🎯 Goal: Activate required APIs
4.1. Open API Tab
- In the project go to "API" or "API Products" tab
- Or in the left menu: "Service API" → "API Products"
4.2. Connect Smart Home API
- Find "Smart Home PaaS" (or "Smart Home Scene Linkage")
- Click "Free Trial" or "Subscribe"
- Confirm subscription
- Status should change to "Subscribed" ✅
4.3. Check Additional APIs (Optional)
It is also recommended to connect:
- "Authorization" - for authorization
- "Device Control" - for device control
- "Device Status" - for getting status
Usually they connect automatically along with Smart Home PaaS.
Step 5: Link Smart Life Account
⏱️ Time: 2 minutes
🎯 Goal: Link your devices to the project
5.1. Open Devices Section
- In the left menu select "Cloud" → "Link Devices"
- Or "Devices" → "Link Tuya App Account"
5.2. Link Account
- Click "Add App Account"
- Select app: "Smart Life"
- Enter Smart Life credentials:
- Username: your email or phone (from Smart Life)
- Password: Smart Life password
- Country Code: select your country (e.g., +1 for USA)
- Click "OK" or "Link"
5.3. Check Devices
- Go to "All Devices" or "Devices" tab
- You should see all your plugs from Smart Life
- Check that status is "Online" ✅
❗ If devices did not appear:
- Wait 1-2 minutes and refresh the page
- Check that plugs are online in Smart Life
- Try unlinking and relinking the account
Step 6: Setup in 3D Printer Control Panel
⏱️ Time: 3 minutes
🎯 Goal: Connect app to Tuya Cloud API
6.1. Open Settings
- Launch 3D Printer Control Panel
- In the top menu click 🔌 Plugs button
- Settings modal window will open
6.2. Select Tuya Cloud API
- In the window you will see two cards
- Click on ☁️ Tuya Cloud API card
- Tuya settings section will open
6.3. Enter Data
Region:
- Select your Data Center region from Tuya IoT Platform
- Usually Europe for Russia and Europe
- Must match what you selected when creating the project
Access ID:
- Copy from Tuya IoT Platform
- Paste into the field
- Example:
vfdkj3kf9dkf3kd9fk3d
Access Secret:
- Copy from Tuya IoT Platform
- Paste into the field
- Example:
kf9d3kf9d3kf9d3kf9d3kf9d3kf9d3kf
6.4. Test Connection
- Click 🔍 Test Connection button
- Wait 2-3 seconds
- Message should appear: "✅ Connection established!"
❌ If error:
- Check Access ID and Secret are correct
- Ensure the correct region is selected
- Check that APIs are connected in Tuya IoT Platform
- Check internet connection
6.5. Save Settings
- Click 💾 Save button
- Should appear: "✅ Settings saved!"
- Window will automatically close in 2 seconds
✅ Tuya Cloud API configured! Credentials are saved encrypted.
Step 7: Link Plugs to Printers
⏱️ Time: 3 minutes per printer
🎯 Goal: Link each plug to specific printer
7.1. Open Printer Settings
- Find the desired printer card
- Click ✏️ Edit button
- Edit modal window will open
7.2. Scroll to "Smart Plug" Section
- Scroll down the window
- Find 🔌 Smart Plug (Tuya) section
- You will see "Connection Type" field
7.3. Select Tuya Cloud API
- In "Connection Type" field select Tuya Cloud API
- Additional fields will appear:
- Tuya device selection
- List refresh button 🔄
7.4. Load Plug List
- Click 🔄 button next to device selection field
- Wait 1-2 seconds
- All your plugs from Smart Life will appear in the dropdown
❌ If list is empty:
- Click 🔄 again
- Check that plugs are online in Smart Life
- Check that Smart Life account is linked in Tuya IoT Platform
- Close and reopen settings
7.5. Select Plug
- In the dropdown list select the desired plug
- For example: "Ender 3 Printer (Smart Socket)"
- After selection ⚙️ Automation section will appear
7.6. Configure Automation
4 checkboxes will appear:
✅ Auto-shutdown After Print Completion
- What it does: Automatically turns off power after printing
- Recommended: ✅ Enable
- Delay: Default 5 minutes (can be changed 0-60 minutes)
💡 How it works:
Print completed → Wait 5 minutes → Power off
Why delay is needed:
- Printer has time to cool down
- Fans continue to operate
- Safe shutdown
✅ Auto-shutdown On Print Error
- What it does: Immediately turns off power on error
- Recommended: ✅ Enable
💡 How it works:
Print error → Immediately power off
Why:
- Prevents further damage
- Safety
✅ Auto-shutdown On Overheat (MCU > 70°C)
- What it does: Emergency shutdown at critical temperature
- Recommended: ✅ MUST enable!
💡 How it works:
MCU temperature > 70°C → IMMEDIATELY power off → Send critical notification
Why:
- 🔥 Fire prevention
- Electronics protection
- Safety
7.7. Save Settings
- Click "Save" button at the bottom of window
- Settings will be saved
- Window will close
- Printer will update in the list
✅ "⚡ POWER" button will appear on printer card!
Usage and Automation
Manual Control
Turning Printer On/Off
- Find printer card
- Click ⚡ POWER button
- Plug will toggle (ON ↔ OFF)
- Button will change color:
- 🟢 Green = Power On
- 🔴 Red = Power Off
💡 Status updates automatically every 30 seconds (polling interval)
Automatic Operation
Scenario 1: Print Completion
🖨️ Printing "benchy.gcode"
├─ Progress: 0% → 50% → 100%
├─ Status changed: Printing → Complete
└─ App starts timer (5 minutes)
└─ After 5 minutes → Plug turns off
└─ Notification: "🔌 Printer power off"
Power savings:
- Printer in standby mode: ~20W
- 12 hours × 20W = 240W = ~$0.02/day
- Per month: ~$0.60
- Per year: ~$7.30
Scenario 2: Print Error
🖨️ Printing normally
├─ Error occurred (filament ran out, extruder jammed, etc.)
├─ Status changed: Printing → Error
└─ App immediately turns off plug
└─ Notification: "⚠️ Power off due to print error"
Why:
- Prevents further damage
- Extruder won't heat unnecessarily
- Safety
Scenario 3: Overheat (CRITICAL!)
🖨️ Printer operating
├─ MCU temperature monitoring
├─ Temperature: 65°C → 68°C → 72°C ⚠️
├─ Critical threshold exceeded (> 70°C)
└─ App IMMEDIATELY turns off plug
└─ Critical notification: "🔥 EMERGENCY SHUTDOWN!"
Why:
- 🔥 Fire prevention
- Expensive equipment protection
- Your and your home's safety
Additional Features
Changing Automation Settings
- Open printer edit (✏️)
- Scroll to "Smart Plug" section
- Change settings:
- Enable/disable automation
- Change shutdown delay
- Click "Save"
Unlinking Plug from Printer
- Open printer edit (✏️)
- Scroll to "Smart Plug" section
- In "Connection Type" field select "Not configured"
- Click "Save"
- Power button will disappear from the card
Switching to Another Plug
- Open printer edit (✏️)
- In device selection field select another plug
- Click "Save"
Troubleshooting
❌ "Tuya not configured"
Problem: Tuya Cloud API not configured
Solution:
- Click 🔌 Plugs button in header
- Select Tuya Cloud API
- Enter Access ID and Secret
- Click "Save"
❌ "Connection test failed"
Problem: Failed to connect to Tuya Cloud API
Possible causes:
- Incorrect Access ID or Secret
- Check data correctness
- Try copying again
- Incorrect region
- Check region in Tuya IoT Platform (Project Settings)
- Change region in the app
- APIs not connected
- Open Tuya IoT Platform → API Products
- Check that Smart Home PaaS is subscribed
- No internet
- Check internet connection
❌ "No plugs found"
Problem: Device list is empty
Possible causes:
- Smart Life account not linked
- Open Tuya IoT Platform → Devices → Link Devices
- Check that account is linked
- Plugs not added to Smart Life
- Open Smart Life app
- Check that plugs are present and online
- Cache not updated
- Click 🔄 button in printer edit window
- Wait 2-3 seconds
❌ "Device not linked"
Problem: Plug not linked to printer
Solution:
- Open printer edit (✏️)
- Select Tuya Cloud API in connection type
- Select plug from the list
- Click "Save"
❌ Plug not responding
Problem: Button click not working
Possible causes:
- Plug is offline
- Check in Smart Life app
- Check plug's Wi-Fi connection
- Incorrect Device ID
- Unlink and relink the plug
- API limitations
- Check limits in Tuya IoT Platform
- Free plan: 1 million requests/month
❌ Automation not working
Problem: Plug does not turn off automatically
Check:
- Automation is enabled in settings
- Open printer edit
- Check automation checkboxes
- Plug is linked to printer
- There should be "⚡ POWER" button
- Printer status is updating
- Check that printer goes to "Complete" status
- Check logs
- Console should have
[SmartPlug]messages
- Console should have
💡 Tips and Recommendations
Safety
⚠️ Default settings are safe!
Recommended to keep enabled:
- ✅ Auto-shutdown on overheat (> 70°C) - MUST!
- ✅ Auto-shutdown on error - recommended
- ✅ Auto-shutdown after print - power saving
Shutdown Delay
Recommended values:
- 0-2 minutes: If need to turn off immediately
- 5 minutes: Optimal (default)
- 10-15 minutes: If printer takes long to cool down
- 30+ minutes: Rarely needed
💡 Golden rule: 5 minutes works for 90% of cases
Plug Naming
Give plugs clear names in Smart Life:
- ✅ "Ender 3 Printer"
- ✅ "Printer 1"
- ❌ "Socket_01" (unclear)
- ❌ "Plug" (not informative)
Plug Placement
🔌 Important:
- Connect plug close to router (good Wi-Fi signal)
- Don't overload one plug (max 16A usually)
- Don't use extension cords (direct wall connection)
🎯 Frequently Asked Questions (FAQ)
Q: Does it work without internet?
A: No, Tuya Cloud API requires an internet connection.
If you need offline operation — use:
- Home Assistant (local control)
- Or Tuya Local API (harder to set up)
Q: How many plugs can be connected?
A: Unlimited!
Only API request limits apply:
- Free plan: 1M requests/month
- For a 10-printer farm: ~50,000 requests/month
- More than enough!
Q: Is it safe to store Access Secret in the app?
A: Yes!
- Access Secret is encrypted before saving
- Uses
encryption.jsmodule - Stored locally on your computer
- Not shared with anyone except Tuya API
Q: Can one plug be used for multiple printers?
A: No, one plug = one printer.
If printers are powered through one plug (e.g., a power strip):
- Create a separate "virtual" printer in the app
- Link the plug to it
- Control power for a group of printers
Q: What if Access Secret is lost?
A: Create a new project:
- Open Tuya IoT Platform
- Create a new Cloud Project
- Get new Access ID and Secret
- Update settings in the app
Q: Does it work with other plug brands?
A: Yes, if they are Tuya-based:
- Check: plug works via Smart Life
- If it works → compatible!
For other brands use Home Assistant.
Q: How much does Tuya Cloud API cost?
A: Free!
- Up to 1M API requests per month — free
- Enough even for a large farm (50+ printers)
Q: Can I control plugs remotely?
A: Yes!
- From anywhere in the world (with internet)
- Via 3D Printer Control Panel
- Via Smart Life app
- Via Web server (if configured)
📊 Usage Examples
Example 1: Home Printer
Configuration:
- 1 Ender 3 printer
- 1 Tuya smart plug
- Auto-shutdown: 5 minutes
- Overheat protection: enabled
Typical day:
08:00 - Turn on the printer with ⚡ button
08:05 - Start model printing
14:30 - Print completed (status: Complete)
14:35 - Automatically powered off (after 5 minutes)
20:00 - Turn on for the next print
Savings: ~240W/day = ~$0.02/day = ~$7.30/year
Example 2: 5-Printer Farm
Configuration:
- 5 printers
- 5 Tuya plugs
- Auto-shutdown: 10 minutes (more cooldown time)
- Overheat protection: enabled on all
Typical operation:
Monday:
├─ Printer 1: 8h print → Complete → Powered off
├─ Printer 2: 12h print → Complete → Powered off
├─ Printer 3: Error on 3rd hour → Powered off
├─ Printer 4: 6h print → Complete → Powered off
└─ Printer 5: Printing continues
Savings: ~1200W/day = ~$0.10/day = ~$36.50/year
Example 3: Critical Situation
Scenario: MCU Overheat
🖨️ Printing on a hot day
├─ Ambient temperature: 35°C
├─ MCU temperature rises: 55°C → 60°C → 65°C → 72°C ⚠️
├─ Critical threshold exceeded!
└─ App:
├─ Immediately powers off the plug
├─ Shows notification: "🔥 EMERGENCY SHUTDOWN!"
└─ Logs the event
Result:
- ✅ Fire prevented
- ✅ Electronics protected
- ✅ Safety ensured
📖 Additional Resources
Official Documentation:
- Tuya IoT Platform: https://iot.tuya.com
- Tuya Developer Docs: https://developer.tuya.com/en/docs/iot
- Smart Life Support: https://www.tuya.com/support
Community:
- Tuya Developer Forum: https://www.tuyaos.com/
- 3D Printing Reddit: https://reddit.com/r/3Dprinting
Video Tutorials:
- Tuya IoT Platform Setup: (YouTube поиск: "Tuya IoT Platform tutorial")
- Smart Life Setup: (YouTube поиск: "Smart Life setup")
✅ Final Checklist
Setup is complete if:
- Plugs are added in Smart Life ✅
- Tuya IoT Platform account is registered ✅
- Cloud Project is created ✅
- Access ID and Secret are obtained ✅
- APIs are subscribed ✅
- Smart Life account is linked ✅
- Tuya is configured in the app ✅
- Plugs are linked to printers ✅
- Automation is configured ✅
- Power on/off tested ✅
- Ready to use ✅
- Ready to deploy ✅
- Checked in both languages ✅
- Ready for final publishing ✅
- Documentation is complete, without omissions ✅
- Styles and layout preserved ✅
- Links and anchors work ✅
- Language switcher works ✅
- Section navigation is correct ✅
- Ready for client review ✅
🎉 Congratulations!
Tuya Cloud API integration is complete!
Now your 3D printers:
- ✅ Automatically power off after printing
- ✅ Protected from overheating
- ✅ Controlled remotely
- ✅ Save electricity
Print with comfort and safety! 🚀