02-01-2025, 01:30 AM
The KC868 (almost) makes a great PLC for home automation, but one thing I can't find is any ability to chain IFTTT rules. The rule table has "IF NUM" and "THEN NUM" entries which look like they would allow this but they're all set to zero and can't be edited.
To explain what I mean here, it's the ability to say IF <rule 1 condition met> THEN <goto rule 2>, where <rule 2> allows testing further conditions. Let's say you want to use the device as an alarm controller, so you want to test:
The IFTTT rules only allow OR or AND but not complex expressions like the above, so it'd have to be done as:
Another example is for an aquarium pump controller where the IFTTT is almost perfect except for the ability to chain rules, I can sense inputs, add timing delays, run the pump as an output, but I need the ability to connect multiple rules to do that similar to the alarm.
Is there any way to chain rules in this manner, and if not could it be added?
To explain what I mean here, it's the ability to say IF <rule 1 condition met> THEN <goto rule 2>, where <rule 2> allows testing further conditions. Let's say you want to use the device as an alarm controller, so you want to test:
Code:
IF ( motion_sensor1 OR motion_sensor2 OR motions_sensor3 ) AND is_armed THEN siren
Code:
rule1: IF ( motion_sensor1 OR motion_sensor2 OR motions_sensor3 ) THEN rule2
rule2: IF ( rule1 AND is_armed ) THEN siren_on + rule3
rule3: IF ( rule2 ) THEN delay 10 minutes + siren_off
Is there any way to chain rules in this manner, and if not could it be added?