Example #1
0
def close_all(request):
    ret = netcat.command("pl A1 extended_code_1 0 11")
    return HttpResponse("OK - %s" % ret)
Example #2
0
def cmd(request, cmd_line=None):
    if not re.match("^pl\s[apAP]\d{1,2}\s(on|off|On|Off)$", cmd_line):
        raise X10CommandNotSupportedError(cmd_line)
    ret = netcat.command(cmd_line)
    return HttpResponse("OK - %s" % ret)