ESP8266 07 hosting a local server (wiring)

Cool thanks! Ill give it a shot tonight to send data from one ESP to another and reading that from my app.
And as for batteries, if I want a standalone hardware. You know any good batteries preferably small that can give enough power to my ESP's? Like coin cells, maybe multiple stacked?

ESP's are rather power hungry, particularly when using WiFi. I can only recommend re-chargeable batteries (as really nearly all batteries should be) LiPo's are tricky to work with since they need special circuits for charguing and dis-charging protection. Voltage regulation is always going to be an issue which will go at the expense efficiency. I would go for 4xAA and regulate down, which can provide you with power for several days if you let the unit run continuously. Making it sleep will improve on this, but you still will lose some power at the regulator.

True I heard that everywhere indeed! But for my purpose it will only be on for lets say 2 hours a session. So I won't need insane battery life. So idk how long one can last on a coin cell or on 2 - 3 coin cells. Because I feel like a AA battery will be to big for my case, maybe one can fit idk I'll have to see.

Coin cells are among the most polluting of batteries. If size and weight can be an issue you should probably go for LiPo batteries. A 1000mAH battery should do in that case, though you would need extra circuitry for the charging as well as for the regulating. A lineair 3.3v regulator just won't quite do the trick in that case with it requiring a minimum of 4v (and the LiPo will only provide that up to 70% of it's charge)

Sweet, so I'm connected to my server of the ESP!!
Now I want to send data from a light sensor to this server.
But to what pins can I connect sensors that my ESP can read and then send to the server?
And how is this done? Do I use the ESP that hosts the AP as well to read data with sensors or is it best to use this esp just for the hosting?

That depends on the sensor of course. If it is a sensor that sends digital data, you would use the UART (or SPI) .
If it is analog, the ESP has 1 analog input (ADC) which has a 10-bit resolution for an input between 0 v- 1v.
This means you should prevent applying more than 1v to it.
Only 1 ? Yes only 1, but you can use a few digital pins to power a few sensors, powering 1 at a time and reading the result.

I would host a webserver on 1 ESP which will serve as an AP.
All other ESP's can connect to it in STA mode. They can 'POST' to a page (or a GET request to the ESP it doesn't matter much unless you specifically tell it to distinguish, GET is easier to debug), and this data can be extracted by the server, updating variables that can be accessed by the App when it visits that same or some other page.
Of course you can do packets of some other kind, which will probably be more efficient, but this is what i would do. Keep in mind that the maximum of connected devices is 8.

Yes you can of course, it would need to send it anywhere and can just incorporate the data in the page it is hosting for the App.
Normally one would start with that. Interfacing the sensors with the ESP is the next step, and to just include the results in a page that you already can connect to is the way to do this.

Hey,

so I have been working on my project for a bit now, but something that keeps happening is when I detach my VCC input (orange wire) and attach it again the program doesn't run anymore? I have tested it with the simple blink sketch and also that doesn't work anymore when doing this?
Any idea why this is happing?

You still have GPIO0 connected to GND, that puts the ESP in Flash-mode. After the upload the program starts running, but when you reset it, it will just go into flash-mode again. GPIO0 should be connected to a PULLUP and with a switch to GND.
I see you don't have a voltage divider on the ESP-RX. You should have.

Oke just to make sure I understand corerctly, I need to connect the GPIO0 with a resistor to a switch that then connects to GND. That will prevent it from resetting (going in flash-mode)
That will fix the problem then!
Not sure what you mean with needing a voltage divider on ESP-RX. Why? And what does it do?
never used voltage dividers before :sweat_smile:

Well you need to make sure that when you power up the ESP, GPIO0 is either pulled up or free-floating to make it go into normal boot-mode, or pulled down at power up to make it go into flash-mode. A (semi) permanent solution is done with a switch the same way you've done with the RST pin.

The GPIO pins on the ESP are not 5v tolerant. The Arduino uses 5v logic. To prevent the Arduino from damaging the ESP, you should use a voltage divider (or a level shifter) on the line that receives data (the ESP's RX pin) as such :
Arduino => 1K => ESP-RX => 1K => 1K => GND
Like that any 5v signal from the Arduino will be reduced to 3.33v on the ESP

Hey so everything is working out, except I want to program multiple ESP's with my arduino, but when I disconnect the TX and RX from a ESP it stops working? Like my server isn't visible anymore then? Any idea why? Or is this normal? I hope not since ideally I just want to have a ESP hooked up to a power suply and nothing else.

It shouldn't . Is that all you have disconnected ?

That works normally. Just make sure that GPIO 0, 1 & 2 are not pulled to GND when you power up the esp. (and be a bit careful with 'hot-plugging', you may be statically charged yourself)