Smart Home Controller

View Dashboard View Devices

Overview

This app is a smart home automation dashboard and API system designed to run on a local server — ideally a Raspberry Pi. It allows you to control various devices in your home using web-based commands or by scanning NFC tags that trigger API requests.

How it Works

  1. Install and run the Flask app on your home server (Raspberry Pi recommended).
  2. The server exposes a web dashboard and a set of API endpoints to control smart devices like lights and Firestick TVs.
  3. You can place NFC tags around your house that are programmed to hit specific endpoints when scanned (e.g. turn off all lights, play a show, etc.).
  4. The dashboard allows you to monitor and control all configured devices in one place.

Hardware Requirements

  • Raspberry Pi (or any always-on server)
  • Smart Bulbs that work with Tuya (TinyTuya compatible)
  • Firestick TV (for Firestick integration)
  • NFC Tags (optional but powerful for automation)

Available API Endpoints

Endpoint Method Arguments Description
/devices GET Displays all configured devices in the dashboard.
/addDevice GET/POST Form and submission route for adding a new device to config.
/lampswitch/<ip> GET IP Adress {string} Toggles power on/off for a smart bulb by IP address.
/lampbright/<ip> POST IP Adress {string} Toggles brightness levels (25%, 66%, 100%) for a bulb.
/setlampbright POST IP Adress {string} , Brightness Percentage 0-100 {int} Sets brightness for a bulb to a specific percentage.
/setcolour POST IP Adress {string} , Colour in Hex #000000 {string} Changes the colour of the light using a hex code.
/lightsoff GET/POST Turns off all configured smart lights.
/next_episode GET/POST Navigates Firestick to play the next episode.
/recent_show GET/POST Plays the most recently watched show on Firestick.
/playpause GET/POST Toggles play/pause on the Firestick.
/poweroff GET/POST Powers off the Firestick device.
/formula1 GET/POST Launches the Formula 1 app on Firestick and starts playback.
/wakeup GET/POST Wakes up the Firestick and brings it to the home screen.
/moodlight GET/POST Reads the average colour from your webcam and adjusts light colour to match.

NFC Automation Ideas

  • Stick an NFC tag by your front door that turns off all lights when you leave.
  • Place a tag near your bed that dims the lights and starts your favorite show.
  • Use tags for specific moods: work mode, movie time, party lights, etc.

For more configuration or to contribute, visit the GitHub repository.