but i have a problem, when i am in the house the status is HOME, but if i disconnect wifi on my samsung galaxy…the status takes a long time to change a status.
What is “a long time” to you? There will be a delay as your setup only has it checking every minute for an update. If its taking 15 minutes, there is another issue.
first, you are scanning almost all of your subnet so that takes a while. Also Nmap isn’t fast, even on fast scan. It works by identifying which ports are in use at each IP address. You could speed it up, but specifying the address of your phone. limiting it’s search range.
In your DNS server, you can probably setup reserved addresses by specifying the mac for your phone and the IP address it should get. This lets you keep your phone set for DHCP (which helps when you are at a coffee shop or work), but when home, you would always get the same local IP address.
In your home router, there is probably a table where you setup DHCP. It will be DHCP reserved addresses or something like that. You add your phone IP and Mac address to the list. Then everytime your phone comes home, and connects to your home wifi, it will get that address. So that way Nmap always knows that if it finds something on that address it must be you.