Code Monkey home page Code Monkey logo

goprocontrol's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goprocontrol's Issues

Having trouble with GoPro Hero7 and ESP8266

I saw this comment "ESP8266 can't get the BSSID of the camera. So if you want to turn it on you need to manually pass it to the constructor, see the docs" but how do I get it to work and how to get the BSSID form the camera and where to put that information.

Hero 8 requires BT connection to enable WiFi.

My goal is to control a fleet of Hero 8 Black cameras with more reliability and control than the GoPro smart remote. Right now I'm just trying to control a single camera.

I've changed the GoPro's band to 2.4GHz, and entered the camera name and password in the GOPRO_SSID and GOPRO_PASS fields in secrets.h respectively.

With the GoProControl.ino example, when connecting via b command, the connection times out and I get a Connection failed with status: 6 message.

I've tried on both an ESP8266 module as well as an ESP32 module.

Has this library been tested on a Hero 8, or just speculated working (based on the API being compatible with the Hero 8)?

Any help debugging this would be appreciated. Thanks!

Problems trying to connect to MAX...

Hi,
Thanks for this library, I had written a remote for my Gopro MAX but stopped using it for a while and now it does not connect anymore, it always fail with code 6 or 5. Thought I try your example but got stuck in the same place, it just won't connect... SSID and PWD are correct, but the camera just ignores any connection. Thought I ask if maybe you know of any new trick needed by Gopro. I suspect you would need to go through Bluetooth first...

Thanks a lot!

Cant conect my camera

Cant connect to my camera - always the same error
After C command -
Attempting to connect to SSID: ALLGP001
using password: bike7632
....................
Connection failed with status: 6

My Constants.h -

#ifndef CONSTANTS_H
#define CONSTANTS_H

// replace the following:
#define GOPRO_SSID "ALLGP001"
#define GOPRO_PASS "bike7632"
#define CAMERA HERO5 // your HERO model
uint8_t gopro_mac_address[6]= {246,221,158,229,124,140}; // the MAC address of your GoPro

#endif

Board
Node MCU v3

What can I do ?
Regards - Robert

GoPro8 connection failed

Hi, using your latest lib with a gopro8 I'm getting "Connection failed with status: 6" and after pressing "b" for some more time "Connection failed with status: 1"
I couldnt find hints about this errors in the documentation. Could you help me to find a solution?

Format needed for Secrets.h

Hi
I am very new to Github, Arduino and WiFi. Sorry in advance for some some of the stupid questions I may be asking. . . . .

I make YouTubes with up to 3 GoPros (1xHERO6 and 2xHERO8). See channel https://www.youtube.com/channel/UCyqo4XTQlz57-ESk47V6tCg The cameras must shoot video for 3 seconds, wait 57 seconds and then repeat cycle. I manage fine if there is only one camera in front window (using a hacked Yoctop remote control). But when there are also cameras on the side windows, they often go out of sync and record for 57 seconds - that chews up precious SD card space. Therefore I need to address commands individually to each of the cameras, according to their status. I believe that I can do it with an ESP32 and a lot of learning from guys like you on Github. Thank you in advance.

My first problem is with Secrets.h:

// replace the following:
#define GOPRO_1_SSID "YOUR_CAMERA_NAME"
#define GOPRO_1_PASS "YOUR_CAMERA_PASS"

// same for the second camera:
#define GOPRO_2_SSID "YOUR_CAMERA_NAME"
#define GOPRO_2_PASS "YOUR_CAMERA_PASS"

If I look at GoPro Quik on my Android, I see for one of the Hero8's
Name: GP53089464
Password: C>T-BNB-p4Q
(I scrambled them slightly, but correct length and type of characters)

Is it these names and passwords? Must it look like this?
#define GOPRO_1_SSID "GP53089464"
#define GOPRO_1_PASS "C>T-BNB-p4Q"

Nothing is showing on serial monitor by using wemos d1mini

I have followed all the steps but nothing is showing on wemos d1mini's serial monitor. When I type anything it says, " connect the camera first". The serial monitor is not showing 'connecting to the wifi' even when resetting the d1 mini.

