//[ValidateAntiForgeryToken]
        public IActionResult Connected(String devName, bool state)
        {
            IAscomDriver device = createDevice(devName);

            device.Connected = state;
            return(new RascomResult(device.Connected).JsonResult);
        }
        //[ValidateAntiForgeryToken]
        public IActionResult CommandBlind(string devName, string command, bool raw)
        {
            IAscomDriver device = null;

            try
            {
                device = createDevice(devName);
                device.CommandBlind(command, raw);
            }
            catch (Exception ex) { return(new JsonResult(ex)); }
            return(new JsonResult(true));
        }
        //[ValidateAntiForgeryToken]
        public IActionResult CommandString(string devName, string cmd, bool raw)
        {
            String       result = "";
            IAscomDriver device = null;

            try
            {
                device = createDevice(devName);
                result = device.CommandString(cmd, raw);
            }
            catch (Exception ex) { return(new JsonResult(ex)); }
            return(new JsonResult(result));
        }
        //[ValidateAntiForgeryToken]
        public IActionResult CommandBool(string devName, string cmd, bool raw)
        {
            bool         result = false;
            IAscomDriver device = null;

            try
            {
                device = createDevice(devName);
                result = device.CommandBool(cmd, raw);
            }
            catch (Exception ex) { return(new RascomResult(ex).JsonResult); }
            return(new RascomResult(result).JsonResult);
        }
        //[ValidateAntiForgeryToken]
        public IActionResult Action(string devName, string actionName, string actionParameters)
        {
            String       result = null;
            IAscomDriver device = default(IAscomDriver);

            try
            {
                device = createDevice(devName);
                result = device.Action(actionName, actionParameters);
            }
            catch (Exception ex) { return(new RascomResult(ex).JsonResult); }
            return(new RascomResult(result).JsonResult);
        }