The Camera Tools for GoPro Heros app allows you control multiple GoPro® cameras. The command server is a part of the Camera Tools app and allows you to control the app and cameras via HTTP commands by sending JSON commands to the server. This document describes all available commands.
Note: On Android and iOS scripting works only while the app is running in foreground and while the screen in on.
This command gets general and status information of the camera(s).
Request:{ "command": "cameraStatus", "cameras": ["GP123456"] }
Note: Leave the "cameras" variable empty if you want to query the status of all cameras.
Response:{ "command": "cameraStatus", "cameras": [ { "name": "GP123456", "model": "Hero 8", "bluetooth_status": "connected", "wifi_ssid": "GP123456", "wifi_password": "password1234", "camera_recording": false, "live_streaming": "idle", "preset_id": 1234, "camera_mode": 1000, "camera_submode": 0, "recording_time": "00:14", "remaining_photos": 102, "remaining_space": 1000000, "remaining_recording_time": 1324324, "charger_attached": true, "battery_level": 99 } ] }
This command queries the currently connected WiFi name from the system. The result can later be read using the getCurrentWiFiSSID command.
Request:{ "command": "queryCurrentWiFiSSIDAsync" }Response:
{ "command": "queryCurrentWiFiSSIDAsync" }
This command returns the WiFi name from the last queryCurrentWiFiSSIDAsync query.
Request:{ "command": "getCurrentWiFiSSID" }Response:
{ "command": "getCurrentWiFiSSID", "ssid": "wifi_name", "message": "Optional error message.", "last_updated": "2020-01-20T14:11:25" }
This command connects to the WiFi network using the given credentials.
Request:{ "command": "connectToWiFiAsync", "ssid": "GP123456", "password": "password1234" }Response:
{ "command": "connectToWiFiAsync" }
This command connects to the given camera's WiFi network.
Request:{ "command": "connectToCameraWiFiAsync", "cameran": "GP123456" }Response:
{ "command": "connectToCameraWiFiAsync" }
This command loads the list of media files from the camera. The command requires an active WiFi connection to the camera (e.g. using connectToCameraWiFiAsync). The result can be later read with the getMediaList command.
Request:{ "command": "queryMediaListAsync", "camera": "GP123456" }Response:
{ "command": "queryMediaListAsync", "message": "Optional error message." }
This command gets the status of the last queryMediaListAsync call.
Request:{ "command": "getMediaQueryStatus" }Response:
{ "command": "getMediaQueryStatus", "status": "idle" }
This command returns the last media list for the given cameras queried by queryMediaListAsync command.
Request:{ "command": "getMediaList", "camera": "GP123456" }Response:
{ "command": "getMediaList", "camera": "GP123456", "media": [ { "filename": "image.jpg", "url": "http://10.5.5.9/DCIM/image.jpg", "date": "2020-01-20T14:11:25", "size": 123000023 } ] }
This command deletes media files from the camera. The command requires an active WiFi connection to the camera (e.g. using connectToCameraWiFiAsync).
Request:{ "command": "deleteMediaAsync", "camera": "GP123456", "media": [ "100GOPRO/GOPR0573.JPG", "100GOPRO/GOPR0574.JPG" ] }Response:
{ "command": "deleteMediaAsync", "message": "Optional error message." }
This command sends a specific command to the camera. The following commands are available:
{ "command": "sendCameraCommand", "cameras": ["GP123456"], "cameraCommand": "startRecording" }Response:
{ "command": "sendCameraCommand", "message": "Optional error message." }
This command returns a list of supported camera modes, sub-modes (pre Hero 8), and presets (Hero 8 and newer).
Request:{ "command": "getCameraModes", "camera": "GP123456" }Response:
{ "command": "getCameraModes", "camera": "GP123456", "modes": [ { "name": "VIDEO", "key": "1000", "submodes": [ { "name": "looping", "key": "1" } ], "presets": [ { "name": "Default", "key": "0" } ] } ] }
This command sets the camera mode group (e.g. video, photo, ...).
Request:{ "command": "setCameraMode", "camera": "GP123456", "mode_key": 1000 }Response:
{ "command": "setCameraMode", "camera": "GP123456", "message": "Optional error message." }
This command sets the camera sub-mode (e.g. looping, burst, ...). This command is only intended for Hero 7 and older models.
Request:{ "command": "setCameraSubMode", "camera": "GP123456", "submode_key": 0 }Response:
{ "command": "setCameraSubMode", "camera": "GP123456", "message": "Optional error message." }
This command sets the camera preset (e.g. standard, activity, ...). This command is only intended for Hero 8 and newer models.
Request:{ "command": "setCameraPreset", "camera": "GP123456", "preset_key": 0 }Response:
{ "command": "setCameraPreset", "camera": "GP123456", "message": "Optional error message." }
This command returns a list of all currently available settings for the given camera. Note: The available settings change dynamically.
Request:{ "command": "getCameraSettings", "camera": "GP123456" }Response:
{ "command": "getCameraSettings", "camera": "GP123456", "settings": [ { "name": "Resolution", "key": "22", "values": [ { "name": "1080p", "value": "0" }, { "name": "720p", "value": "1" } ] } ] }
This command changes settings on the camera.
Request:{ "command": "setCameraSetting", "camera": "GP123456", "setting_key": 22, "setting_value": 1 }Response:
{ "command": "setCameraSetting", "camera": "GP123456", "message": "Optional error message." }