Compilation error: 'HERO3' was not declared in this scope

Hello,

First off thank you for taking the time to create this library. I am though running into an issue with Verifying the code. So I went back to just the basic library and tried the example (GoProControl.ino) and get the same error "Compilation error: 'HERO3' was not declared in this scope" I've tried changing #define GOPRO_SSID "HERO3" in secrets.h but that didn't work. What am I missing it's probably something simple.

Sleep Command

I've been trying out the GoProControl example, however I noticed that when you issue the turn off command the keep alive ping fails and can't connect again.

From reading Konrad's command list, it looks like it should just sleep:

Power Off: http://10.5.5.9/gp/gpControl/command/system/sleep

I would've thought it would continue to accept the keep alive pings, is this expected behaviour?

setTimeLapseInterval error ?

Hello ,
Calling setTimeLapseInterval return a error when I call it (wrong parameter).
I think it is necessary to replace OR operations by AND operations in this line:

if (i_option != 0 || i_option != 1 || i_option != 5 || i_option != 10 || i_option != 30 || i_option != 60)

When I change this line in :
if (i_option != 0 && i_option != 1 && i_option != 5 && i_option != 10 && i_option != 30 && i_option != 60)
it works OK.
Do you think it is ok ?
Roberto

stringSearch and stringCut

Hello !
I just want to know what are those functions in your library :
stringSearch()
stringCut()

I don't find any informations about that !

Thank you @aster94 !

Damien

can't connect second times.

I using esp8266 for first times I can connect and pair with gopro hero7, control perfect at the first times connect, but when I power cycle esp then send "b", esp can connect to wifi but when send command the connect is lost. Plz help me can make 1 remote control gopro just start and stop record.

lib with another bluetooth module

Hi, is there a way to use another bluetooth module instead of the ESP32 with your libary?

BLE is not planned yet because in the ESP32 core is not so well supported or anyway bug-free

getstatus and getmedialist gopro Hero3

Hi, I'm facing a problem.

I try to get status and media list on my gopro hero3 with ESP8266.

I tried your arduino json gopro and for both it return "EmptyInput".

On Konrad documentation, it says that for hero3 the status is given in bytes returned by http://10.5.5.9/camera/sx?t=PASSWORD
I can obtain a file named sx when i do that in my browser, and this file contain bytes for decoding the status.
Here the library looks only to a json, so i think it cant work for my hero3 (with status).

for the media list, your exemple arduinojsongopro should work because for hero3 the media list is a json.

So I think "getstatus" and "getmedialist" are not returning the values returned by http://10.5.5.9/camera/sx?t=PASSWORD and http://10.5.5.9:8080/gp/gpMediaList

How can I fix that ?

Thank you ! :)

I am trying, but I cant connect the camera

Hi Aster,

First I have to thank you for your amazing working on this project,

I am not a very experienced arduino programmer and I am trying to connect a ESP8266 NodeMcu board to my Gopro Hero6 Black.

I followed all your instructions installing the library on my Arduino IDE, and I tried to use this example, but I can not make it works, and I have no idea why.

I just copy and paste the code, changed the Secrets.h with my camera SSID and Password, and changed the beginning of the code "CAMERA" for "HERO6". After that, I uploaded the code in the board, and until now, everything is ok. Then, I open the Serial Monitor, and try to use the commands in the code ("b", "c", etc), but nothing happen, and nothing appears in the Serial Monitor. In the camera not happens as well.

Any idea what I am doing wrong?

Thank you very much

Hero7 Silver

Just found this library, and loved the concept. However, installed the GoProControl.ino example and tried to make it work. I updated the Secrets.h file, but was not able to connect to the Hero7 Silver at all. KonradIT mentions that the calls work with the Hero7 Silver https://github.com/KonradIT/goprowifihack/tree/master/HERO7 -so not sure what I'm doing wrong. Any help would be appreciated.

MultiCam issue with 2x GoPro HERO7 Black

