Repository navigation
Improvements for the Hubble AI stack
UPDATE V42.0.2
With this update I am rolling out the announced improvements for the Hubble AI stack, along with the new shadow detection logic and several fixes in training, model activation, and central database access. EAI now writes completely through SFML into the SOT.
Fuel my late-night ideas with a coffee? I'd really appreciate it — keep this project running!
Hubble AI Stack
The full lifecycle of an AI model – training, candidate creation, shadow comparison, evaluation, and activation – now works together reliably. A valid first model can now be activated even when no existing comparison model is present. Old or incomplete candidates no longer permanently block newer, better models. The queue continues in a controlled manner, and stuck candidate states are resolved automatically.
A new model still does not replace the active model without proper checks. The protection mechanisms of the promotion gate have been adjusted but remain fully intact. Confirmed model drift can now automatically trigger an accelerated model response and prioritized training.
Training data, feature schema, hyperparameters, seed, and other settings are clearly linked via fingerprints and configuration hashes. The temporal separation of training and evaluation data has been improved so that future data no longer unintentionally enters the evaluation. On errors, the best training epoch is reliably restored. Model artifacts and their origin are fully and traceably managed in the central database – this makes debugging and further development easier. Faulty model states are now clearly logged instead of remaining unnoticed on “pending”.
EOD and AI Training
The EOD reliably processes the new AI steps even after a restart or a new data set. If neither the training data set nor the training configuration has changed, training is deliberately skipped. This skip counts as a successfully completed EOD step. A short EOD is therefore not automatically an error – what matters is whether training was necessary and which decision is documented in the log. Errors in model evaluation no longer cause the entire model path to remain permanently blocked.
New Shadow Detection
The calculation of shading for panel groups has been corrected. Deviations between panel groups are now calculated relative to the comparison group. This was an important change instead of outputting an overall shading value as in the past. Impossible values of several hundred percent can no longer be stored as a shadow share – this bug became apparent during the rebuild.
Existing local W/m² sensors are given priority in the cause assessment. When sensors are missing, an algorithm is used that is less accurate than a real measurement and requires a longer data basis. Global radiation and weather information now serve only as a fallback when no suitable local measurement data is available for a panel group.
Database and Compatibility
The central SFML database is now compatible with the aiosqlite version used in current Home Assistant releases as well as with newer versions. Database operations continue to run safely on the worker thread and do not block the Home Assistant event loop. Errors during cleanup of a database operation no longer hide the original error message. Restarts and newly initialized databases are handled more robustly. Several errors were fixed that could cause AI, shadow, or domain operations to abort before the actual read or write.
Important
No databases need to be deleted manually and no tables need to be edited for this update. Manually deleting individual files can separate related runtime, learning, and candidate states from each other and should therefore not be used as a reset.
With V42.0.2, additional models are not simply trained. The update stabilizes the entire chain from measurement data through training to the controlled activation of a demonstrably suitable model.