A 'beacon'/device that can track 'any' device passing, communicating via WiFi? Does it exist?

Hi all,

I want to swap around the ‘usual’ way of device tracking with beacons where there must be an app on the device that pick up the beacon and report back by MQTT.

Anybody tried a solution where there is a “beacon”/device in a room that pick up any passing BT device (like phones) and report their MAC address by WiFi to HA/MQTT server?
Then I could make a set of rules where I link the MAC to known devices.

Why?

I can’t run around to everybody using the rooms and install apps on their phones, but would love to know if and when they passed a tracker.

There is no such device due to technical and security design issues. Your subject and posting are asking 2 different things.

Bluetooth works by pairing 2 devices. For security reasons both devices need to agree to the pairing.

Wi-FI devices do not just try to connect to every SSID it sees. That too would be a security and privacy nightmare.

Some vendors do have beacon tokens that use Bluetooth LE along with their app. But you explicitly said you did not want that.

If use a component that connects to your wifi/modem/router like this:

or

It will create known_devices entries for all connected devices. You can then use this to create device trackers.

Monitor can do this on a Pi Zero W to find bluetooth devices. I limited it to known MAC addresses, but before that it was picking up visitors and the neighbour’s phones. The only down-side is it seems to be pretty good at causing 2.4GHz Wifi interference. The link has documentation on the magic used to see devices without pairing.

@michaelblight
Ah, that is so awesome! I assume I can use RPi3’s as I have a few laying around?

@tom_l that will assume the devices are connected to the local WiFi, but for instance guests of the house are connected to only a single WiFi SSID on one router (guest network).

I have it working on a 3B+ as well as two Zero Ws. I had to faff around a bit with the 3B+ because I’m also running Hassio on it. The author doesn’t really support it on anything other than the Zero, but I haven’t had problems (other than the mentioned wifi interference which may be upsetting my Hue bulbs and TP-Link switches for a few seconds every time it runs).

Should it automatically populate known_devices running as default ?

I have it running on a RPi 3b+, everything seems fine and I see log entries using: journalctl -u monitor -r
But nothing appear in known_devices.

My purpose is to register a person present (known or anonymous) when passing the monitor.

Do you mean the known_devices.yaml that HA uses? I would say no - as far as I can tell, monitor is completely independent of HA. You would need to subscribe to the MQTT messages that monitor sends and do something with them. I’m subscribing from Node Red and doing all the logic there to decide who is home; then I send that info to HA. The website has examples of connecting HA to monitor, but I haven’t done that, so I have no experience with it.

Having problems making HA subscribe to the messages. I can see them in MQTT but not from HA.
They are posted to topic ‘location/office’ and as I said I can see them in MQTT using MQTT Explorer, but if I try to use mosquitto_sub and location/office - I get nothing.
Changing to mosquitto_sub and location/# I get results in SSH…

It might be worthwhile posting a general question on receiving MQTT messages in HA and the problems you’re having - it doesn’t look specific to monitor, especially considering you can see them in MQTT Explorer. I’ve never done it, and personally find Node Red easier to get my head around.

Check your username / password matches up. I’m not home to see how mine is defined at the moment but I remember doing something in that area.

I use Ubiquiti Access Point and the Unifi component, and can see devices on my guest network too.

@michaelblight
Posted a new topic here, I’m so lost on this issue…