Skip to content
This repository was archived by the owner on Mar 2, 2025. It is now read-only.

Update for GoPro HERO 2018 model #34

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions GoProStream.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## 3. Run this script.
##
## Supported cameras:
## GoPro HERO5 (incl. Session), HERO4 (incl. Session), HERO+, HERO3+, HERO3, HERO2 w/ WiFi BacPac.
## GoPro HERO5 (incl. Session), HERO4 (incl. Session), HERO+, HERO3+, HERO3, HERO2 w/ WiFi BacPac, HERO 2018.
##
## That's all! When done, press CTRL+C to quit this application.
##
Expand Down Expand Up @@ -63,9 +63,11 @@ def gopro_live():
response_raw = urlopen('http://10.5.5.9/gp/gpControl').read().decode('utf-8')
jsondata=json.loads(response_raw)
response=jsondata["info"]["firmware_version"]
model=response.split('.')[0]
except http.client.BadStatusLine:
response = urlopen('http://10.5.5.9/camera/cv').read().decode('utf-8')
if "HD4" in response or "HD3.2" in response or "HD5" in response or "HX" in response or "HD6" in response:

if model=="HD4" or model=="HD3" or model=="HD5" or model=="H18" or model=="HX" or model=="HD6":
print("branch HD4")
print(jsondata["info"]["model_name"]+"\n"+jsondata["info"]["firmware_version"])
##
Expand All @@ -80,7 +82,7 @@ def gopro_live():
print("Recording on camera: " + str(RECORD))

## GoPro HERO4 Session needs status 31 to be greater or equal than 1 in order to start the live feed.
if "HX" in response:
if model=="HX" or model=="H18":
connectedStatus=False
while connectedStatus == False:
req=urlopen("http://10.5.5.9/gp/gpControl/status")
Expand Down Expand Up @@ -116,7 +118,7 @@ def gopro_live():
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
sleep(KEEP_ALIVE_PERIOD/1000)
else:
print("branch hero3"+response)
print("branch hero3 "+response)
if "Hero3" in response or "HERO3+" in response:
print("branch hero3")
PASSWORD=urlopen("http://10.5.5.9/bacpac/sd").read()
Expand Down