# EG4 Agent configuration — copy this file to ".env" and fill in your values. # # cp .env.example .env (macOS/Linux) # copy .env.example .env (Windows) # # ".env" is gitignored and NEVER committed. This file contains NO secrets — only # placeholders. Nothing here is ever written to your inverter; EG4 Agent is # strictly read-only. # ========================================================================= # EG4 cloud portal (required) — https://monitor.eg4electronics.com # ========================================================================= # The SAME email + password you use to log into the EG4 Monitor web portal/app. # These are sent only to EG4's own portal to authenticate your account. EG4_USERNAME=your@email.com EG4_PASSWORD=your-portal-password # Regional API base URL. Default is EG4 US. EU / other Luxpower users change this. EG4_BASE_URL=https://monitor.eg4electronics.com # ========================================================================= # Local dongle (optional; reserved — cloud transport is the default) # ========================================================================= # EG4_DONGLE_HOST=192.168.1.100 # EG4_DONGLE_PORT=8000 # ========================================================================= # Server / networking # ========================================================================= # Bind address. Default 127.0.0.1 = localhost only (safest). # EG4_AGENT_HOST=127.0.0.1 # Port the web UI + API listen on. # EG4_AGENT_PORT=8000 # Set to 1/true to bind 0.0.0.0 and expose EG4 Agent to your whole LAN. # Only do this on a network you trust. # EG4_AGENT_ALLOW_LAN=0 # ========================================================================= # Data / history # ========================================================================= # Where the SQLite history DB is written (defaults to ./data). # EG4_AGENT_DATA_DIR=./data # Seconds between telemetry polls. # EG4_AGENT_POLL_SECONDS=45 # How long to keep raw samples before pruning. # EG4_AGENT_RAW_RETENTION_DAYS=120 # Auth session lifetime in seconds (default 12h). # EG4_AGENT_SESSION_TTL=43200 # ========================================================================= # Manuals (optional) # ========================================================================= # Folder you drop your OWN inverter PDFs/text into (defaults to ./manuals). # Manuals are never committed — see the copyright note in the README. # EG4_AGENT_MANUALS_DIR=./manuals # ========================================================================= # LLM diagnostic advisor (optional; entirely opt-in) # ========================================================================= # The advisor only DIAGNOSES and RECOMMENDS — it can never change your inverter. # It's disabled until you provide an API key. GLM-5.2 on OpenRouter is the # default, but any OpenAI-compatible endpoint works (including a local model). # # Get an OpenRouter key at https://openrouter.ai/keys and paste it here: OPENROUTER_API_KEY= # Alternative key var if you're not using OpenRouter: # EG4_AGENT_LLM_API_KEY= # # Master on/off switch for the advisor feature. # EG4_AGENT_ADVISOR_ENABLED=1 # Provider label (informational). # EG4_AGENT_LLM_PROVIDER=openrouter # Model id. # EG4_AGENT_LLM_MODEL=z-ai/glm-5.2 # OpenAI-compatible base URL. Point at a local server (e.g. Ollama / llama.cpp) # to keep telemetry on your own machine — e.g. http://localhost:11434/v1 # EG4_AGENT_LLM_BASE_URL=https://openrouter.ai/api/v1 # Request zero-data-retention providers on OpenRouter (recommended). # EG4_AGENT_LLM_ZDR=1 # Strip serials / site names from anything sent to the LLM (recommended). # EG4_AGENT_LLM_REDACT=1