I’ve been working on an app which predicts the occupancy of your household using Machine Learning (sklearn) and some math. The predictions are published to MQTT, where it can be used in automations.
The main things it forecasts are:
-
The % chance someone will be home per hour
-
How long until person will leave
-
How long until person will be back
Current landing page:
For me the main use case is heating. I have underfloor heating that takes forever to heat up. On a day when nobody will be home after 08:00, there’s no point starting at 06:00 to hit temperature at 08:00 and then shutting off again.
My goal for this coming winter is to fully onboard this data into thermostat setup.
To make the predictions the app consumes ‘person’ data, fed by device tracking (like the companion app), zone information and the Proximity integration.
Since the default recorder only stores data for 10 days, and machine learning likes a lot of data, the app has its own small database to permanently store the data, or you can connect it to InfluxDB (where you might already be storing this information).
Everything runs locally within your home assistant instance, so no cloud, no subscriptions and no copy of your empty-house data waiting to get breached.
Once a week the model retrains itself from the updated data (takes about 2.5 minutes on my VM without having a NASA server) and the real time predictions are really cheap and quick.
If you are interested in this you can install it from here: https://github.com/MartvanMale/hass-occupancy
Would love to hear the use cases the community can come up with
