Bayesian use cases, examples and how it works. I need some input! :)

I read a lot about the Bayesian integration lately. I am very interested but I also don’t understand Bayesian statistics. So I want some input.

Bayesian vs ‘dumb’ sensors
Why or better: when will a Bayesian sensor be better above a single sensor. I understand that my motion sensor and light in the basement (where only I come) is not useful.

Useful ideas?
I am struggling with a few things that normal automations can’t handle, thinking of

  • motion sensors activated by my cat
  • heating turns on at 17:00 in the living room while I am not planning on going there

Limitations
Bayesian is not AI or a learning thing. So I can imagine that heating things are more difficult, because they need time to heat (the room).

(Your) use cases
Do you have good or interesting use cases? I’d like to get inspired!

Have you read this?

1 Like

Indeed a must read for Bayes.

Shortest way to think about it is with this perspective…

You want to act on stuff but that stuff is kinda fuzzy…

Thibk of it this way. You want to automatically set the house in sleep mode at night when your So goes to bed. But once a week you have poker night. And you don’t want sleep mode to happen when that’s going on. So what sensors denote activity in the rest of the home so when whatever you’re using to detect SO in bed activates you can also gather data to determine should I set the home asleep.

Complex stats happen and resolve to an answer. Yes I should or no I should not. Then you act in that result.

No magic. Just stats. Read the post above in it’s entirety

The post @echopage links to is very good. It’s quite old, but it includes some spreadsheets for working out probabilities.

I have two use cases at the moment:

Probably Home

The aim is to allow HA to recover into an appropriate state after a restart - most restarts only last a few seconds, but after a power cut you don’t know how how long it will have been down, and one thing you need to establish is whether anyone’s in the house. This runs shortly after a restart and looks at time of day, movement, presence of devices and a few other things to decide whether to turn the heating on etc. It will also turn on presence simulation (lights going on and off) if I go out without setting the alarm.

It has another rather macabre use - if there is probably someone home but no movement for 24 hours HA sends a text to a neighbour.

Most likely room

My voice assistant responds over my Sonos speakers, but it has a single server (not a bunch of Alexas, in other words), so HA has to decide which room I’m in before it can reply. This takes device tracker data and adds information about movement, whether things like the TV are on or off, time of day etc. to work out which is the most likely room. It could be used for all sorts of room presence applications (like heating) and usually filters out my dog’s movements quite well (she doesn’t have a mobile phone). It also smooths out the “bounce” you sometimes get from room presence applications.

I built both of these for fun initially and was a bit dubious about how reliable they’d be. It took a bit of fine tuning, but it turns out they’re remarkably accurate, and, yes, better than relying on single sensors. You need quite a lot of kit, though - motion sensors and device trackers in every room. Fortunately things like Bluetooth proxies are not expensive.

1 Like

Yes!

That still makes it fuzzy to me!

As this topic seems to be forgotten and I’m still looking for inspiration. I’ve came up with an idea: is it possible to use bayesian to determine if I am a short time or a long time from home?
Short time: running some errands. Long time: work or vacation, etc.