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 .
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.
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 .
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
}
}
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.
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.