The use of the ESP8266 in the world of IoT

User avatar
By MrExplore
#36427 Hi All,

I'm very interested in the use of the ESP8266 in a home automation context. I have been thinking about it for years and finally it seems within my reach :)

However, I'm having trouble finding my way around in the wealth of info on the net. I would like to know if the following setup is possible:
Image

- A Raspberry Pi running a web interface to read data from, and control the ESP nodes.
- ESP nodes that perform basic functions like controlling hardware en reading sensors.
- The Pi would be "the brains" of the system. Maybe some software on the Pi that makes decisions based on sensor readings and status.

Also I would like to know the minimal requirements for the nodes.
Would the following suffice ?

Image


This question is to get an idea of the general possibilities. So first I would like to know if this is even possible without going into technical details.

Maybe a first step, if possible, would be choosing an ESP version. I was thinking about the ESP8266-12

Thanks in advance for your advice.
User avatar
By lethe
#36448
MrExplore wrote:However, I'm having trouble finding my way around in the wealth of info on the net. I would like to know if the following setup is possible:
...
- A Raspberry Pi running a web interface to read data from, and control the ESP nodes.
- ESP nodes that perform basic functions like controlling hardware en reading sensors.
- The Pi would be "the brains" of the system. Maybe some software on the Pi that makes decisions based on sensor readings and status.

Yes, it is. Easiest way would probably to have the ESPs do HTTP get/post requests, if you have a webserver running anyway. However there are plenty of other options...


Also I would like to know the minimal requirements for the nodes.
Would the following suffice ?

Yes, apart from a few pull-up/down resistors.

Maybe a first step, if possible, would be choosing an ESP version. I was thinking about the ESP8266-12

The ESP-12 will certainly do the job and it's cheap & readily available. You should probably get the latest (ESP-12F) variant, as it has allegedly better antenna performance than its predecessors. For development you may find a dev board with integrated USB to serial useful (just be aware that the "NodeMCU dev kit" has weird-ass GPIO labels, that don't match the actual hardware numbering).
User avatar
By eduperez
#36457 Just a couple of comments:

* I just hope your idea works as expected... because it is exactly what I am trying to achieve ;)
* You can but 3v3 adapters for cheap at ebay, no need for a 5v adapter plus regulator.
* Regarding software, have a look at MQTT and OpenHab; it can make things easier.
User avatar
By MrExplore
#36804
lethe wrote:...Easiest way would probably to have the ESPs do HTTP get/post requests, if you have a webserver running anyway. However there are plenty of other options...

Well I would prefer a system where the master quotes and controls the nodes:
- only get info from the nodes when needed
- control the nodes by sending commands

But it should also be possible for the nodes to send data to the master, on status change for example.

I'm focusing on the Arduino IDE. I just got my Adafruit HUZZAH ESP8266 connected after some problems

Next challenge is to find some Arduino code to control GPIO over wifi.
I'll do some reasearch but any tips would be welcome.

eduperez wrote:Just a couple of comments:
* I just hope your idea works as expected... because it is exactly what I am trying to achieve ;)
* You can but 3v3 adapters for cheap at ebay, no need for a 5v adapter plus regulator.
* Regarding software, have a look at MQTT and OpenHab; it can make things easier.


MQTT and OpenHab are a little too complicated for me at this moment, I would like to start at the basics.