# Dashboard & Logger This project logs data from AC Infinity controllers (via the Cloud API) and visualizes it on a local web dashboard. ## Features - **Data Logging**: Polls AC Infinity API every 60 seconds (Temperature, Humidity, VPD, Fan Speed, Light Level). - **Dashboard**: Local web interface offering historical charts (Day, Week, Month). - **Device Types**: Automatically detects Fans and Lights. ## Installation 1. Navigate to the project directory: ```bash cd /home/seb/src/actest ``` 2. Install dependencies: ```bash npm install ``` 3. Ensure `.env` exists with your AC Infinity credentials: ``` AC_EMAIL=your_email AC_PASSWORD=your_password ``` ## Usage **Start the Application (Recommended):** Use PM2 to run the server in the background: ```bash pm2 start server.js -n acdash ``` **Manual Start:** ```bash node server.js ``` ## Access - **Dashboard URL**: `http://127.0.0.1:3905` - **Nginx Proxy**: If configured (see `nginx_integration.md`), access via `https://your-domain.com/ac/` ## Files - `server.js`: Combined application (Web Server + Data Daemon). - `ac_data.db`: SQLite database storing all sensor readings. - `public/`: Frontend assets (HTML, JS, CSS).