I am a part of a research team that is using Home Assistant to record occupancy sensor data but ran into some problems for custom-built sensors. There is another research team that is going to send my team a custom-built Bluetooth occupancy sensor (all I know about it right now), and I need to configure it to Home Assistant to record data. I have had trouble finding documentation to help me solve this problem. So far, I looked into building an integration using python but was wondering if there was another way to configure custom sensors to Home Assistant. Anything that helps point me in the right direction will really help.
Yes, I believe I can @Tinkerer, but my only concern is that once a Bluetooth connection is established, the state will continually be reported as “home.”
A device tracker will report a device as home when it is responding/broadcasting and then away when it isn’t. There’s sometimes a buffer, so that things aren’t flipping between the two states, but that it takes (say) three missed responses before it’s marked as away.
Ultimately, HA will record whatever you send it. The simplest way of sending it is MQTT. It’s up to you to build that interface to account for whatever it is you need. Or just ditch the custom built thing and use monitor
No, monitor is for tracking Bluetooth devices - whether they’re present or not.
For what you’re doing a simple MQTT binary sensor would fit the bill. It even supports automatically turning the sensor off when no on message is received for a given time.
Could anyone explain how to apply MQTT binary sensor? I spent a lot time trying to figure it out today, but I am currently stuck on it. So far, it appears Home Assistant may need esp32 as bridge to connect a binary sensor, but is there a way connect MQTT directly to a Bluetooth PIR occupancy sensor without flashing?
P.S. The reason why I want to know if I can do it without flashing is because I do not know if it is possible on the sensor I will receive from the other team.
Yes, if that’s purely Bluetooth you need a “bridge”, or to create a custom component. Bluetooth PIRs are pretty uncommon, so there’s no existing integration.