Insta360Develop / ProCameraApi

ProCameraApi decribes protocols to control Insta360 Pro, Insta360 Pro2, Insta360 Titan.
https://www.insta360.com
38 stars 11 forks source link

ProCameraApi - Connection Error #7

Open fgeorges56 opened 1 year ago

fgeorges56 commented 1 year ago

Hi,

I am trying to use the Pro2 camera with ProCameraApi, in Python. Unfortunately, I cannot communicate with the camera. It is turned on. I can ping the camera

ping 192.168.1.188 -p 20000
PATTERN: 0x200000
PING 192.168.1.188 (192.168.1.188) 56(84) bytes of data.
64 bytes from 192.168.1.188: icmp_seq=1 ttl=64 time=0.069 ms
64 bytes from 192.168.1.188: icmp_seq=2 ttl=64 time=0.077 ms

But I cannot connect to it via thre API.

import requests
url = "http://192.168.1.188:20000/osc/commands/execute"
params = {
        "name":"camera._connect",
        "parameters":{
            "hw_time":"MMDDhhmm[[CC]YY][.ss]",  # utc time
            "time_zone":"GTM time zone str"
        }
    }   
self.session.post(url, json=params)

requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.188', port=20000): Max retries exceeded with url: /osc/commands/execute (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb9b3f519f0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Do you have any idea ?

Tianweihaihaihai commented 1 year ago

Have you ever restart the camera? pls ensure no other tools are connected with camera.

fgeorges56 commented 1 year ago

I tried to restart the camera several times. I can ensure you no other device was connected.