Hi,
I'm trying to control multiple GoPro HERO7 cameras simultaneously. When launching the MultiCam example on my Arduino Wifi Rev2 it connects to the first listed camera but gives an error for the second camera: "Connection failed with status: 6".
When I switch the order of the 2 cameras it again only connects to the first camera and pops up the same error for the second camera.
Do you have an idea on what could be causing this problem?

Connection failed: New GoPro Firmware ?

Hello,

tried to connect with GoPro 8 camera. Code is running with Arduino and PlatformIO IDE. Feedback with example code is "Connection failed with status: 6". GoPro Quick App is working fine to control GoPro. Maybe there is a new way to connect to camera because after switch of bluetooth on my mobile phone, can not connect to GoPro with GoPro Quick App. Looks like that GoPro is only able to do Wifi pairing after sending specific bluetooth command.

Greetings
Max

Adding GoPro zoom function

Hi. My apologies. Not an issue but didn't know how to make a suggestion and I'm not familiar much with forking... (there's a joke there I'm sure.. LOL...)... Anyway, I have a GP Hero 7 and added a new function to my code to enable the digital zoom feature in Hero 7's and above. Here's the code (not perfect) but it works:

GoProControl.h added:
int zoomPhoto(const int zoomPct);

GoProControl.cpp added:
`int GoProControl::zoomPhoto(int zoomPct)
{
//Reference: https://github.com/KonradIT/goprowifihack/blob/master/HERO7/HERO7-Commands.md
//http://10.5.5.9/gp/gpControl/command/digital_zoom?range_pcnt=[PERCENTAGE FROM 0 to 100]

char pctAsStr[6];
itoa(zoomPct, pctAsStr, 10);

makeRequest(_request, "/gp/gpControl/command/digital_zoom?range_pcnt=", (char *)pctAsStr);
return handleHTTPRequest(_request);

}
`

support Hero 8

Hello, is it planned to add support for Hero 8 camera and when if so? Thanks.

Stuck on line 10 with a HERO8

I have this as line 10 of GoProControl.ino :
#define CAMERA HERO8 // Change here for your camera

And then the first error in the compiler is:
C:\Users\Gerald\Documents\Arduino\GoProControl\GoProControl.ino:10:16: error: 'HERO8' was not declared in this scope
#define CAMERA HERO8 // Change here for your camera

I tried HERO6 as well, but still similar error message

Obviously I need to learn some more very basic things . . . . . .

add command to download images

Could have additional options, like
a) last image
b) first image
c) all images
d) specific images
e) direct transfer to google/AWS/one/... cloud
f) direct transfer to ftp/smb/....

Another Connection issue

Hey,

Trying to get this to work, Got it working on my 4s but my 7s won't connect. I keep getting failed With status 6. I can connect to it from my raspberry pi and laptop, but not his library.

Any suggestions?

Problem compiling GoProControl_Example

Hi,
First off, thanks for your support of the Arduino community!
I am having an unexpected problem simply compiling the example code (GoProControl). I am getting an "invalid conversion" error at the call to the 'GoProControl gp(GOPRO_SSID, GOPRO_PASS, CAMERA);' line. The error message(s) are shown below.

For context, this is using IDE version 1.8.13 on a Mac with an MKR 1010 WiFi. The MKR board otherwise works fine (including WiFi features) with other code. Some observations:

  • I am using the current version of the GoProControl library (1.2.0), although I get similar errors with older versions of the library.

  • I tried directly entering the SSID, and password into the main code (rather than using Secrets.h) but get errors for the same line (although the errors change) I.e., GoProControl gp("GP24907984", "cHS-Yy9-9Gv", HERO8);

Any thoughts on what the problem (or solution) is for this conversion problem?
Thanks!

Error Messages:

