General area when it fits no where else

Moderator: Mmiscool

User avatar
By forlotto
#48364 Currently I have 4 devices always connected I'm sure there will be more as time comes and things start to flower even more.

So my question is which would be the best way to setup a server to handle requests...

While I was thinking about it I thought the cheap way would be to have a server with a bunch of separate html pages each having an Iframe for each request and just serve the pages which in turn would load the iframe.
This is dirty and this is cheap but I assume it would work just fine. Or maybe it would not because the iframe may only load what is local on my network vs what is on the servers network...

So I am pondering on the best way to do it either at home or away and I haven't really come up with any solutions worth a mention. The bummer is that I will want the server not only to do get requests but post data as well from say temp sensors etc...

The need for such a thing is relatively newish for me mainly I have used servers to serve basic web pages and scripts forums etc my knowledge of getting data from other locations on the local network is fairly vague. Or at least not in this manner getting info from esp's etc... I'm sure I've done similar things but I am drawing a blank tonight.

Would be cool to get some pointers if anyone has some ideas they care to share or part with I do have a raspberry pi I suppose I would not mind putting to use a version 2 should handle the job fairly well I believe.
User avatar
By Mmiscool
#48366 I always sugest havibg a server handle all trafic to the outside word. You talk to the server and the server talks to all your devices.

Esp basic was modeled on a product called "run basic".

Run basic is a server and interperter all roled in to one that has many features similar to esp basic. Runbasic.com is where you can get it from.

There is a cost but it will really do some good things for you. Nice fancy guis. Comunication with the devices on your internal network. Sesion management and lots more.

If you want to go another path php can be usefull.
User avatar
By villTech
#48378 i have 8 esp-03 around my house, connected to a local server which is an openwrt router with uhttpd, php, and mysql.

and a server on a domain, which also has php and mysql, where all my work iot projects, are connected.
User avatar
By forlotto
#48591 It would be great to see some examples of people with servers that can control all of their esp's from the outside world using their server.

I have a bit of trouble comprehending the operation of requests remotely.

For instance if I request data from a resource that is local to the server remotely it will instead try to connect to my local resources on my own local network leading me to believe that I would need something more like a remote access type server where I could control things remotely tightvnc or ultravnc could do this but that would be a hack job I would much prefer something that would allow me to run requests and get requests remotely from the devices connected locally to the same network the server is connected on.

I see the reasoning you have mmiscoool for having a separate router to connect everything to but I already have 2 routers one works as a bridge to the other router so that I can have optimal wireless coverage in my home for all of my devices. And while I would rather just be able to control things this way I almost wonder if I couldnt just forward each device to a different port via TCP and call it good and make my requests based on ports allowing remote control without the need for a server really to be frank one could just use the ip and the port to access each resource respectively. I have not really tried this to see just how this works but one would imagine it may just work fine things that need the security of being local I wouldn't forward you would have to essentially be here to operate it.

But a server would allow for far more things like handling timers and such I am so unaware of operating servers in this manner I guess mainly servers I've used to host stuff on the server rather than control stuff from other local ip's on the same network as the server I feel rather dumb in this department.

Would be great to see you folks share some info, videos, code, and more on this one.

Thanks guys for you replies,

-forlotto