Skip to content
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

Arlo Q & other no base station cameras #22

Open
kevink opened this issue Apr 12, 2020 · 8 comments
Open

Arlo Q & other no base station cameras #22

kevink opened this issue Apr 12, 2020 · 8 comments

Comments

@kevink
Copy link

kevink commented Apr 12, 2020

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

@jeffreydwalter
Copy link
Owner

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().

@kevink
Copy link
Author

kevink commented Apr 20, 2020

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.

@jeffreydwalter
Copy link
Owner

@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.

@jeffreydwalter
Copy link
Owner

@kevink I just made a couple of changes to master. Check this out: a8b31e2

IsCamera() should now consider arloq cameras as cameras and basestations.

@kevink
Copy link
Author

kevink commented Apr 20, 2020

Getting this error github.com/jeffreydwalter/[email protected]/devices.go:109:9: syntax error: unexpected return, expecting expression

I think we need a colon after DeviceTypeArloQ not a comma

@jeffreydwalter
Copy link
Owner

Sorry, made those changes real quick in vim...

@kevink
Copy link
Author

kevink commented Apr 21, 2020

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

@jeffreydwalter
Copy link
Owner

@kevink can you paste the output of GetDevices for me. I'd like to see what the schema looks like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants