Closed billimek closed 6 years ago
Really good info on how to tie all of this together and leverage a bayesian probability engine for presence: https://diyfuturism.com/index.php/2017/11/26/presence-detection-with-home-assistant-bayesian-probability/
Setup pihole
with a generated UUID of <redacted>
$ sudo hciconfig
hci0: Type: Primary Bus: UART
BD Address: <redacted> ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:752 acl:0 sco:0 events:47 errors:0
TX bytes:2733 acl:0 sco:0 commands:47 errors:0
$ sudo hciconfig hci0 up
$ sudo hciconfig hci0 leadv 3
$ sudo hciconfig
hci0: Type: Primary Bus: UART
BD Address: <redacted> ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:766 acl:0 sco:0 events:49 errors:0
TX bytes:2757 acl:0 sco:0 commands:49 errors:0
$ sudo hciconfig hci0 noscan
$ sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 <redacted UUID> 00 00 00 00 C8 00
< HCI Command: ogf 0x08, ocf 0x0008, plen 32
1E 02 01 1A 1A FF 4C 00 02 15 <redacted UUID> 00 00 00 00 C8 00
> HCI Event: 0x0e plen 4
01 08 20 00
$ sudo hcitool cmd 0x08 0x000A 01
< HCI Command: ogf 0x08, ocf 0x000a, plen 1
01
> HCI Event: 0x0e plen 4
01 0A 20 0C
$ sudo hciconfig
hci0: Type: Primary Bus: UART
BD Address: <redacted> ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:794 acl:0 sco:0 events:53 errors:0
TX bytes:2839 acl:0 sco:0 commands:53 errors:0
Implemented with https://github.com/billimek/home-assistant-config/commit/5eee985ffb1567089413add14ca00822bbc70dec & earlier commit.
See https://community.home-assistant.io/t/using-multiple-trackers-in-groups-to-detect-presence/21607 for some more hints.