Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP8266 MQTT disconnecting & reboot ESP 1-3 minutes #5013

Closed
dareksin78 opened this issue Mar 26, 2024 · 11 comments · Fixed by #5014
Closed

ESP8266 MQTT disconnecting & reboot ESP 1-3 minutes #5013

dareksin78 opened this issue Mar 26, 2024 · 11 comments · Fixed by #5014
Labels
Category: Controller Related to interaction with other platforms Category: Rules Related to the rule engine Type: Bug Considered a bug

Comments

@dareksin78
Copy link

dareksin78 commented Mar 26, 2024

ESP_Easy_mega_20231225_normal_ESP8266_4M1M

I have the same problem #4996
I was looking for 2 days... and I think I found the solution, or so I think.

If I set value corrections here, there is a problem with mqtt!!!

image

Mqtt works fine if I don't set any rules.

Back to ESP_Easy_mega 20231225_normal_ESP8266_4M1M
does not help.

It's ok here: ESP_Easy_mega_20231130_normal_ESP8266_4M1M.

Please check and let me know if this is the reason for you.

@tonhuisman
Copy link
Contributor

Have you tried with this build? https://td-er.nl/ESPEasy/latest/ (From Chrome or Edge you can flash your ESP directly)

@dareksin78
Copy link
Author

dareksin78 commented Mar 26, 2024

image

ESP2

image

@dareksin78
Copy link
Author

dareksin78 commented Mar 26, 2024

When

ESP2
image

this

image

@TD-er TD-er added Type: Bug Considered a bug Category: Controller Related to interaction with other platforms Category: Rules Related to the rule engine labels Mar 26, 2024
@TD-er
Copy link
Member

TD-er commented Mar 27, 2024

OK, I think I can reproduce it.
First I thought it might be related to publishing an empty message.
I had a sysinfo task running with some formula and it ran fine for hours.
Then I added a second task (1-wire) without anything connected and then it started crashing when sending the sysinfo task.

I also have a stackdump, so I can hopefully find what's wrong here.

@dareksin78
Copy link
Author

The problem occurs immediately, you can see it within a few minutes, you don't have to wait several hours

@TD-er
Copy link
Member

TD-er commented Mar 27, 2024

Yep, it seems there is a bug in the Arduino code when using a very specific string length.

I have a bugfix on my desktop running to work around this problem, but have to check a lot of other code to see where it might run into this same issue.

Also I got some strange topic being sent to the MQTT controller, which might explain why it can get disconnected:
image

Have to look into this also as I have no clue yet how the formula can end up in the MQTT topic

@TD-er
Copy link
Member

TD-er commented Mar 28, 2024

I uploaded the build which should fix this to the webflasher
Can you test it, to see if it is also fixing your issue?

@dareksin78
Copy link
Author

It's OK for the first 10 minutes.

I will write more tomorrow because I have to leave the house.

@TD-er
Copy link
Member

TD-er commented Mar 28, 2024

It's OK for the first 10 minutes.

Ah based on the issue title, it should be considered fixed :)

@TD-er
Copy link
Member

TD-er commented Mar 29, 2024

Is it still working?

@dareksin78
Copy link
Author

It's ok .
Thank you for fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Controller Related to interaction with other platforms Category: Rules Related to the rule engine Type: Bug Considered a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants