kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
2.96k stars 494 forks source link

Danger - Funtion "regulate ph and EC" is disabled but still commands are sent do dose-pumps #1307

Open Mark0Mi opened 1 year ago

Mark0Mi commented 1 year ago

created the "Function Configuration: Regulate pH and Electrical Conductivity" set ph lower pump set nutrient A only set values accordingly everything seems to work so far..

created Daily TimeSpan Tasks to enable or disable above function (see screenshot) e.g. after 5:46 pm. function "regulate ph & EC" is disabled and shows disabled in the portal and logs: 2023-05-15 17:46:00,637 - INFO - mycodo.controllers.controller_function_7796115c - Deactivated in 59.0 ms this should not happen 2023-05-15 17:54:11,911 - DEBUG - mycodo.function.regulate_ph_ec_7796115c - pH is 7.30. Should be < 7.30. Dispensing 25.0 ml acid 2023-05-15 17:54:12,310 - DEBUG - mycodo.outputs.pump_atlas_ezo_pmp_7d935f3a - output_on_off(on, 0, vol, 25.0, 0.0, True) 2023-05-15 17:54:12,325 - DEBUG - mycodo.outputs.pump_atlas_ezo_pmp_7d935f3a - EZO-PMP command: D,25.00,0.83

Problem even when the function is disabled logs and the pump keep dosing

tried to disable input sensors for EC and PH does not help either? (I would expect if the timestamp of measurement is too old it would not be taken?)

screenshots image

disable function: image

mycodo-log.txt Mycodo Version: 8.15.8 Python Version: 3.9.2 (default, Mar 12 2021, 04:06:34) [GCC 10.2.1 20210110] Database Version: 16b28ef31b5b Daemon Status: Running Daemon Process ID: None Daemon RAM Usage: 108.748 MB Daemon Virtualenv: Yes Frontend Process ID: 552 Frontend RAM Usage: 99.636 MB Frontend Virtualenv: Yes

Mark0Mi commented 1 year ago

found the following in the debug deamon log:

2023-05-22 22:48:11,679 - DEBUG - mycodo.function.regulate_ph_ec_7796115c - pH is 7.38. Should be < 7.30. Dispensing 25.0 ml acid 2023-05-22 22:48:11,690 - ERROR - mycodo.controllers.controller_function_7796115c - Exception while running loop() Traceback (most recent call last): File "/var/mycodo-root/mycodo/controllers/controller_function.py", line 79, in loop self.run_function.loop() File "/home/pi/Mycodo/mycodo/functions/regulate_ph_ec.py", line 950, in loop "ml_ph_lower", self.get_custom_option("ml_ph_lower") + self.output_ph_amount) TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'