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

Adaptation for Action Cams #22

Open
marcperuz opened this issue Mar 24, 2016 · 5 comments
Open

Adaptation for Action Cams #22

marcperuz opened this issue Mar 24, 2016 · 5 comments

Comments

@marcperuz
Copy link

Hello,

Thanks a lot for sharing this code!

I'm using it to control an Action Cam (X1000V). I've changed the pysony.py file, it's in my repo in the X1000V branch. It's still under progress, it may not work properly yet (especially the function to get files within a specified time rang, getFileInRange).

I've changed the default IP address in SonyAPI(), for Action Cams it seems to be :

http://192.168.122.1:8080

A problem I had is that the APIs to retrieve data from the camera where not listed in getAvailableApiList() (even in Contents Transfer function), so I could not use them with the test written in _cmd that checks if the method is listed by getAvailableApiList(). Thus I run the test only if the target is /camera. Not very elegant but it works...

I also changed the attributes of the SonyAPI class : on my version the attributes are the IP addres, the uri of the scheme and the uri of the storage source. I'd rather define the parameters used for the API only in the _cmd method, it seems to me somehow more flexible.

I added a few methods to access data more conveniently than with the original getContentList.

Regards,
Toufraita

@mungewell
Copy link
Contributor

We recently implemented the uPNP scheme for finding the camera's IP. Try running the 'src/example/dump_camera_capabilities.py' script. It should find the camera and dump a list of the API calls it handles. If you can upload it, it would be interesting to see what the camera handles.

@mungewell
Copy link
Contributor

also in '_read_device_definition()' the XML actually lists multiple endpoints, but we only return 'camera'.
https://github.com/toufraita/sony_camera_api/blob/master/src/pysony.py#L129

Probably need to figure out how to use all of them...

@marcperuz
Copy link
Author

I ran dump_camera_capabilities, but it doesn't return anything... Yet it does work when I specify the camera IP address.

@mungewell
Copy link
Contributor

splitting out bug #23 for uPNP not finding camera.

@Bloodevil
Copy link
Owner

you can use the custom uri like

camera = pysony.SonyAPI(QX_ADDR='http://192.168.122.1:8080')

after connect the camera, then you can get a list of support api.

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

3 participants