so basically the first time that I push the button nothing happens. Them if I hit it the second time it turns on. Them click again and it turns off. But them after some seconds it turns on again automatically. This is the behaviour looking/hearing the relay.

In the web/Android it behaves as a normal button. ON/OFF. Nothing happens after the delay/pulse.

I want my relay to be active for 10 seconds once pushed. Them it goes back to LOW.

I think that this is the general problem. We want our relay to work for 10 seconds only, but it works only when there is “1”, so we can check if it is “1” and then make a delay and then turn it off. We don’t have to check if it is “0” because if it is “0” it simply does not work. We also have to update the value of the dashboard.