espressif / esp-rainmaker

ESP RainMaker Agent for firmware development
Apache License 2.0
431 stars 145 forks source link

MQTT_CLIENT: MQTT connect failed (MEGH-4406) #248

Closed Ph-tech06 closed 1 year ago

Ph-tech06 commented 1 year ago

Answers checklist.

General issue report

Failed to read from DHT sensor! E (25417) MQTT_CLIENT: mqtt_message_receive: transport_read() error: errno=119 E (25417) esp_mqtt_glue: MQTT_EVENT_ERROR E (25417) MQTT_CLIENT: esp_mqtt_connect: mqtt_message_receive() returned -1 E (25423) MQTT_CLIENT: MQTT connect failed 04 03 2023_12 53 12_REC 04 03 2023_12 53 12_REC

Ph-tech06 commented 1 year ago

When i upload code its work perfectly but after some days ( like 3-4 days) ... show many error ..

  1. wifi is connected with esp32 but on rainmaker its show "offline"
  2. esp32 connect with my router perfectly because my esp32 mac address show in my router page that show on ARP list but esp32 now working with alexa , google assitant. 3.if i re-upload the code then again work perfectly but after some days same error show again -------

E (25417) MQTT_CLIENT: mqtt_message_receive: transport_read() error: errno=119 E (25417) esp_mqtt_glue: MQTT_EVENT_ERROR E (25417) MQTT_CLIENT: esp_mqtt_connect: mqtt_message_receive() returned -1 E (25423) MQTT_CLIENT: MQTT connect failed

sanketwadekar commented 1 year ago

@Ph-tech06 Please refer to the Rainmaker Fair Usage policy here. Make sure your device is not sending too many messages to the cloud. PS: Please use the "Runtime Bug report" form for creating issues that are related to crashes/errors as it helps us understand the issue much better.

Ph-tech06 commented 1 year ago

I have some doubt about messages sending via my device.... I don't understand this thing ... Can I know how may i reduce the sending messages and how will I use fair .... I mean which steps we are following to not face this type of error ..

On Sat, 4 Mar 2023, 19:28 Sanket Wadekar, @.***> wrote:

@Ph-tech06 https://github.com/Ph-tech06 Please refer to the Rainmaker Fair Usage policy here https://www.esp32.com/viewtopic.php?f=41&t=32450&sid=68bc7eb051d9bd9a09121647f11a4030. Make sure your device is not sending too many messages to the cloud. PS: Please use the "Runtime Bug report" form for creating issues that are related to crashes/errors as it helps us understand the issue much better.

— Reply to this email directly, view it on GitHub https://github.com/espressif/esp-rainmaker/issues/248#issuecomment-1454748753, or unsubscribe https://github.com/notifications/unsubscribe-auth/A56FOC4SLLAIPU6MJ3LMGA3W2NDA5ANCNFSM6AAAAAAVPMRWWI . You are receiving this because you were mentioned.Message ID: @.***>

sanketwadekar commented 1 year ago

Your esp32 device uses MQTT to communicate with the Rainmaker cloud. If you are constantly updating Rainmaker device parameters and reporting it to the cloud using updateAndReport() API, you will exhaust the MQTT limit and the node will get blocked.

techiesms commented 1 year ago

I think it's the issue of MQTT Budgeting. Well watch this video and you'll find it's solution in the same https://youtu.be/pNJBaWZ_vj0

shukur-alom commented 1 year ago

when my wifi disconnect to esp32 esp rainmaker app goes offline it's ok. but when wifi turn on, esp32 never connect to wifi automatically and rainmaker app always show offline. but when i press esp32 EN button it connect wifi prefectly and esp32 come to online. How to fix it?

shahpiyushv commented 1 year ago

@shukur-alom , can you try the solution provided here on the forums?

shukur-alom commented 1 year ago

@shahpiyushv when i switch esp32 2.0.0 to 2.0.6 it's working now.

rajsimiot commented 1 year ago

I am facing the same issue . Even if I send data once per minute. Basically around 2000 messages in a day while the document says it gets blocked if we send 25000 msgs in a day

Ph-tech06 commented 1 year ago

I am facing the same issue . Even if I send data once per minute. Basically around 2000 messages in a day while the document says it gets blocked if we send 25000 msgs in a day

mail me - pritam.alexa@gmail.com share the code & Related Error