The hunt for the best room occupancy solution

Sure here is the link to the code
https://drive.google.com/drive/folders/1bPxQGAB-Pae1OHqNp3j0JPD3TwISbe2d?usp=sharing

1 Like

Cool, thanks.

Also, the RA implementation isnā€™t as robust as you hope to build yours (and points to the flaws I mentioned about multiple people on thermal):

Note that due to the low resolution of the D6T sensors multiple people can only be recognized as such if they are positioned at different ends of the sensor field of view.

So, where are you in testing now? What pitfalls are you encountering and how accurate have you been able to make it? What kind of field of view/distance are you getting from that?

So the aim is to have a sensor above an entryway facing down so it has a birdā€™s eye view. So far I have made it work and can detect me entering and exiting but itā€™s 75% accurate so I am looking for things to improve. after that, I will test with multiple people entering at once and go on from there. The FOV is I think 60 degrees up till 5-7 meters depending on the environment, more than enough for my case.

Have you considered over-engineering it? Have an MLX thermal camera, CO2 sensor, PIR sensor all working in harmony? If itā€™s that close proximity then those three working off of each other might get you pretty close to that 100% mark. Heck, you could even add RA into the mix to be sent a trigger to ping BTLE once you feel certain there is someone there to figure out WHO is there.

Interesting idea. I think it could work as one of a few inputs for a Bayesian sensor.
I have this CO2 sensor in my living room. I went to bed around 3:30 and got up around 9:30 today. The graph is almost spot on. But might be something else of courseā€¦
image

If youā€™re really serious about going the thermal route, thereā€™s always the FLIR Lepton modules. They play in a completely differently league from the Omron ones, in terms of resolution (160 x 120 thermal pixels), dynamic range, etc. They can differentiate multiple people without problems, you can even run ML to figure out if the thermal signatures are from humans or pets. But that comes at a priceā€¦

I bought one of these some time ago, not for home automation but for measuring thermal insulation quality while I was renovating my house. Theyā€™re really nice.

Then again, if youā€™re at that point and really want accurate room presence, you can just put cameras in every room and run some human detection network on their images. They could double as security cameras. If you and your family donā€™t feel creeped out by cameras everywhereā€¦

Seems like cameras in regular rooms and thermal in the rooms where people sleep might be the economical but reliable way to go.

1 Like

Would it be sufficient to cover single bedroom? Iā€™m looking for solution that doesnā€™t rely on bt or wifi.
Also, from this review it mentions the detection range seems to be limited to 2 meters?
Frigateā€™s great and all, but it needs some movement for detection to start and Iā€™m not too keen on installing cameras indoors

HA Thermal image - YouTube

Has anyone tried one of these? Does it pair with ZHA? If so, what gets exposed?

The range for amg8833 is around 8m. You can try using this code created for the D6T module to detect significant edges. ESPHome D6T Custom Component Ā· GitHub

This discussion is interesting. In my previous home I used simple dual-tech occupancy sensors for all of the downstairs rooms with a reasonably short timeout and I donā€™t remember the lights ever going out on us unexpectedly (even when sitting still watching TV), so I would expect it to work for the computer use case as well. I guess it might not work for sleeping, but actually combining with a sensor on the bed might be simplest for that.

The dual tech sensors have infrared and ultrasonic sensors in them, and you have to trigger both to start with but it keeps signalling presence as long as just one of them detects you, so smaller movements keep the presence alive.

I actually found this thread searching for which dual tech occupancy sensors would work well with HA. (I was previously using the LOS-CDT-2000 wired ones but that house had a full rewire so I was running cat 6 cables everywhere. Hoping to do it wireless this timeā€¦)

Have you been able to improve on this? How well is it working for you lately?