Bugfixes, code cleanup and more#39
Open
carlosmaug wants to merge 25 commits into
Open
Conversation
carlosmaug
commented
Apr 4, 2026
- Many bugfixes
- New web
- New integration with Tesla
- Code cleanup
…fy TWCManager config comments
…arge-now controls
…arge-now controls
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.