App for learning optimal schedule?

I've set up various schedules, for things like lighting, hot water recirculation, etc. But I'm not sure that those schedules are the most optimal. For example, I schedule hot water recirculation for around the time when I think showers are usually taken, or when dinner is usually made, but how often does water actually flow during those scheduled times? Maybe I could tighten up the schedule a bit or shift it one way or the other. This of course would be most useful for things that need scheduling to work best, e.g., I can trigger hot water recirculation with sensors, but there's still some delay before hot water dispenses, so it'd be better if water was already circulating hot when it's most likely to be used.

What would be cool is an app that (locally?) learned the best schedule for things and made dynamic recommendations on what the schedule settings should be. Anyone know of something like this that already exists?

That is certainly a good use for AI.

You could try sharing them with Alexa, and turn on Hunches. I'm sure she will come up with some totally inappropriate schedule times for you. :smiley:

What do have to input into such an app? I would assume you at least need to know when people are present in a room for lighting, and when the hot water is actually being used.

I just read about Bayesian Sensors yesterday in the HA subreddit. Maybe that is close to what you are thinking of?

https://www.reddit.com/r/homeassistant/comments/1otnl4b/bayesian_sensors_the_magic_bullet_yes/

Yup, both of those things would be an input for respective schedules. And there are sensors that provide that data already. For example, I have a Flume sensor that tells me when water flows.

If you don't have HA setup, this might be a good time to do so. I'm really tempted to try Bayesian sensors. I already have HA running on a P4 to bring in devices to Hubitat (Washer, Dryer, AC, Humidifier and some other Tuya IoT stuff) with HADB, and I have the Hubitat HACS setup in HA (though I am not using it currently).

You need to install HACS and the Hubitat HACS integration in HA to bring your Hubitat Devices into HA for Bayesian. Then you can use the HADB app to bring the Bayesian sensors you create back into Hubitat.

It is pretty simple to setup HA by downloading the image and writing it to an SD card with the Raspberry PI Imager. If you have an old Raspberry PI laying around. Still, PI3s are pretty cheap now anyway to buy one. Very handy to have, especially for appliances that have no integration available in Hubitat.

I already have HA set up and integrated into HE. Are you seeing some way for Bayesian sensors to solve this scheduling problem? I see the Bayesian sensors solving the problem of determining whether an event is actually happening, whereas I see the scheduling problem more as solving the problem of predicting when a future event will occur (and scheduling to get out ahead of it). But maybe I'm viewing it wrongly?

Great idea! Here we go ... :slight_smile:

2 Likes

I don't know, maybe I'm viewing it wrongly, I just happened over that post yesterday and it seemed similar to what you were asking about.

Seems what you need is a probability for needing hot water before it happens, so I agree, I don't think that is really what Bayesian is made for. It seems more reactionary than predictive, to tell you what is probably happening now based on observations.

Alexa hunches do try to predict things from past events. Google says,

" While Amazon has not publicly confirmed the specific algorithm used, Alexa's "Hunches" feature is based on machine learning, specifically deep neural networks and predictive modeling, which are strongly rooted in probabilistic methods like Bayes' rule ."

1 Like

Does that driver incorporate probabilities or Bayes' Rule?

In my experience there’s less variation in schedules day-to-day or week-to-week than one might imagine. And there is usually some data you can use to anticipate events (e.g. showers typically taken say one hour after wake up time, which you can guess from motion sensors around the house).

I’ve used apps like InfluxDB Logger (with Grafana) and Watchtower to observe/measure (learn!) patterns and set schedules accordingly.

3 Likes

Not at the moment, but I'm getting many ideas from ChatGPT. I wish I had the time to experiment with all of them..

Bayes’ Rule for thermostat learning


1 Like

This seems to be mostly about hot water recirc. We are retired and on a pretty random schedule. Away at different times or in the kitchen cooking all day. Our solution is a motion sensor in the master bath and the kitchen and a temp sensor taped to the hot water return line at the water heater to track its relative temperature. Smart plug controlling the recirc pump. If the recirc line is lower than x and there is motion turn on the pump for five minutes. Do not turn on again for 30 minutes. If temp is greater than y turn off pump. This has been working well for several years. Two rules one to control turning on the pump and one to turn off at a high temp threshold.