Group PID Functions

Is it possible to group PID functions rather than creating 3 separate PID Functions?

I have 3 outputs, 1 Humidifier, 2 Fan of Humidifier, 3 UV light in Humidifier Tub.

Any way to trigger them all to switch on at the same time? or do I have to create 3 separate PID functions with the same settings, just obviously triggering each individual output.

You can use an Output Trigger Function to trigger an output when another output is affected.

awesome thanks!
Gave it a shot, but I can’t get it to work properly.
This is what I’ve configured:

So I want the UV light to come on for at least 10 seconds and then the Trigger must turn on plug 3 and 4.
Problem is that after 4 seconds the trigger is initiated. Even if I set the duration to 30, 60 or 90, it keeps coming on within 4 seconds. Please see below logs. I’ve tried the IF State (equal to duration) (greater than duration) (greater than or equal to)

Logs:
2022-07-28 18:16:16,292 - INFO - mycodo.controllers.controller_trigger_e0883381 - Activated in 1059.2 ms
2022-07-28 18:16:24,500 - INFO - mycodo.controllers.controller_pid_ac158eb2 - PID Settings: Device ID: 0fa712e8-251a-4608-874c-bd71ddec1c9b, Measurement ID: f44f9e22-3ff4-4af2-ae60-57276e2ef108, Direction: raise, Period: 120.0, Setpoint: 85.0, Band: 0.0, Kp: 3.0, Ki: 0.25, Kd: 0.0, Integrator Min: -100.0, Integrator Max 100.0, Output Raise: b7fb07d4-91db-4c2b-81cc-2c329325699b, Output Raise Channel: 1, Output Raise Type: on_off, Output Raise Min On: 15.0, Output Raise Max On: 0.0, Output Raise Min Off: 20.0, Output Raise Always Min: False, Output Lower: None, Output Lower Channel: None, Output Lower Type: None, Output Lower Min On: 0.0, Output Lower Max On: 0.0, Output Lower Min Off: 0.0, Output Lower Always Min: False, Setpoint Tracking Type: , Setpoint Tracking ID:
2022-07-28 18:16:24,505 - INFO - mycodo.controllers.controller_pid_ac158eb2 - Activated in 1041.7 ms
2022-07-28 18:16:54,874 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - Latest (CH1, Unit: percent): 56.5089225769043 @ 2022-07-28 18:16:42
2022-07-28 18:16:54,877 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - PID: Input: 56.5089225769043, Output: P: 85.47323226928711, I: 7.122769355773926, D: 0.0, Out: 92.59600162506104
2022-07-28 18:16:56,839 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - Setpoint: 85.0 Output: 92.59600162506104 sec to output b7fb07d4-91db-4c2b-81cc-2c329325699b CH1
2022-07-28 18:17:00,325 - DEBUG - mycodo.action.output_on_off_b9dfdeac - Message: 2022-07-28 18:16:57
[Trigger e0883381 (Trigger: Hum)] Output b7fb07d4-91db-4c2b-81cc-2c329325699b CH1 on_duration_equal_greater_than
[Action b9dfdeac, Output: On/Off/Duration]: Turn output 2ca6f016-ce92-4f43-831b-71d1e3a83944 CH2 (Kasa 6) on for 40.0 seconds.
2022-07-28 18:17:04,392 - DEBUG - mycodo.action.output_on_off_3602eb3f - Message: 2022-07-28 18:16:57
[Trigger e0883381 (Trigger: Hum)] Output b7fb07d4-91db-4c2b-81cc-2c329325699b CH1 on_duration_equal_greater_than
[Action b9dfdeac, Output: On/Off/Duration]: Turn output 2ca6f016-ce92-4f43-831b-71d1e3a83944 CH2 (Kasa 6) on for 40.0 seconds.
[Action 3602eb3f, Output: On/Off/Duration]: Turn output 2ca6f016-ce92-4f43-831b-71d1e3a83944 CH3 (Kasa 6) on for 20.0 seconds.
2022-07-28 18:17:48,476 - INFO - mycodo.controllers.controller_trigger_e0883381 - Deactivated in 120.7 ms
2022-07-28 18:17:54,483 - INFO - mycodo.controllers.controller_pid_ac158eb2 - Deactivated in 654.3 ms

If I set it to (equal to duration) then the trigger doesn’t initiate.