Arduino: 1.8.13 (Mac OS X), Board: "Arduino MKR WiFi 1010"
GoProControl_Example:16:47: error: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
GoProControl gp(GOPRO_SSID, GOPRO_PASS, CAMERA);
^
In file included from /Users/lacomj/Documents/Arduino/GoProControl_Example/GoProControl_Example.ino:7:0:
/Users/lacomj/Documents/Arduino/libraries/GoProControl/src/GoProControl.h:76:3: note: initializing argument 3 of 'GoProControl::GoProControl(const char*, const char*, uint8_t, const uint8_t*, const char*)'
GoProControl(const char ssid,
^~~~~~~~~~~~
exit status 1
invalid conversion from 'const char
' to 'uint8_t {aka unsigned char}' [-fpermissive]
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Getting "Connection lost" quite a lot

Hello guys, I was giving a try to the library, initially i was able to execute all the commands and then from one day to the other without modifying anything I am getting a lot of connection lost, I am using an ESP32 and what I do notice is that if I connect to it via simple Wifi.begin() it does connect but any of the commands respond, they all get "rejected" or not answered, I am using a Hero7 black, if I connect my computer to the camera I am able to access the different APIs, but not on the esp32, I was wondering if there are new headers or something new, I even tested with a more simple script that just pulls the status but on the esp32 seems not to work consistently.

#include <WiFi.h>
#include <HTTPClient.h>

const char* ssid = "Unknown HERO7 Black";
const char* password = "snv-GRX";

String serverName = "http://10.5.5.9:8080/gp/gpMediaList";

unsigned long timerDelay = 7000;

void setup() {
  Serial.begin(115200); 

  WiFi.begin(ssid, password);
  Serial.println("Connecting");
  while(WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.print("Connected to WiFi network with IP Address: ");
  Serial.println(WiFi.localIP());

}

void loop() {
  if ((millis() - lastTime) > timerDelay) {
    if(WiFi.status()== WL_CONNECTED){
      HTTPClient http;

      String serverPath = serverName;
     
      http.begin(serverPath.c_str());

      int httpResponseCode = http.GET();
      
      if (httpResponseCode>0) {
        Serial.print("HTTP Response code: ");
        Serial.println(httpResponseCode);
        String payload = http.getString();
        Serial.println(payload);
      }
      else {
        Serial.print("Error code: ");
        Serial.println(httpResponseCode);
      }
      // Free resources
      http.end();
    }
    else {
      Serial.println("WiFi Disconnected");
    }
    lastTime = millis();
  }
}

fixing last things

@KonradIT

let's discuss here the next steps
I just made two commit. In the first I moved all the defines in a new files, this way we have code and settings separated. I finally added support for esp32 but i also removed the support for not-esp boards. I decided to do so for many reason: first of all a esp board cost a few euros, there is no need to use AT commands and another MCU, second because the library for the AT commands doesn't support http request so with #5 and to be more precise with this changes compatibility has been lost. I may add it in future if i would ever need it

Then i made a commit for formatting, since we both use VSCode i think it would be a problem to mantain the repo with the same code style

To do list

  • get status
  • parse status not planned anymore
  • solve the todo in the cpp
  • make gopro_mac_address field optional
  • add a page for the possibles camera/video resolution/frame rates
  • make the lib run on all the boards
  • simplify the udp request
  • periodic keep alive on background thread
  • use enum instead of #define for the settings
  • make a nice table for the settings
  • some settings are duplicates, remove them

Before pubblishing

  • check keywords.txt
  • clean readme
  • delete Constants.h

unfortunately even if i like the Constants.h.example them are not very in the arduino philosophy of the keep it simple so when the lib would be ready i am going to delete them

by the way this won't be never executed: https://github.com/aster94/GoProControl/blob/master/src/GoProControl.cpp#L164 where did you thought it should go? I know a very little about http request ๐Ÿ˜…

No BSSID, unable to turn on the camera

Hi,

Trying to run your GoProControl example on an ESP32 with a GoPro Hero5 Session. It seems to work, except for being able to turn on the camera by sending a 'T' over the serial monitor. I get this response back:

Not connected
Attempting to connect to SSID: GP56217423
using password: action2315
..................
Connected to GoPro
Keeping connection alive
Client connected
Request: GPHD:0:0:2:0.000000

Keeping connection alive

Camera connected
No BSSID, unable to turn on the camera

To me it seems like the MAC address is not read? I can see that it is set to NULL in the constructor, but where is it changed or read from the camera?

Issue compiling RTLapseCAM

I am fairly new to coding etc. Was just hoping to get this old gopro4 silver to take timelapse of my resin printers.

When I try and compile the sketch in Arduino IDE 2.0.3 I get the following error

Compilation error: 'HERO4' was not declared in this scope

Pointing to this line:

#define CAMERA HERO4 // Change here for your camera
//from my Hero 7: 06 41 69 EF 79 94
byte remote_MAC_ADD[] = { 0x06, 0x41, 0x69, 0xEF, 0x79, 0x94 };
const char* board = "RTLapseCAM"; //ESP Board Name

Also, since I am worried it will come up.....do I need to find my cameras mac address and also insert that? According to the gopro memory card the mac add is "d4d919c91faa"

Issue with connecting/shooting photos after 1st time ESP8266 & Hero 7

Hi. First off, thank you for the great effort put into creating this library! Have a challenge with failed connections after the first attempt. I can only get the ESP to trigger picture captures after resetting the GoPro WiFi connection and rebooting it. The first time in, I can connect and take photos. After this, it fails. Regardless of power cycling the ESP or the GoPro Below is the code I am using, and further down is the Serial output:

#include <GoProControl.h>
#include "Secrets.h"

/*
  Control your GoPro with the Serial Monitor
  edit the file Secrets.h with your camera netword name and password
  CAMERA could be: HERO3, HERO4, HERO5, HERO6, HERO7, FUSION, HERO8, MAX
*/

#define CAMERA HERO7 // Change here for your camera
//from my Hero 7:  06 41 69 EF 79 94
byte remote_MAC_ADD[] = { 0x06, 0x41, 0x69, 0xEF, 0x79, 0x94 };
const char* board = "NodeMCU";   //ESP Board Name


GoProControl gp(GOPRO_SSID, GOPRO_PASS, CAMERA, remote_MAC_ADD, board);

void setup()
{
  gp.enableDebug(&Serial);

  while (!gp.isConnected())
  {
    gp.begin();
  }
  
  for (int i=0; i<5; i++)
  {
    Serial.println("Attempting a shot.");
    gp.shoot();
    gp.keepAlive(); // not needed on HERO3
    delay(1000);
  }  
}

void loop()
{
  Serial.println("In Main Loop. Keep alive.");
  gp.keepAlive(); // not needed on HERO3 
}

Attempting to connect to SSID: "GP50039006"
Using password: "kS9-mMx-Rvx"
.......................................................
Connected to GoPro
Attempting a shot.
Connection lost
Attempting a shot.
Connect the camera first
Attempting a shot.
Connect the camera first
Attempting a shot.
Connect the camera first..

Unable to connect after reset ESP8266

Hi, I am having an issue similar to here

The camera and ESP connect together correctly, until the ESP is reset. It then fails on _wifi_client.connect().
To get the connection working again, the camera WiFi service must be restarted.

Is there any solution to this? I have tried disconnecting wifi and then restarting the ESP8266 but this was not successful.

Thanks!

Other similar issues:
esp8266/Arduino#5552
KonradIT/goprowifihack#193

Trying to get the media list

Hello,
Congratulations for your works about gopro control, it works ok for me and I had a lot of fun with it !

But I would need a way to ensure that the pictures are really made when taking a photo. So I tried to modify the code to get the media list using this command : http://10.5.5.9:8080/gp/gpMediaList
I would parse the response to count the pictures.

Unfortunatly, my knowledge about arduino libraries is too weak to do the job , I didn't even succeed in compiling the modified library ( "multiple definition" errors ) ... 8-((

In addition, I am not sure my idea would works :
_request = "http://10.5.5.9:8080/gp/gpMediaList" ;
String Response=sendHTTPRequest(_request);
Would it be possible to do something like this ?

Many thanks for your help .
Roberto

HERO8 usage with ESP8266

Hello, i have a NodeMCU ESP8266.
I tried to upload the sketch but i cant':

-find the baud rate (i tried with 74880)

Could you tell me if you tried it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.