Bloodevil / sony_camera_api

sony camera remote api
http://developer.sony.com/develop/cameras/
MIT License
244 stars 60 forks source link

Discovery confused by HTTP errors #50

Open mungewell opened 6 years ago

mungewell commented 6 years ago

Have AS100 connected to router and 'scan for cameras' fails, a bit of debug shows that the router is returning a error and this appears confuse the discovery mechanism.

$ python2 src/example/scan_for_cameras.py 
('192.168.1.1', 1122, 'HTTP/1.1 412 Precondition Failed\r\n\r\n')
Oh, ignoring Router

('192.168.1.100', 56963, 'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=1800\r\nEXT: \r\nLOCATION: http://192.168.1.100:64321/scalarwebapi_dd.xml\r\nSERVER: UPnP/1.0 SonyImagingDevice/1.0\r\nST: urn:schemas-sony-com:service:ScalarWebAPI:1\r\nUSN: uuid:00000000-0005-0010-8000-fcc2dec724bb::urn:schemas-sony-com:service:ScalarWebAPI:1\r\nX-AV-Physical-Unit-Info: pa=""; pl=;\r\nX-AV-Server-Info: av=5.0; hn=""; cn="Sony Corporation"; mn="SonyImagingDevice"; mv="1.0";\r\n\r\n')
['http://192.168.1.100:10000']
Available cameras: ['http://192.168.1.100:10000']

Checking Camera: http://192.168.1.100:10000
{'id': 1, 'result': [['getMethodTypes', 'getAvailableApiList', 'setShootMode', 'getShootMode', 'getSupportedShootMode', 'getAvailableShootMode', 'setSteadyMode', 'getSteadyMode', 'getSupportedSteadyMode', 'getAvailableSteadyMode', 'setMovieQuality', 'getMovieQuality', 'getSupportedMovieQuality', 'getAvailableMovieQuality', 'startLiveview', 'stopLiveview', 'actTakePicture', 'startMovieRec', 'stopMovieRec', 'startIntervalStillRec', 'stopIntervalStillRec', 'getStorageInformation', 'getApplicationInfo', 'getVersions', 'getEvent']]}