The use of the ESP8266 in the world of IoT

User avatar
By flo17
#84115 Hello Everyone,

We have a project at school (bachelor degrees) to develop a IoT system for external application (greenhouse, chicken coop,...).
We want to use an architecture with 3 layers :
    Cloud App with user frontend
    Central Unit (Rpi connected to the Internet) - Bridge between cloud and edge devices + administration
    Edge devices (ESP) with differents sensors/actuators

I am currently working on the esp side and looking to find the best way to preconfigure the ESP from the RPI. The idea is that the user have to connect the new ESP to the Rpi (by USB or Serial) to add it to the system. A new image will be compiled with correct Wifi and MQTT settings and flashed to the board.

I have already used EspEasy and Sonoff-Tasmota for previous projects and I would like to know if is it possible to configure the "devices" (sensors/actuators) from source files or by terminal ?

Best regards

Flo17
P.S. Sorry for spelling mystakes, english is not my mother tongue ;)
User avatar
By nikxha
#84289 Hi Flo17,

why it's not possible to initialy having esp running in AP mode with simple HTML - Config Page?
So you can always flash the same image to every esp based Sensor and once it powers up you can connect with Laptop to it setting the initial configuration e.g. SSID/Password, MQTT Broker IP, user/password, frequency of sending Data....
Also you can set type of sensor and unique ID etc....

This data can be stored in internal EEPROM of esp and after reboot it will act as Sensor (including disable of AP).

Also you can have a reset Button on each Sensor for deleting EEPROM and after reboot following above steps....

A Flag in EEPROM can be used to determine if esp shall be AP or Sensor....

Hope this helps....

Br
nikxha