Hi nixietester,
I had the same issue and solved this by setting my variables in the sketch too. I had 3 booleans and wanted to switch relay depending on a measurement of distance (ulrasonic). Within specific ranges I needed the 3 variables to be true or false. As long as I had set the variables just in the cloud they became randomly true or false, just by setting them true/false depending of an if-statement they became what they should, no randomness any more.
But now I have a new issue: Changing the variables in code seems them not to switch my relais any more??? The "OnChange"-Method seems not to be called on programatic change of variable ![]()
Perhaps you have an idea?
Greetings
Michael