Normaly I use to Ping a Phone to detect presence. But the Samsung S7 you cannot Ping in Standby. But I have seen that it is present in the Wlan list of my DDWRT Accesspoints. So I want to get data of the DDWRT to do Presence. I have 4 DDWRT Ap’s but with only one it is much easier to do. The example ist for 1 Ap
Tranformation: “getmac_moni.js”
// Wrap everything in a function
(function(i) {
var
p= i.search(“AC:5F:3E:4F:1F:64”);
if (p>1) {s=“ON”} else {s=“OFF”};
return s;
})(input)
// input variable contains data passed by openhab
So if the Mac ist present in the wlan list then switch goes to ON. But dont forget to Switch in DDWRT the Info Site MAC masking to Dissable
How reliably have you been able to detect your s7 with this method?
Ive been thinking of doing this setup as I havnt been able to reliably detect the s7 or s8 maybe it could help you out, it uses a script running on one of your AP’s to detect the mac on your network then tells OH to turn on or off an item.
The js file ist a file in Openhab you need for Transformation. Openhab reads raw HTML data from ddwrt
and ist serching for the mac adress from your Phone.And then it returns a switch command ON or OFF.
In the Roter DDWRT you dont need a Program.
This was throwing a whole bunch of errors until I replaced the quotes. It must not have liked yours for some reason. Thanks for an awesome little script!