v0.2.0 - Manual full-charge override with phone control PWA
Deployed and merged via PR #2:
- Manual full-charge override switchable from a phone:
control_server.py+override_state.py, sharingoverride_state.jsonwith the charging script. Toggling it makestesla_solar_charger.pyignore solar surplus and charge at full power, waking the vehicle if needed. - PWA support: manifest, service worker, and icons so the control page can be added to the home screen and launched standalone.
- Fixed a bug found right after deploying: while override was on, the charger script re-forced
MAX_AMPSevery cycle even after the driver manually lowered the charge current via the Tesla app. NowMAX_AMPSis only applied when starting/resuming charging. - Reworked the control page: safe-area insets (no more text under the iPhone Dynamic Island/notch or Android cutouts), larger text matching iOS/Android body-text guidelines, a status/button split (status always states the current fact, the button always states the resulting action), WAI-ARIA roles/live-region/aria-pressed, and a centered layout (was left-shifted).
- Added Tailscale:
tailscale serveHTTPS-exposes the control server within the tailnet (Funnel intentionally not enabled), since Android requires a secure context for full PWA install. - Added
show_control_url.shto print the tokenized control URL and a terminal QR code.
PR #2でマージ・本番反映:
- スマホから切替えられるマニュアル・オーバーライド(フル充電モード):
control_server.py+override_state.pyがoverride_state.jsonを充電スクリプトと共有。ONにするとtesla_solar_charger.pyが太陽光の余剰計算を無視してフル充電(必要なら車両を起動)する。 - PWA対応:マニフェスト・Service Worker・アイコンを追加し、操作画面をホーム画面に追加してアプリのように起動できるようにした。
- デプロイ直後に見つけたバグを修正:オーバーライドON中、毎サイクル
MAX_AMPSを強制再設定していたため、Teslaアプリで手動で電流を下げても元に戻ってしまっていた。充電開始・再開時のみMAX_AMPSを適用するように修正。 - 操作画面を改善:セーフエリア対応(iPhoneのDynamic Island/ノッチ、Androidのカットアウトに重ならない)、iOS/Android基準のフォントサイズ拡大、状態とボタンの役割分離(状態は常に事実、ボタンは常に結果のアクション)、WAI-ARIA対応、中央揃え(以前は左にずれていた)。
- Tailscaleを導入:
tailscale serveでtailnet内のみHTTPS公開(Funnelは意図的に不採用)。AndroidでPWAを正式インストールするにはHTTPSが必要なための対応。 show_control_url.shを追加し、トークン付きURLと端末上のQRコードを表示できるようにした。