Python Function Not Triggering pH Adjustment Pumps After Activation

Hello everyone,

I’m trying to create an automatic pH adjustment function for my hydroponic system, but after activating the function, the pumps do not turn on automatically, even though the logic should trigger them.

Here is my setup:

  • I use a Measurement (Single, Last) condition to read the pH sensor.

  • In the Function’s Run Python Code, I check the pH value and call self.run_action() to turn on the pumps for 3 seconds.

  • The actions are correctly created, and each one manually works when I press “Execute”.

  • However, when I activate the Python Function, it does not automatically run or control the pumps.

    My questions:

    1. Why does the Python Function not automatically execute when activated?

    2. Do Python Functions require a Trigger or Timer to run?

    3. Is there something wrong with using self.condition() inside the function?

    4. Should I add a Timer or can a Python Function run continuously by itself?

Here are some screenshots of my code and configuration

The code alone is not enough to diagnose the issue. All of the options/settings need to be provided, including those of the input/condition().
It’s also a good idea to use logging to receive feedback from the code, otherwise you’re just assuming what is happening when it runs.

1 Like

this is my configuration, pump 3 and pump 4 are the pH+ and pH- dosing pumps. Thank you so much

I need to see all the options of the conditional controller and the input. You’re only showing some of the options of the conditional controller.

1 Like

this is my all settings. Thank you so much!

And the options for the input.

i found the mistake thank you so much and sorry for my late reply because i could’t access to this web