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

MCU crashes on web/mainpage refresh #1

Closed
balvant813 opened this issue Mar 26, 2020 · 4 comments
Closed

MCU crashes on web/mainpage refresh #1

balvant813 opened this issue Mar 26, 2020 · 4 comments

Comments

@balvant813
Copy link

I was very impressed and thankful to you after watching for you tube videos!
I downloaded and test compiled Sonoff_rolety.ino sketch. I was using nodemcu12e module to test the sketch. It compiled and uploaded fine. The wen interface works fine for "/readMain",/readConfig","/pressButton","/updateField", and "/upgrade".

BUT esp module crashes on "/" call and on any web page refresh!

I did not make any changes to your code (except updating ssid, password, mqtt info etc)

Any idea why?

Thanks for sharing your work.
B Patel

@bruxy70
Copy link
Owner

bruxy70 commented Mar 27, 2020

I am sorry to hear that. I am afraid I do not have NodeMCU to test that. And it works fine on the boards I have been using. What I'd do is, I'd try disabling different parts of the page and see what is causing that. I'd start with disabling the JS readMain function, that calls XMLHttpRequest() to fill-in the values. That's probably the issue, as there is nothing special other than that.
That calls the readMain function in web.ino. I guess the problem would be somewhere there. So perhaps disabling parts of the functions and see which of them is causing it. Perhaps something with memory?
Other than that, does it do what it is supposed to do? Technically, it works even without the web, I added that one later, and you can disable it by commenting #define WEB 1 in config.h.

@balvant813
Copy link
Author

balvant813 commented Mar 27, 2020 via email

@balvant813
Copy link
Author

balvant813 commented Mar 27, 2020 via email

@bruxy70
Copy link
Owner

bruxy70 commented Mar 27, 2020

No idea why. I thought that the PROGMEM directive just saves the string in the flash memory, instead of the RAM. There is nothing special you set-up in Arduino IDE for that. And it is weird that the other pages use the same, and they have no issues.
I guess it gets down to testing it on different boards. Anyhow, thanks for that, I have updated that in the repository, I guess it should help others too. Thanks for help.

@bruxy70 bruxy70 closed this as completed Apr 28, 2020
bruxy70 pushed a commit that referenced this issue Jan 28, 2024
Add actuator_activation_duration to README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants