From an Arduino page on my home router can I go to another page on the same router

I have about 20 esp and wifi rev 2 devices in my house doing various things and all have a web page so i can click the usual 192.168.1. something and get to the page of each gadget.

What i would like to able to do from the page is have code that will take me to a different page, say 192.168.1.55 even tho I am on 54 presently.

Is there a way to do that? In other words, can I add a link in the page where I am that will take me to a different device?

Why would it be any different from any other link? You can put a link in an HTML document to take you to any webpage. You could put a link to forum.arduino.cc there. Surely you can put a link to another IP address on the same net.

What have you tried? Did it not work?

i agree, but for some reason i draw a blank when trying to formulate it in my head. you're right i have coded links for things like thingspeak and they all come up, they use embed.

something as simple as this perhaps?

//<iframe src=" http://192.168.1.56>

embed? No man, a hyperlink. This has nothing to do with the Arduino code. You need to add a hyperlink to the HTML that the arduino is serving. The PC someone is viewing the web page from will handle the link. The Arduno doesn't have to do anything but serve up the html text.

1 Like

ok, what does that look like?

<a href="192.168.1.54">Go to unit 54 </a>

1 Like

ok great, I will try that, thank you very much!!

I added:

strcat(html, "<a href='192.168.1.58'>Device 58 </a>");
strcat(html, *ctdotd);
strcat(html, "<a href='192.168.1.70'>Device 70 </a>");
strcat(html, *ctdotd);
strcat(html, "<a href='192.168.1.55'>Device 55 </a>");

but it appends to the end of the existing line.

Oh we forgot the http:// in the link.

<a href="http://192.168.1.54">Go to unit 54 </a>

I'll try it with http:

that was it, and that opens the door to being able to check all the gadgets from 1 tab. plus i can get to regular websites from it too. THANKS.

That w3 schools is an awesome site, i've used that many time in all this computer coded HTML i've had to do. Great stuff.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.