Automation won't stop running

hello .
I’ve set up a sprinklers system using blynk and Arduino mega+esp8266.
I have a switch for every one of my 5 sprinklers relays , and with manual triggering through the blynk app it works great . however , when I set up automation, even if I turn it off it keeps on running until the end of the cycle - without stopping . the problem is the same in schedule and in device state triggering .
it’s like the automation is a bullet in the chamber - after the trigger has been pulled you can’t stop the process - instead of an on/off conditioning.
another thing , there’s seem to be a problem to edit the automation itself . you cannot change between device activation to schedule activation and therefore need to set up a new auto all over.
also, there should be a way to turn the automation on off from the dashboard as a switch .

I would be grateful for some assistance ,

have a nice day

shmulik

1 Like

That’s not likely to happen unless you share much more information.

Pete.

Hi,
I have solved this problem like this :

  1. Virtual pin - AutoManualButtonMode
    2)Virtual pin- Automation

So, i made script function inside arduino.
About 10 second AutomationCheckFunction checking (1) and (2) value.
If AutoManualButtonMode turned off script will turn off output for blynk automation, otherwise script will allow use blynk automation.

Also, if AutoManualButtonMode ia off then you can use manual turning on output.

Sometime the Blynk server does not disable the output due server or wifi error. But since this system checks the virtualpin every 10 seconds, it will prevent any danger actions.

I hope I was able to understand.
Good luck
KamranScreenshot_20220810-080206~2

Posting your code might help others who are facing the same problem. Only if you are willing to. If it is for your business use then no need share it.

Web/mobile has such switch:

screenshot-blynk-qa.com-2022.08.10-18_01_45

Or you mean ability to turn off “triggered/running” automation?

Dear Dmitriy,
I think he wrote about this issue :
When automation is run that switch disappearing.

I don’t see the same screen than yours

Please check it when automation is run.
I am using android phone ( android 11, blynk app 1.5.4)

@Kamran do you have “wait” actions within your automation?

hello dimitry .
yes I do . I turn a sprinkler relay on , wait a few minuets (in automation), and the off . all 5 sprinklers one after the other .
I say again . even if I turn the automation OFF , the sprinklers will complete their cycle.

Yeah… It’s done on purpose. Technically it’s possible to stop the automation, however this is not a trivial task. So for now we skip it and leave as it is.

it is a serious design flaw , I’ve never seen an off switch that keeps on working - and for me it renders the entire blynk automation unsafe for home use .
I seriously advise you to change things , I was about to blynk so many things in my house - and now realizing its not there yet .

thank you kindly for your time

Why use automations for something like this?

Wouldn’t the time input widget and manual overrides be a much better solution?

Pete.

I’m confused here. If you turned off the automation - it won’t work. However if it is in “run” state, you can’t stop it. So the problem is that you can’t stop the running automation or is that stopped automation is still working?

Don’t give up, you can handle the problem with coding.
Inside Blynk app build two button
One of them always going to stay on for automation (AutoManualControl), second one for manual control.

Like this

//inside Setup 
   timer.setInterval(13000L, CheckAutomationControl ); 

// going to get value from BLYNK automation system
    BLYNK_WRITE(V1)
   {
     int pinValue = param.asInt();
     AutomationXnameValue=pinValue;
  } 
//going to get value if automation is off or on 
    BLYNK_WRITE(V2)
   {
     int pinValue = param.asInt();
     AutoManualButtonXnameValue=pinValue;
} 

//Manual control output
    BLYNK_WRITE(V3)
   {
     int pinValue = param.asInt();
     digitalWrite(youroutput , pinValue);
} 

CheckAutomationControl () 
{
 if(AutomationXnameValue==1&&AutoManualButtonXnameValue==1) 
   {
       //make your automation scene give output for your device 

   }else if(AutomationXnameValue==1&&AutoManualButtonXnameValue==0  || 
                  AutomationXnameValue==0&&AutoManualButtonXnameValue==1 ) 
             {
                 //code will turn off you automation scene
                  Code can turn off your device for safety reason 
             }


}

Screenshot_20220810-080206~2

Your idea definitely works.

But the concept of Automations was to eliminate coding and get the devices automated. But having to wait till the automation to complete is dangerous in certain conditions.

So in my books there should be a way to stop/pause or restrict the automation while it is still running.

In my case if you will switch off automanual button (named “Avto” on above photo) automation will off even is running state

The problem is that @shmulik hasnt provided any real information about how he’s configured the automation and how the resulting change in datastream is used in his sketch.

There are clearly solutions available, but it appears that @shmulik is looking for a magic wand to solve a problem that he’s not prepared to define fully.

Pete.

1 Like

I have an automation setup for my RGB strip.

It turns on at 10 and turns off at 12.30

While wait till is being executed, you cannot turn off the automation or control the device. There will be a animated loading icon displayed.

If you have virtual pin defined in the code and a button is attached then you can turn it off.

But here the concept of code less automation is not fulfilled.

There must be a over ride button to stop automation at any point of time.