MHZ14a issue after hours

Hello Kyle,

the automated hydroponic is running very well.
Now I have connected a Mhz14a with serial to USB converter to the raspberry pi3+.

PL2303 HX USB TTL UART Adapterkabel

I have changed in input module (Mhz14) AMA0 to USB0.
/dev/ttyUSB0
After activation i can see the measurements, but some hours later ( 6-24 hours) my displays shows none and the log says „Bad checksum“
Then i must deactivate the input and reactivate it again to get measurements.
I dont know what to do to make it work correct.
Please can you help ?

Last 30 lines of /var/log/mycodo/mycodo.log:

2022-09-25 10:31:21,700 - DEBUG - mycodo.inputs.mhz_14_88dd4cf7 - Obtaining reading via UART… 2022-09-25 10:31:21,802 - ERROR - mycodo.inputs.mhz_14_88dd4cf7 - Bad checksum 2022-09-25 10:31:21,806 - DEBUG - mycodo.controllers.controller_input_88dd4cf7 - Adding measurements to InfluxDB with ID 88dd4cf7-2bd2-4f51-acc4-305a360164ca: {} 2022-09-25 10:31:36,671 - DEBUG - mycodo.inputs.mhz_14_88dd4cf7 - Obtaining reading via UART… 2022-09-25 10:31:36,772 - ERROR - mycodo.inputs.mhz_14_88dd4cf7 - Bad checksum 2022-09-25 10:31:36,776 - DEBUG - mycodo.controllers.controller_input_88dd4cf7 - Adding measurements to InfluxDB with ID 88dd4cf7-2bd2-4f51-acc4-305a360164ca: {} 2022-09-25 10:31:51,701 - DEBUG - mycodo.inputs.mhz_14_88dd4cf7 - Obtaining reading via UART… 2022-09-25 10:31:51,803 - ERROR - mycodo.inputs.mhz_14_88dd4cf7 - Bad checksum 2022-09-25 10:31:51,809 - DEBUG - mycodo.controllers.controller_input_88dd4cf7 - Adding measurements to InfluxDB with ID 88dd4cf7-2bd2-4f51-acc4-305a360164ca: {} 2022-09-25 10:32:06,654 - DEBUG - mycodo.inputs.mhz_14_88dd4cf7 - Obtaining reading via UART… 2022-09-25 10:32:06,771 - ERROR - mycodo.inputs.mhz_14_88dd4cf7 - Bad checksum 2022-09-25 10:32:06,779 - DEBUG - mycodo.controllers.controller_input_88dd4cf7 - Adding measurements to InfluxDB with ID 88dd4cf7-2bd2-4f51-acc4-305a360164ca: {} 2022-09-25 10:32:21,644 - DEBUG - mycodo.inputs.mhz_14_88dd4cf7 - Obtaining reading via UART… 2022-09-25 10:32:21,746 - ERROR - mycodo.inputs.mhz_14_88dd4cf7 - Bad checksum

1 Like

I just committed a potential fix.

Upgrade to master if you wan to test.

Thank you for fast response,
i will wait to 8.14.3, or maybe i will upgrade to master when i have more time on weekend.

Ok, upgraded to master was fast and easy done.

1 Like

Have you had any issues since the upgrade?

Hello Kyle,
the master version and the customized file have not produced any failures or errors so far. The MHZ14 had no further failures due to bad checksum.

1 Like

The code update doesn’t prevent checksum errors from occurring, it merely reinitializes the input if two consecutive checksum errors are encountered. So you’ll have to wait for them to occur before you can verify the fix works.

ok, i´ll wait and see.