HydroTekFarm2023 / esp32_automation

esp32_automation
https://github.com
Other
0 stars 0 forks source link

OTA #20

Open hydrotekfarm opened 3 years ago

hydrotekfarm commented 3 years ago

In GitLab by @AjayKrishna123 on Aug 25, 2021, 10:03

hydrotekfarm commented 3 years ago

In GitLab by @embeddedcoders on Sep 1, 2021, 08:35

Hi, I am rewriting my understanding here.

  1. ESP32: Setup MQTT and subscribe ":device_id/fertigation_ota_push" topic to get notification from mobile App.

  2. ESP32: Check the existing firmware version from NVS and compare it with a published massage.

  3. ESP32: REST API GET response to server and endpoint will be "fertigation-ota/:{version}".

  4. ESP32: After completion of OTA, it will send a success or fail response on the ":device_id/fertigation_ota_result" topic.

  5. MicroService: Send notification to ESP32 on ":device_id/fertigation_ota_push" topic to start OTA process with the given version.

  6. MicroService: Download firmware from GCloud if require and store it in a local HTTP server.

  7. MicroService: REST API response sends to ESP32 with the endpoint link.

  8. MicroService: It subscribes to the ":device_id/fertigation_ota_result" topic to receive an OTA response from ESP32.