Problem with scheduling


#1

I would like to signal this problem. When programming the timers, the program does not take into account whether the load status has changed in the meantime. For example, if a light at a certain time has to be switched off and in the meantime it has been manually switched off, the program will switch it on again.

Esp8266 dashboard web


#2

why will it switch ON again or did you mean to switch OFF again?


#3

the timer is programmed to turn it off. But if I turn it off first manually he does not know it and at the scheduled time it turns it off instead of doing nothing. I have already tried to set up various triggers. I state that the lights come on and off with buttons and not switches. How can I give the command: if it is already on, do nothing?


#4

but turning it OFF again won’t cause any problem.

you can do this by comparing the state if it is ON or OFF.


#5

no I think we understand each other. I ask the question in other words. In CAYENNE_IN how do I understand if the command comes from a button or scheduling. So I can write the code to correct the problem.


#6

or in other words: scheduling does the opposite of the state of the load, if it is switched on, it turns it off and if it is off it turns it on


#7

you can not differentiate whether it is from button or scheduling. there is a workaround that you can give a try.
Use two button: button A and button B. Button A is for manual turning ON/OFF while Button B is for scheduling. Then compare both the states in the code and do whatever you want.


#8

so if, for example, the timer is set to switch off if the load is on, it turns it off and if it is already off it does not do anything. this is the correct behavior. I can also correct it in my sketch but I need to know if the command from Cayenne comes to me from a button or scheduling. Sorry my horrible English


#9

ok I try now let’s see what happens. Thank you