A real-time dashboard that displays sensor data from your Home Assistant instance, focusing on temperature, humidity, and air quality metrics. The dashboard updates automatically through WebSocket connections and provides an easy-to-read interface for monitoring your home environment.
![Screenshot](public/Screenshot-2024-12-09-1-34-26 PM.png)
- Real-time sensor data updates via WebSocket connection
- Automatic data fetching every 15 minutes (configurable)
- Clean, responsive dashboard interface
- Color-coded tiles for quick status identification
- Support for temperature, humidity, and air quality sensors
- Configurable sensor filtering and display options
- Docker support for easy deployment
Before you begin, ensure you have one of the following setups:
- Docker
- Docker Compose
- A running Home Assistant instance
- A Home Assistant Long-Lived Access Token
- Node.js (version 14 or higher)
- npm (usually comes with Node.js)
- A running Home Assistant instance
- A Home Assistant Long-Lived Access Token
- In your Home Assistant interface, click on your user profile (bottom left)
- Scroll to the bottom and click "Create Token"
- Give your token a name (e.g., "Sensor Dashboard")
- Copy the token immediately - you won't be able to see it again
-
Clone this repository:
git clone https://github.com/drkpxl/HomeAssistantFirehose cd ha-sensor-dashboard
-
Set up your environment:
cp sample.env .env
-
Edit
.env
with your specific configuration -
Start the application using Docker Compose:
docker compose up -d
The dashboard will be available at http://localhost:3015
-
Clone this repository:
git clone https://github.com/drkpxl/HomeAssistantFirehose cd ha-sensor-dashboard
-
Install dependencies:
npm install
-
Set up your environment:
cp sample.env .env
-
Edit
.env
with your specific configuration -
Start the server:
npm start
The .env
file contains several configurable options:
PORT
: The port your dashboard will run on (default: 3015)HOST
: Your Home Assistant host addressAPI_PORT
: Home Assistant API port (default: 8123)UPDATE_INTERVAL
: How often to fetch new data (default: */15 * * * *)
EXCLUDED_TEMPERATURE_KEYWORDS
: Comma-separated list of keywords to exclude from temperature sensorsEXCLUDED_TEMPERATURE_ENTITIES
: Specific entity IDs to excludeTEMPERATURE_IDENTIFIERS
: Keywords to identify temperature sensorsHUMIDITY_IDENTIFIERS
: Keywords to identify humidity sensorsAIR_QUALITY_IDENTIFIERS
: Keywords to identify air quality sensors
- Displays all temperature sensors not excluded by your configuration
- Shows warning colors for temperatures below 30°C
- Updates in real-time
- Shows all humidity sensors
- Warning colors for humidity above 40%
- Real-time updates
- Displays AQI, VOC, and indoor air quality sensors
- Warning colors for:
- AQI above 60
- Indoor air quality below 60
- Real-time updates
Edit views/index.ejs
to change the dashboard layout and structure.
Modify public/styles.css
to change colors, sizes, and other visual elements. The dashboard uses CSS variables for easy theming:
:root {
--bg-color: #F5E6D3; /* Background color */
--primary-color: #2A9D8F; /* Main accent color */
--text-color: #264653; /* Primary text color */
/* ... other variables ... */
}
-
Docker-related Issues
- Ensure Docker and Docker Compose are properly installed
- Check container logs:
docker compose logs app
- Verify port 3015 is not in use by another application
- Make sure your .env file is properly configured
-
Cannot connect to Home Assistant
- Verify your Home Assistant URL and port
- Check if your token is valid
- Ensure Home Assistant is accessible from your network
-
Missing sensors
- Check your entity IDs in Home Assistant
- Verify your sensor identification keywords in
.env
- Look for typos in excluded entities
-
WebSocket connection issues
- Check your browser console for errors
- Verify your network connection
- Restart the container or Node.js server
If you encounter issues:
- Check the container logs or server console for error messages
- Look at your browser's developer tools console
- Review your
.env
configuration - Create an issue in the GitHub repository with:
- Your error messages
- Your configuration (remove sensitive data)
- Steps to reproduce the issue
- Docker logs if applicable
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Never commit your
.env
file - Keep your Home Assistant token secret
- Regularly update your dependencies
- Run
npm audit
periodically to check for vulnerabilities - Keep your Docker images updated