Hola Martin,
Have you seen this button working? Here you can test it on my APP: https://iiot-v2.glideapp.io
To know why I used it and how it works, take a look at my thread about IIoT please.
Once you have seen it, I think you will understand my next explanation better. Please advise me when you are ready.
Saludos @plusmartin