1. Purpose This project provides a Float/Spa monitoring dashboard with the following features: A device monitor page that shows the current status of each float tank (time remaining, temperature, etc.). An admin panel with login protection, allowing you to: Add/Delete devices. Configure display toggles (e.g., show temperature, show auto-heat). Switch between light/dark themes. A simple API script that fetches data from a remote endpoint (ControlByWeb Cloud). 2. Main Files db_config.php Contains the database connection setup (PDO). Adjust with your own DB credentials. admin.php Handles login (demo credentials by default). Displays settings toggles (theme mode, temperature, auto-heat, etc.). Lets you add or delete devices in the database. Requires you to be logged in to access. device-monitor.php Shows a list of all devices or a single device’s status. Fetches JSON data from api.php periodically (every 30 seconds). Displays progress bars for session time remaining, plus temperature/auto-heat if enabled. api.php Retrieves device data from ControlByWeb Cloud using a device_key. Returns a JSON response with timeRemaining, temperature, autoHeat, etc. Supports a test mode (?test=1) that forces a specific device key for demo purposes. style.css Provides a modern, responsive design for both light and dark themes. Includes a sticky, blurred navbar, styled buttons, toggles, progress bars, and a blurred footer. Applies a background image (background.webp) by default. 3. How It Works Login Navigate to admin.php. Use the demo credentials (demo / demo) or your own credentials if set up. Once logged in, you can see and change settings. Add a Device In the Admin panel, input a device name (e.g., “Float Tank One”) and a device key (provided by ControlByWeb or your system). The device will appear on the Dashboard (device-monitor.php). Monitor Page Shows each device in a “card” with a progress bar for the remaining session time. If the device is idle (time remaining = 0), it says “Ready to Start.” Temperature and auto-heat are shown if enabled in admin settings (and if no session is running, if you chose to hide them during active sessions). Theme & Toggles Theme can be toggled between Light and Dark. You can show/hide temperature, auto-heat, session length, etc., in the admin panel. Changes are saved in the database and take effect immediately. Test Mode Adding ?test=1 to api.php (or device-monitor.php?test=1) uses a hard-coded “test” device key. Useful for demonstration without needing real device data. 4. Requirements A web server with PHP and cURL enabled. A MySQL (or MariaDB) database for storing devices, settings, and login data. The db_config.php file must be updated with correct DB credentials. 5. Getting Started Import the Database Create a database and run any provided SQL file to create the devices and settings tables. Configure Update db_config.php with your DB name, user, and password. Upload Files Place all .php and .css files on your server. Make sure background.webp is also uploaded in the correct directory. Access the Admin Panel Go to yourdomain.com/admin.php. Log in with the default credentials or your own. Add a Device Enter the device name and key. Return to device-monitor.php to see it in action. Enjoy your Float/Spa Monitoring Dashboard!