How to change SimpleTimer timer interval remotely?

Code you sent works fine! I also made replacements you suggested:

String cmd = param[0].asStr();  //eg. 'int60'
String kwd = "int";             //keyword


    if (cmd.length() > kwd.length() && cmd.substring(0,kwd.length()).equalsIgnoreCase(kwd) && cmd.substring(kwd.length()).toInt() > 0)
    {
       timer.deleteTimer(timerID);
       timerID = timer.setInterval(cmd.substring(kwd.length()).toInt() *  1000L, notifyUptime);
    }

Have a nice day!

1 Like