homebridge-wifipresence
homebridge-wifipresence copied to clipboard
MAC Address
Hi. How do we put the MAC ? With “ : “ or altogether in lowercase? How do we separate different MAC? Will it be occupied only when all MAC are connected? Are we supposed to create the file presente.wifi? What is supposed to be in the file?
Thanks
Hi,
yes all MAC are in lowercase e.g.
"clients": ["aa:bb:cc:dd:ee:ff", "11:22:33:44:55:66"],
and it will use this list intersect with in the presence file. So if any of MAC is exist, the HomeKit will say it's occupied.
You can change this line, https://github.com/llun/homebridge-wifipresence/blob/master/index.js#L38 to make it check, only all MAC are exists, to show device is occupied.
Ok thanks. I need it to show occupied if my iphone OR my wife's iphone are at home so I don't need to change that line.
But do I need to create the presence.wifi file ? Because I installed the plugin and then homebridge gave me an error because there was no file.
No but you need to run presence.sh to produce that file.
Hi @llun sorry for bothering you, but if I understand correctly, the presence.sh
should be running in router side not the rpi side(homebridge installed) right? So how to make this homekit to"read" the presence.wifi
?or should I running homebridge and the router on the same machine?(currently I am running openwrt router)
@kevinshane hi, I run HomeKit in the router itself. Alternative option is using IP address and lock down the phone address, and using ping for finding which device are presence in the network but it quite not convenient when new device is add to the network.
For openwrt, you might want to try https://github.com/llun/hkwifioccupancy/blob/master/netlink_presence.go so instead of using file, it can trigger when people join on network. I will try porting this back to HomeBridge later.
Thanks man, really helpful infomation! I will look into that
@kevinshane hi, I've create some script works properly by rpi side. You may update your doc or add a link to my repo raspberry-pi-wifi-presence-with-mac-address and it would be helpful for those who can not run your presence.sh
shell script by router side.
Hi @llun
Could you please let me know how to run the presence.sh script on a DD WRT router so that it can create the presence.wifi file? I have the plug in added to my config file but the device is not responding in Homekit.
Thanks you so much and sorry if it's a stupid question - I just REALLY want to get this working for an Android device. Thank you so much :)