A simple web interface to control your Tapo smart bulbs through the Tapo REST API.
- Node.js (v14 or higher)
- npm (comes with Node.js)
- Access to the Tapo REST API server
- Clone this repository or download the files
- Navigate to the project directory:
cd HomeWeb - Install dependencies:
npm install
-
Copy the example environment file:
cp .env.example .env
-
Edit the
.envfile with your configuration:API_URL=http://localhost:8000 # URL of your Tapo REST API server API_PASSWORD=potatoes # Password for the API
-
Start the server:
npm start
-
Access the web interface: Open your browser and navigate to
http://localhost:3000
- Control multiple Tapo bulbs from a single interface
- Turn bulbs on/off with simple button clicks
- Visual feedback for successful operations
- Error handling and status messages
- Automatic session management with the API
- The web interface will display controls for each bulb configured in your Tapo REST API
- Click the "Turn On" button to turn a bulb on
- Click the "Turn Off" button to turn a bulb off
- Status messages will appear briefly to confirm the action
If you encounter issues:
- Check that the Tapo REST API server is running
- Verify your API URL and password in the
.envfile - Check the console for any error messages
- Ensure your bulbs are properly configured in the Tapo REST API
- The application stores the API session token in memory
- The password is only used during initial login
- All communication with the API is done through your server
To modify the application:
- The main server logic is in
server.js - The web interface is in
public/index.html - Styles are included in the HTML file
- JavaScript for the interface is in the HTML file
This project is open source and available under the MIT License.