Open kevink opened 4 years ago
Hey @kevink the arloq cameras are both a camera and a basestation. Can you send me the code you're using? I haven't added the ToggleCamera method from the python library to this library yet. I think you should just be able to call camera.On()
and camera.Off()
.
Going back through the code it looks like I have been getting stuck on IsCamera since the arloq fails that check so the cameras array never gets any entries even though I have 3 arloq cameras. The arloqs respond with DeviceTypeArloQ instead of DeviceTypeCamera. Should I just try forking and hacking the cost or should the library realize arloq is a camera? Thanks for the help here.
@kevink I think it should recognize arloq as both a camera and a basestation. There's probably a bug in the code that parses the GetDevices() call and sorts them into their respective arrays.
@kevink I just made a couple of changes to master. Check this out: https://github.com/jeffreydwalter/arlo-go/commit/a8b31e22a8d48c2540d20d374c5c3683b3cdcb85
IsCamera()
should now consider arloq cameras as cameras and basestations.
Getting this error github.com/jeffreydwalter/arlo-go@v0.0.0-20200420215645-6818ec9971f3/devices.go:109:9: syntax error: unexpected return, expecting expression
I think we need a colon after DeviceTypeArloQ not a comma
Sorry, made those changes real quick in vim...
I feel like we are making progress, here is a minimal running program. The program fails with Failed to turn on: failed to reconnect to event stream: failed to turn camera on: basestation not connected to event stream
Stepping into the code it seems like the lib does not know the camera is the base station. I tried hacking the parentid to be the camera but same error.
https://gist.github.com/kevink/fb7678d9b7745972de86c975c741a81a
@kevink can you paste the output of GetDevices for me. I'd like to see what the schema looks like.
Hi Jeffrey. I have been experimenting with the API trying to get it to arm and disarm my Arlo Q cameras. I saw a note on your python repo to pass the camera in as the base station but I am not sure what a call would look like. I tried setting the parentID to the same device but no luck.
Any tips on what a ToggleCamera func like your python one would look like in go?
Thanks for any pointers.
-Kevin