Exemplo n.º 1
0
def slide():
    deviceId = request.GET.get("deviceId")
    slide = request.GET.get("slide")
    controls.linkToPi(cursor, "slide", deviceId, slide)
    controls.setSlide(cursor, connection, deviceId, slide)
    # print slide
    return "ok"
Exemplo n.º 2
0
def change():
    deviceId = request.GET.get("deviceId")
    newStatus = request.GET.get("newStatus")
    controls.linkToPi(cursor, "switch", deviceId, newStatus)
    controls.setState(cursor, connection, deviceId, newStatus)
    # print newStatus
    return "ok"