-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't change many settings with Python SDK #648
Comments
At a high level this is because the current setting values do not currently allow any capabilities for the Photo Mode V2 setting. But maybe there is better solution for you here. What exactly are you trying to accomplish? It is probably better to select a Preset that will achieve your desired results than settings these settings manually. |
I understand. Trying to change every other setting with impact on this I could think of, didn't help too. Is there any other way to understand these interdependencies?
Actually I just want to switch between HDR Mode and Night Mode for Photos and maybe add a custom ISO limit for nightmode. Can you help me with that? |
The general procedure here is to switch between presets, and set the HDR setting in the desired preset. Here is an example: import asyncio
from pathlib import Path
from rich.console import Console
from open_gopro import Params, WirelessGoPro
from open_gopro.api.params import PresetGroup
from open_gopro.gopro_base import GoProBase
from open_gopro.logger import setup_logging
from open_gopro.proto.preset_status_pb2 import EnumPresetTitle
console = Console()
async def main() -> None:
logger = setup_logging(__name__, Path("demo.log"))
gopro: GoProBase | None = None
try:
async with WirelessGoPro(enable_wifi=False) as gopro:
assert gopro
# Turn off easy mode
assert (await gopro.ble_setting.camera_ux_mode.set(Params.CameraUxMode.PRO)).ok
# Get Presets and store desired preset IDs
photo_presets = [
preset
for preset in [
group
for group in (await gopro.ble_command.get_preset_status()).data.preset_group_array
if group.id == PresetGroup.PHOTO
][0].preset_array
]
photo_preset = [
preset for preset in photo_presets if preset.title_id == EnumPresetTitle.PRESET_TITLE_PHOTO
][0]
night_mode_preset = [
preset for preset in photo_presets if preset.title_id == EnumPresetTitle.PRESET_TITLE_NIGHT
][0]
console.print("Switching to photo preset")
assert (await gopro.ble_command.load_preset(preset=photo_preset.id)).ok
console.print("Setting HDR mode")
assert (await gopro.ble_setting.photo_output.set(Params.PhotoOutput.HDR)).ok
assert (await gopro.ble_command.set_shutter(shutter=Params.Toggle.ENABLE)).ok
console.print("Switching to night photo preset")
assert (await gopro.ble_command.load_preset(preset=night_mode_preset.id)).ok
assert (await gopro.ble_command.set_shutter(shutter=Params.Toggle.ENABLE)).ok
except Exception as e: # pylint: disable = broad-except
logger.error(repr(e))
if gopro:
await gopro.close()
if __name__ == "__main__":
asyncio.run(main()) The Open GoPro API does not currently support ISO (or any other Protune settings) |
Is your feature request related to a problem or use case? Please describe.
I've been trying to set up a GoPro Hero 13 to be managed by a RaspberryPi to remotely control the GoPro.
I'm failing to switch from HDR to Night Mode with the following code.
Other features like changing the lens mode don't work either.
returns
System
Host Python 3.9.18
GoPro HERO13 Black
Firmware v01.30.70
Lab with WAKE=2 active
I've been trying to follow the tutorials and demos, but after trying everything I could consider from my knowledge I'm still failing. Maybe I can get some help on this here?
The text was updated successfully, but these errors were encountered: