Beispiel #1
0
    elif command == 'set-mode' and mode == 'garten':
        device = getDeviceFromName("Home", devices)
        arlo.CustomMode(device, "mode5")  # Garten_Alle
        device = getDeviceFromName("Bridge_AZMichael", devices)
        arlo.CustomMode(device, "mode4")  # Garten
        device = getDeviceFromName("Bridge_AZSabine", devices)
        arlo.Arm(device)

    elif command == 'set-mode' and mode == 'garten_hinten':
        device = getDeviceFromName("Home", devices)
        arlo.CustomMode(device, "mode4")  # Garten_2
        device = getDeviceFromName("Bridge_AZMichael", devices)
        arlo.Disarm(device)
        device = getDeviceFromName("Bridge_AZSabine", devices)
        arlo.Arm(device)

    elif command == 'set-brightness':
        camera = getDeviceFromName(devicename, devices)
        if camera == '':
            raise Exception("Camera " + devicename + " not found")
        arlo.AdjustBrightness(basestation, camera, int(brightness))

    else:
        # Should not happen ...
        print("This should not happen")

    # Logout of Arlo session
    arlo.Logout()

except Exception as e:
    print(e)
Beispiel #2
0
    # Instantiating the Arlo object automatically calls Login(), which returns an oAuth token that gets cached.
    # Subsequent successful calls to login will update the oAuth token.
    arlo = Arlo(USERNAME, PASSWORD)
    # At this point you're logged into Arlo.

    # Get the list of devices and filter on device type to only get the basestation.
    # This will return an array which includes all of the basestation's associated metadata.
    basestations = arlo.GetDevices('basestation')

    # Get the list of devices and filter on device type to only get the camera.
    # This will return an array which includes all of the camera's associated metadata.
    cameras = arlo.GetDevices('camera')

    # Set camera brightness to 0%.
    #arlo.AdjustBrightness(basestations[0], cameras[0] -2)

    # Set camera brightness to 25%.
    #arlo.AdjustBrightness(basestations[0], cameras[0], -1)

    # Set camera brightness to 50%.
    arlo.AdjustBrightness(basestations[0], cameras[0], 0)

    # Set camera brightness to 75%.
    #arlo.AdjustBrightness(basestations[0], cameras[0], 1)

    # Set camera brightness to 100%.
    #arlo.AdjustBrightness(basestations[0], cameras[0], 2)

except Exception as e:
    print(e)