keshavdv / unifi-cam-proxy

Enable non-Ubiquiti cameras to work with Unifi NVR
MIT License
1.65k stars 230 forks source link

Cannot establish connection to Unify Protect #113

Closed ocalvo closed 2 years ago

ocalvo commented 2 years ago

unifi-cam-proxy --host x.y.1.1 --cert client.pem --token rtsp -s rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_175k.mov

Traceback (most recent call last):
  File "/usr/local/bin/unifi-cam-proxy", line 10, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python2.7/site-packages/unifi/main.py", line 58, in main
    c.run()
  File "/home/pi/.local/lib/python2.7/site-packages/unifi/core.py", line 759, in run
    reconnect = self.process(ws, msg)
  File "/home/pi/.local/lib/python2.7/site-packages/unifi/core.py", line 666, in process
    if m["responseExpected"] == False and m["functionName"] not in [
KeyError: 'responseExpected'
ocalvo commented 2 years ago

I see in the log that I am using python2 instead of python3 How do I disable python2?

ocalvo commented 2 years ago

You need to issue this command in Raspberry PI OS:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
ocalvo commented 2 years ago

We should update the instructions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.