2022-07-28 18:27:26,154 - INFO - mycodo.controllers.controller_pid_ac158eb2 - PID Settings: Device ID: 0fa712e8-251a-4608-874c-bd71ddec1c9b, Measurement ID: f44f9e22-3ff4-4af2-ae60-57276e2ef108, Direction: raise, Period: 120.0, Setpoint: 85.0, Band: 0.0, Kp: 3.0, Ki: 0.25, Kd: 0.0, Integrator Min: -100.0, Integrator Max 100.0, Output Raise: b7fb07d4-91db-4c2b-81cc-2c329325699b, Output Raise Channel: 1, Output Raise Type: on_off, Output Raise Min On: 15.0, Output Raise Max On: 0.0, Output Raise Min Off: 20.0, Output Raise Always Min: False, Output Lower: None, Output Lower Channel: None, Output Lower Type: None, Output Lower Min On: 0.0, Output Lower Max On: 0.0, Output Lower Min Off: 0.0, Output Lower Always Min: False, Setpoint Tracking Type: , Setpoint Tracking ID:
2022-07-28 18:27:26,192 - INFO - mycodo.controllers.controller_pid_ac158eb2 - Activated in 2357.9 ms
2022-07-28 18:27:56,821 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - Latest (CH1, Unit: percent): 53.23610305786133 @ 2022-07-28 18:27:42
2022-07-28 18:27:56,829 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - PID: Input: 53.23610305786133, Output: P: 95.29169082641602, I: 7.940974235534668, D: 0.0, Out: 103.23266506195068
2022-07-28 18:27:59,648 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - Setpoint: 85.0 Output: 103.23266506195068 sec to output b7fb07d4-91db-4c2b-81cc-2c329325699b CH1
2022-07-28 18:29:56,689 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - Latest (CH1, Unit: percent): 52.82392501831055 @ 2022-07-28 18:29:42
2022-07-28 18:29:56,704 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - PID: Input: 52.82392501831055, Output: P: 96.52822494506836, I: 15.984992980957031, D: 0.0, Out: 112.51321792602539
2022-07-28 18:29:58,998 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - Setpoint: 85.0 Output: 112.51321792602539 sec to output b7fb07d4-91db-4c2b-81cc-2c329325699b CH1
2022-07-28 18:31:56,670 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - Latest (CH1, Unit: percent): 52.1759033203125 @ 2022-07-28 18:31:42
2022-07-28 18:31:56,676 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - PID: Input: 52.1759033203125, Output: P: 98.4722900390625, I: 24.191017150878906, D: 0.0, Out: 122.6633071899414
2022-07-28 18:31:59,064 - DEBUG - mycodo.controllers.controller_pid_ac158eb2 - Setpoint: 85.0 Output: 122.6633071899414 sec to output b7fb07d4-91db-4c2b-81cc-2c329325699b CH1
2022-07-28 18:32:14,054 - INFO - mycodo.controllers.controller_trigger_e0883381 - Deactivated in 128.1 ms
2022-07-28 18:32:23,567 - INFO - mycodo.controllers.controller_pid_ac158eb2 - Deactivated in 2418.8 ms

Why not simply set to to turn B on when A comes on and turn B off when A goes off? Isn’t that what you originally wanted?

Originally yes, but then I thought about the fact that I would like to give the UV light at least 10 seconds to sterilize the bacteria in the water before the hum and fan kicks in. Thus the delay

Can you explain the issue with more detail? It’s not apparent what the problem is. Explain what behavior you are expecting or desire, what behavior you’re observing, and why there is an issue with the observed and expected behaviors.

I’ve created a PID (UV - Hum) to turn on the UV light when the setpoint is below 85%
I want this light to be on for 10 seconds and then it must trigger Plug 3 & 4 which is the humidifier and the fan on the humidifier to turn on.

If I set the IF State to (equal to duration), (greater than duration) or (greater than or equal to) then the humidifier and fan comes on almost immediately, within 4 seconds, as per the logs. So it doesn’t wait for 10 seconds and then switch on. Even if I make it 30, 60 or 90 seconds it keeps turning on with 4 seconds of the UV light being switched on.

Basically want the UV light to clean the water first for 10 seconds and then trigger the humidifier and the fan to switch on for 40 seconds.

If you want a pause in the Action sequence, use the Pause Action.

Ok let me give that a shot

What you’re wanting to do would be more suited for a Conditional Function, rather than a PID with outputs linked by Actions. You are going to be very limited if you stick with your current setup.