When building ESP8266 or ESP32 based gadgets you soon get to the point where you want to mount them into a nice casing with a power supply and hide them somewhere in your rooms.
Thinking about possible solutions I stumbled over the fact that many Wifi based smart power plugs (i.e.Tuya plugs) already contain ESP8266 hardware, nicely packed into a casing, with power supply and ready to be plugged into a wall socket. And they can easily be flashed with ESPHome. So basically all I was looking for!
What I am not so sure of is whether it will be possible to access any free GPIO pins on the integrated ESP8266 modules to connect add-ons through I2C or SPI.
If this would be possible, I would try to mount additional hardware right within the power plug, like air quality sensors or humidity sensors. The sensor programming could also very easily control the power outlet, the push button and the LED that all come with the plug. And all this for just 10 bucks.
I couldn’t find anything on the web about this way to build complete sensors that could easily be plugged into the next wall socket.
Sounds like a great idea to me.
But is it possible? Has anybody done this?