keshavdv / unifi-cam-proxy

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

Unable to start unify-cam-proxy on a Unifi Cloud Key Gen2 Plus #209

Closed xxyton closed 2 years ago

xxyton commented 2 years ago

I am trying to start unify-cam-proxy on a Unifi Cloud Key Gen2 Plus. But the following error appears: ~# unifi-cam-proxy --host 192.168.178.20 --mac 6B:D1:91:39:95:5C --cert /client.pem --token 6GEEE0XQwhgzyOY5UjJjuGoyBPix2Tbn rtsp -s rtsp://192.168.178.26:8554/cam Traceback (most recent call last): File "/usr/local/bin/unifi-cam-proxy", line 7, in from unifi.main import main File "/usr/local/lib/python2.7/dist-packages/unifi/main.py", line 7, in from unifi.cams.hikvision import HikvisionCam ImportError: No module named cams.hikvision

keshavdv commented 2 years ago

From the python2.7 in the log, I think you're using the wrong version of python. Please use the docker image or try again using python 3.

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.

xxyton commented 2 years ago

When trying to install directly via pip3:

`root@UCKP:~# pip3 install unifi-cam-proxy Collecting unifi-cam-proxy Using cached https://files.pythonhosted.org/packages/8c/01/0ea751bf33959dc5353679656578bcda79d89edf8ad201fb7541984eddb8/unifi-cam-proxy-0.0.2.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-9lkd_9i4/unifi-cam-proxy/setup.py", line 11, in long_description = open('README.md').read(), FileNotFoundError: [Errno 2] No such file or directory: 'README.md'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-9lkd_9i4/unifi-cam-proxy/ `

After downloading archive and installing from local archive: root@UCKP:~/unifi-cam-proxy-0.0.2# pip3 install . Processing /root/unifi-cam-proxy-0.0.2 Collecting coloredlogs (from unifi-cam-proxy==0.0.2) Using cached https://files.pythonhosted.org/packages/a7/06/3d6badcf13db419e25b07041d9c7b4a2c331d3f4e7134445ec5df57714cd/coloredlogs-15.0.1-py2.py3-none-any.whl Collecting flvlib (from unifi-cam-proxy==0.0.2) Using cached https://files.pythonhosted.org/packages/d9/7f/e0d55d3262a6ec04f77352d5a879fe2360ef4bc47d2cb433fda61f87ec01/flvlib-0.1.13.tar.bz2 Collecting hikvisionapi (from unifi-cam-proxy==0.0.2) Using cached https://files.pythonhosted.org/packages/08/a2/b84a6b6c2c94a7f3a5ff7a90c5aac175ec04fcf714f44bab22cbbf8798c8/hikvisionapi-0.3.2-py3-none-any.whl Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from unifi-cam-proxy==0.0.2) Collecting websocket-client (from unifi-cam-proxy==0.0.2) Using cached https://files.pythonhosted.org/packages/f7/0c/d52a2a63512a613817846d430d16a8fbe5ea56dd889e89c68facf6b91cb6/websocket_client-0.59.0-py2.py3-none-any.whl Collecting xmltodict (from unifi-cam-proxy==0.0.2) Downloading https://files.pythonhosted.org/packages/94/db/fd0326e331726f07ff7f40675cd86aa804bfd2e5016c727fa761c934990e/xmltodict-0.13.0-py2.py3-none-any.whl Collecting humanfriendly>=9.1 (from coloredlogs->unifi-cam-proxy==0.0.2) Using cached https://files.pythonhosted.org/packages/f0/0f/310fb31e39e2d734ccaa2c0fb981ee41f7bd5056ce9bc29b2248bd569169/humanfriendly-10.0-py2.py3-none-any.whl Collecting httpx (from hikvisionapi->unifi-cam-proxy==0.0.2) Could not find a version that satisfies the requirement httpx (from hikvisionapi->unifi-cam-proxy==0.0.2) (from versions: ) No matching distribution found for httpx (from hikvisionapi->unifi-cam-proxy==0.0.2)

How can I install 'httpx'? Why does it not resolve automatically?

xxyton commented 2 years ago

I managed to install httpx from source. But another error appears with python3: root@UCKP:~# unifi-cam-proxy --host 192.168.178.20 --mac 6B:D1:91:39:95:5C --cert /client.pem --token 6GEEE0XQwhgzyOY5UjJjuGoyBPix2Tbn rtsp -s rtsp://192.168.178.26:8554/cam Traceback (most recent call last): File "/usr/local/bin/unifi-cam-proxy", line 7, in from unifi.main import main File "/usr/local/lib/python3.7/dist-packages/unifi/main.py", line 7, in from unifi.cams.hikvision import HikvisionCam ModuleNotFoundError: No module named 'unifi.cams'

xxyton commented 2 years ago

I solved it by GIT cloning unify-cam-proxy repo and than copying files manually: root@UCKP:~/unifi-cam-proxy# cp unifi /usr/local/lib/python3.7/dist-packages/ -R

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.