-
Notifications
You must be signed in to change notification settings - Fork 10
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
Reboot during exchange_command #1
Comments
When I look at the code now, I see that there is no way to let the microcontroller know that we're still alive. If the sensor is non-responsive, it may take up to 3000 ms until we conclude that we get no reply. This may be too long for the built-in watchdog to conclude that the software hangs. Can you perhaps try adding a yield(); in the loop, at line #44 ? |
Thanks for your reply! |
Hi, i've come here to chip in on the problem :-) . I'm using a D1 Mini (knockoff) and having the same problems. The weird thing is. It has worked for more that 3 months. I'm using it in combination with ESPHome. It took me quite some to narrow it down to the mhz19. I get the exact same error:
I have tried it on a fresh ESP8266, but it keeps having the same issue when using the mhz19 lib. |
I have now tried an 'original' D1 Mini, and it has the same problems: When flashed it starts with this weird output:
and after a while it comes up with this:
When checking the output with putty, the following is visible. I've tried this attached with MHZ19 and unattached. The output is the same. This is the output with the unattached MHZ19.
The only thing I can think of is that the memory is too small for D1 Mini? But until now, it worked great. It might be that an update of platformIO or EspHome have increased the size? But it should already stop flashing before the size is to large right? |
I don't know what could be the problem to be honest. Some time ago, I added a missing yield() in the response-processing loop, that could explain reboots (in case the mhz19 does not respond), but I fixed that. Are you using the most recent version? |
I'm using it through EspHome. Not sure if they are using the same base code with the mentioned fix? |
Hi,
I tried your library with a NodeMCU Lolin v3 and it keeps restarting.
I have added a debug, so I know that read_temp_co2 start and exchange_command start but it seems that exchange_command never ends.
Here is what I get in the serial monitor:
The text was updated successfully, but these errors were encountered: