All The Silly Home Releases

05.08.2022 The Silly Home Release

Welcome Folks to The Silly Home’s first weekly release - Model Mania

The Silly Home tries to bring true automation to your smart homes via ML. This means no more rules!

Through these regular releases, we hope to make The Silly Home a better application and allows us to broadcast insider knowledge on the developments!

Our roadmap :: container repo :: addon-repo :: docker images

Don’t feel shy to post any comments, criticism and ideas below. I want the feedback and ideas to make this amazing. We also have a discord chat if anyone needs help setting up or just wants a chat.

Enhancements

  1. Human-in-the-loop
  2. Best model selector

Human-in-the-loop

A huge pain-point of The Silly Home (at least for me) is that the model can trigger incorrect actions that I cannot rectify. My inability to ‘fix it’ is because any new state will re-trigger the models will generally predict the same incorrect action, which is very annoying.

Our solution is to have a small database (sqlite3) that stores all sensor states when an action that reverses a recent (within 5 secs) event occurs. These rules are then checked against before executing any actions.

Future:

  • There is thought to feed this information back into the training set.
  • This implementation falters if the AI predicted actions also are within 5 secs. A more comprehensive implementation is to differentiate which actuators events are created by The Silly Home vs Manual. It does not seem easy to do this within AppDaemon.

Best model selector

Right now, only DecisionTreeClassifier is used to train our models. Not much thought other than the fact that its easy to explain. To improve accuracy and more importantly precision, this feature checks the 4 models and returns the best one based on a metric skewed towards precision.

  • Decision Tree
  • Logistic Regression
  • Random Forest
  • SVM

This is a cheap way to gain performance.

Future:

  • All hyper params are defaulted. There needs to be some intuition/testing on the possible Hyperparams for each model.
  • Some Data scientists may comment that this approach will lead to overfitting. I agree and its something to investigate but at the moment, having it overfitted with high precision and low recall will help cover the top 70% cases for automations rules.

Bug fixes:

  1. Date Feature missed

Date Feature missed

The date features was previously not accounted for in the model execution step. This has now been added.

Next week - Sharing is Caring

Our next focus will be to implement a Shared database for all our states data. I know many Data scientist (including myself) would love to have a larger dataset to see if there techniques we can apply to generalize the model (i.e. people switch off all the lights when no one is in the house). This global base model can then work in ensemble with the personal data model.

This will be an opt-out feature and the data will be stored on AWS (the exact service is up in the air as I’m speaking with AWS on Monday to check the best approach to do this).

4 Likes

12.08.2022 The Silly Home Release - Sharing is Caring

Welcome Folks to The Silly Home’s Second weekly release - Sharing is Caring

The Silly Home tries to bring true automation to your smart homes via ML. This means no more rules!

Through these regular releases, we hope to make The Silly Home a better application and allows us to broadcast insider knowledge on the developments!

Our roadmap :: container repo :: addon-repo :: docker images

Don’t feel shy to post any comments, criticism and ideas below. I want the feedback and ideas to make this amazing. We also have a discord chat if anyone needs help setting up or just wants a chat.

Enhancements

  1. Shared Database
  2. Enable/Disable Actuators UI
  3. Autotrain

Shared Database

I envision one of the big improvements to the models and our strategy is for us to leverage more peoples data.

My vision is to build a ensemble model using a generic Deep Learning model trained on all users data, then a refined model based on only the specific users data. With this approach, it should make the predictions more accurate and also more helpful (in the sense that it suggests useful actions even if you haven’t performed these before). One of the key things to do now is to gather enough data which is where the Shared Database comes in.

Right now, the feature essentially replicates your states data from your Home Assistant database and stores it in an AWS Aurora V2 serverless DB (which only I have view access to). The data is anonymous and you can opt-out if you do not want to share your data in the config.

This is definitely a long term goal but this is an important step to start building towards it.

Enable/Disable Actuators UI

A useful enhancement to the dashboards UI which gives you flexibility to enable or disable actuators on the fly.

Autotrain

For more regular usage, I thought adding a cron job to auto retrain the models won’t hurt. It is on by default but you can adjust it using the config params - autotrain: [’true’,’false’] and autotrain_cadence: [””]

Bug fixes:

No bug fixes this week!

Next week - Performance Retro

There are a 2 things I want to improve so that the user experience is better. One major thing I noticed is that the data parsing step is exceptionally slow when running on a Raspberry Pi. Also an improvement to the configuration module is long overdue! I also want to investigate minute by minute snapshots of states using AppDaemon instead of just taking what Home Assistant stores.

That’s all folks! Hope everyone has a great weekend :slight_smile: