added json api for timer config + unit tests