           'CMD': resetq,
            'VAL': 1,
            'XTIME': 0,
            'INTERVAL': 0
        }
        req.send(JSON.stringify(json))
        console.log(json)
        loadCommandQueue()
    }

    function savetofile() {
        var filename = prompt("Please enter a filename", "mycommandqueue1")
        if (filename == null) return
        var req = new XMLHttpRequest()
        req.open('POST', '/cmdq_file/')
        var json = {
            'ACT': 'save',
            'NAME': filename
        