Pretty website for a WeatherFlow Tempest using InfluxDB via UDP Broadcasts
Files
README.md

LCAR.earth Weather Dashboard #

Live weather station dashboard for WeatherFlow Tempest data.

Quick Start (Docker) #

  1. Configure environment:
cp .env.example .env

Edit .env with your InfluxDB credentials:

INFLUX_HOST=your_influxdb_host
INFLUX_PORT=8086
INFLUX_DATABASE=homeassistant
INFLUX_USERNAME=your_username
INFLUX_PASSWORD=your_password
  1. Build and run:
docker-compose up -d
  1. Access at http://localhost:3000

To view logs:

docker-compose logs -f

To stop:

docker-compose down

Manual Setup (Non-Docker) #

  1. Install dependencies:
npm install
  1. Configure InfluxDB connection:
cp .env.example .env

Edit .env with your InfluxDB credentials.

  1. Run the server:
npm start

Development mode with auto-reload:

npm run dev

Production Deployment #

Docker with Nginx #

Add Nginx service to docker-compose.yml (see commented section), then:

docker-compose up -d

Set up SSL with certbot on host machine, volumes are already mapped.

With Nginx #

  1. Install PM2 to keep the app running:
npm install -g pm2
pm2 start server.js --name weather
pm2 save
pm2 startup
  1. Configure Nginx as reverse proxy (/etc/nginx/sites-available/lcar.earth):
server {
    listen 80;
    server_name lcar.earth www.lcar.earth;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}
  1. Enable the site:
sudo ln -s /etc/nginx/sites-available/lcar.earth /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
  1. Set up SSL with Let's Encrypt:
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d lcar.earth -d www.lcar.earth

Systemd Service (alternative to PM2) #

Create /etc/systemd/system/weather-dashboard.service:

[Unit]
Description=LCAR.earth Weather Dashboard
After=network.target

[Service]
Type=simple
User=your_user
WorkingDirectory=/home/dx/code/weather
Environment=NODE_ENV=production
ExecStart=/usr/bin/node server.js
Restart=always

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl enable weather-dashboard
sudo systemctl start weather-dashboard

Data Requirements #

The application expects InfluxDB measurements with entity_id matching /tempest/:

  • temperature
  • humidity
  • pressure
  • wind_speed
  • wind_direction
  • precipitation
  • uv_index
  • solar_radiation

If your Home Assistant entities use different names, update the queries in server.js.