A native macOS application for controlling your Tuya smart home devices. Built with Electron for Intel Mac compatibility.
- Device Control: Control all your Tuya-compatible smart home devices from your Mac
- Native macOS Experience: Built with macOS design principles and native menus
- Real-time Updates: Monitor and control devices in real-time
- Secure Storage: Encrypted storage for API credentials using electron-store
- Multi-region Support: Connect to Tuya cloud servers in different regions
- Intel Mac Optimized: Specifically built and optimized for Intel-based Macs
- macOS 10.13 or later
- Intel Mac (x64 architecture)
- Node.js 16 or later
- npm or yarn package manager
- Tuya Developer Account (for API credentials)
git clone https://github.com/sumitduster-iMac/Smart-Life.git
cd Smart-Lifenpm install- Go to Tuya IoT Platform
- Create a new project or use an existing one
- Get your API Key (Access ID) and API Secret from the project overview
- Note your data center region (US, EU, CN, or IN)
For detailed instructions, visit: https://developer.tuya.com/en/docs/iot/download?id=Kbd668dicz9r6
Development mode:
npm start- Click the βοΈ Settings button in the app
- Enter your Tuya API Key and API Secret
- Select your API endpoint region
- Click Save Settings
Build DMG installer:
npm run build:dmgBuild ZIP archive:
npm run buildThe built applications will be in the dist folder.
Smart Life-{version}.dmg- DMG installer for easy installationSmart Life-{version}-mac.zip- ZIP archive containing the .app bundle
npm start- Run the app in development modenpm run build- Build the app for Intel Mac (DMG + ZIP)npm run build:dmg- Build DMG installer onlynpm run pack- Package the app without creating installersnpm run dist- Full distribution build
The app supports various Tuya device types including:
- π‘ Smart Lights
- π Smart Plugs/Switches
- π‘οΈ Thermostats
- π· Security Cameras
- π Smart Locks
- π‘ Sensors
- π Fans
- United States:
https://openapi.tuyaus.com - Europe:
https://openapi.tuyaeu.com - China:
https://openapi.tuyacn.com - India:
https://openapi.tuyain.com
Smart-Life/
βββ .github/
β βββ workflows/
β β βββ build-dmg.yml # Automated DMG building
β β βββ ci.yml # Continuous integration
β βββ FUNDING.yml # Funding configuration
βββ src/
β βββ main.js # Electron main process
β βββ preload.js # Secure IPC bridge
β βββ renderer.js # Renderer process (UI logic)
β βββ index.html # Main application UI
β βββ styles.css # Application styles
βββ assets/ # Application assets (icons, images)
βββ dist/ # Built applications
βββ package.json # Project dependencies and scripts
βββ README.md # This file
This project includes automated workflows for continuous integration and deployment:
- Triggers: Push to main, tags (v*), pull requests, manual dispatch
- Actions:
- Builds application on macOS runners
- Tests with Node.js 18.x and 20.x
- Creates DMG and ZIP installers
- Uploads artifacts for download
- Automatically creates releases for version tags
- Triggers: Push to main/develop, pull requests
- Actions:
- Validates package.json
- Checks JavaScript syntax
- Verifies project structure
- Ensures all required files are present
You can download pre-built DMG files from the Actions tab or from Releases for tagged versions.
- API credentials are stored securely using electron-store with encryption
- No credentials are sent to any third-party servers except Tuya's official APIs
- All communication with Tuya APIs is done over HTTPS
- Ensure you have Node.js 16+ installed
- Delete
node_modulesand runnpm installagain - Check console for error messages
This is the most common issue for unsigned apps on macOS!
The app is not signed with an Apple Developer certificate, which causes macOS Gatekeeper to block it. This is normal and safe - the app is open source.
Quick Fix:
- Right-click the Smart Life app in Applications
- Select "Open" from the menu
- Click "Open" in the security dialog
- The app will now launch (you only need to do this once)
Alternative Fix:
# Remove quarantine attribute from the app
xattr -cr /Applications/Smart\ Life.appFor DMG mounting issues:
# Remove quarantine from downloaded DMG
xattr -d com.apple.quarantine ~/Downloads/Smart\ Life-*.dmgDetailed Instructions: See INSTALL.md for comprehensive troubleshooting steps including System Preferences methods.
- Verify your API credentials are correct
- Ensure you selected the correct API endpoint region
- Check that your devices are online in the Tuya/Smart Life mobile app
- Verify your Tuya project has the necessary API permissions
- Ensure you're running on macOS (for DMG builds)
- Check that electron-builder is installed correctly
- Try cleaning the project:
rm -rf dist node_modules && npm install - Make sure icon files exist in
assets/directory
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Electron
- Powered by Tuya IoT Platform
- Icon design inspired by smart home aesthetics
For issues and questions:
- Open an issue on GitHub
- Check Tuya Developer Forum
Note: This application requires valid Tuya API credentials to function. Make sure to register for a Tuya developer account and create a project to obtain your credentials.