How can I make an Arduino Mega with Ethernet Shield / ESP8266 based micro controller connect to my routers configuration page at 192.168.1.254 and analyse the HTML response in order to see which devices are connected.
I want to write a program to go on either an Arduino Mega with Ethernet Shield or ESP8266 based micro controller to tell my home automation system when I'm connected to the WiFi.
My current system uses Node RED to ping the static IP of my phone every 60 seconds, however it's an iPhone so after 20 seconds of being locked the WiFi chip goes into sleep mode and the ping returns an error.
I could use IFTTT to trigger an action every time I enter / leave my house, but this requires my location services being on all the time draining battery and using data.
The best way of seeing what devices are connected is on my routers home page for configuration at 192.168.1.254 (which is not affected by devices going into sleep mode). If the Arduino could connect to the web server at the IP address above, and receive a HTML page as a response, then the code could be analysed and it would be possible to see which devices are connected.
The problems I anticipate are:
- If i want to see if multiple devices are connected, not just my phone but say also my sisters phone, I do not know where in the table the devices will be as the order changes with each device connecting and disconnecting (I see no logical order to the list such as A-Z or ascending IP address)
- The HTML response is very long
- The web client may not receive a web page at all when it sends a HTTP request to connect to the web server.
I would appreciate any ideas on how to achieve this. Please let me know if you have any questions. Thank you in advance.
- Picture attached is of the Router's home page