Skip to content

Bugfixes, code cleanup and more#39

Open
carlosmaug wants to merge 25 commits into
dracoventions:masterfrom
carlosmaug:master
Open

Bugfixes, code cleanup and more#39
carlosmaug wants to merge 25 commits into
dracoventions:masterfrom
carlosmaug:master

Conversation

@carlosmaug
Copy link
Copy Markdown

  • Many bugfixes
  • New web
  • New integration with Tesla
  • Code cleanup

Carlos Martin Ugalde and others added 25 commits March 25, 2026 17:00
…r/log/twcmanager.log, while keeping console output as a fallback if the log file cannot be opened. Updated settings loading/saving and the example configuration accordingly.

Improved web IPC request logging by replacing the low-value raw debug output with a concise Web: client=..., command=... format, and propagated client IP metadata from the PHP web layer into the Python process.
Hardened solar telemetry handling against upstream API throttling by introducing local backoff for Solax rate-limit responses (code: 3 and code: 104) and persisting the cooldown window (greenEnergyRateLimitedUntil) across restarts so the service does not immediately re-trigger the limit after a reboot.
…cation code to php/, keeping browser-facing entry points under public/, and updating the documentation to recommend public/ as the only web document root.

Introduced versioned web configuration defaults via php/lib/config.php.example, added php/lib/load_config.php to support local or external config files, and ignored the real php/lib/config.php so deployment-specific secrets and settings stay out of git.
Expanded web security controls with authenticated sessions, idle and absolute session timeouts, a feature flag to disable tesla_callback.php, and a separate security event log for login attempts, CSRF failures, session expiry, admin actions, debug-tool usage, and Tesla helper activity.
Updated the PHP documentation with deployment guidance for Apache/nginx, IP allowlisting, rate limiting, separate admin vhosts for the Tesla helper, and secure placement of JSON config/token files outside the public document root.
      - genera automáticamente las claves Tesla partner si faltan
      - publica la clave pública en public/.well-known/appspecific/com.tesla.3p.public-key.pem
      - intenta registrar automáticamente el dominio partner en Tesla
      - muestra estado detallado de registro, última comprobación y errores claros
      - guarda TeslaApiTokens.json directamente en el servidor en lugar de ofrecer descarga
      - permite reintentar manualmente el registro del dominio
      - evita marcar el registro como completado hasta que Tesla confirme la clave pública
      - permite que la callback OAuth de Tesla entre sin quedar bloqueada por la autenticación local
      - mejora los mensajes cuando faltan extensiones PHP como curl u ocurre un fallo al crear ficheros
  - README.md
      - documenta el nuevo flujo automático del helper Tesla
      - añade requisitos de allowed_origins, publicación de .well-known, permisos y troubleshooting del registro partner
  - php/README.md
      - documenta los nuevos permisos de escritura requeridos
      - añade troubleshooting específico para partner registration y dependencias PHP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant