Unifi Protect Dream Machine Pro
See original GitHub issueHi,
thanks for the that nice piece of software.
I have some trouble to adopt a camera, because I cant create an adoption token in the Unifi protect settings / dashboard, there is no option to generate or show a token.
If I run the command at the first time:
unifi-cam-proxy --host 192.168.XXX.1 --cert client.pem --mac 'AA:BB:CC:00:11:22' --verbose --token '' rtsp -s rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_175k.mov
I get this message:
2020-09-14 11:05:29 unifi-camera-proxy RTSPCam[936] INFO /tmp/tmp93ukHV 2020-09-14 11:05:29 unifi-camera-proxy RTSPCam[936] INFO ffmpeg -y -re -rtsp_transport tcp -i "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_175k.mov" -vf fps=1 -update 1 /tmp/tmp93ukHV/screen.jpg 2020-09-14 11:05:29 unifi-camera-proxy Core[936] INFO Creating ws connection to wss://192.168.XXX.1:7442/camera/1.0/ws?token= Traceback (most recent call last): File "/usr/local/bin/unifi-cam-proxy", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/unifi/main.py", line 58, in main c.run() File "/usr/local/lib/python2.7/dist-packages/unifi/core.py", line 745, in run ws = websocket.create_connection(uri, sslopt=ssl_opts, header=headers) File "/usr/local/lib/python2.7/dist-packages/websocket/_core.py", line 515, in create_connection websock.connect(url, **options) File "/usr/local/lib/python2.7/dist-packages/websocket/_core.py", line 226, in connect self.handshake_response = handshake(self.sock, *addrs, **options) File "/usr/local/lib/python2.7/dist-packages/websocket/_handshake.py", line 80, in handshake status, resp = _get_resp_headers(sock) File "/usr/local/lib/python2.7/dist-packages/websocket/_handshake.py", line 165, in _get_resp_headers raise WebSocketBadStatusException("Handshake status %d %s", status, status_message, resp_headers) websocket._exceptions.WebSocketBadStatusException: Handshake status 403 Forbidden
Now I can manually adopt the camera at the Dashboard:
Now I run the same command a second time
unifi-cam-proxy --host 192.168.XXX.1 --cert client.pem --mac 'AA:BB:CC:00:11:22' --verbose --token '' rtsp -s rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_175k.mov
I get this message:
2020-09-14 11:12:00 unifi-camera-proxy RTSPCam[981] INFO /tmp/tmpwKcKgZ 2020-09-14 11:12:00 unifi-camera-proxy RTSPCam[981] INFO ffmpeg -y -re -rtsp_transport tcp -i "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_175k.mov" -vf fps=1 -update 1 /tmp/tmpwKcKgZ/screen.jpg 2020-09-14 11:12:00 unifi-camera-proxy Core[981] INFO Creating ws connection to wss://192.168.XXX.1:7442/camera/1.0/ws?token= 2020-09-14 11:12:01 unifi-camera-proxy Core[981] INFO Initiating adoption with token [] and mac [AA:BB:CC:00:11:22] 2020-09-14 11:12:01 unifi-camera-proxy Core[981] DEBUG Sending: {'from': 'ubnt_avclient', 'functionName': 'ubnt_avclient_hello', 'inResponseTo': 0, 'to': 'UniFiVideo', 'responseExpected': False, 'messageId': 1, 'payload': {'connectionHost': '192.168.XXX.1', 'connectionSecurePort': 7442, 'rebootTimeoutSec': 30, 'name': 'unifi-cam-proxy', 'adoptionCode': '', 'idleTime': 191.96, 'protocolVersion': 67, 'mac': 'AA:BB:CC:00:11:22', 'uptime': 0.04075288772583008, 'fwVersion': 'UVC.S2L.v4.14.14.67.037e886.190630.1017', 'semver': 'v4.4.8', 'ip': '192.168.1.10', 'upgradeTimeoutSec': 150, 'model': 'UVC G3', 'hwrev': 19, 'totalLoad': 0.5474}} 2020-09-14 11:12:01 unifi-camera-proxy Core[981] INFO Processing [ubnt_avclient_hello] message 2020-09-14 11:12:01 unifi-camera-proxy Core[981] DEBUG Message contents: {u'from': u'UniFiVideo', u'functionName': u'ubnt_avclient_hello', u'inResponseTo': 1, u'to': u'ubnt_avclient', u'messageId': 11280, u'payload': {u'controllerName': u'unifi', u'overrideUuid': True, u'protocolVersion': 67}} Traceback (most recent call last): File "/usr/local/bin/unifi-cam-proxy", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/unifi/main.py", line 58, in main c.run() File "/usr/local/lib/python2.7/dist-packages/unifi/core.py", line 759, in run reconnect = self.process(ws, msg) File "/usr/local/lib/python2.7/dist-packages/unifi/core.py", line 666, in process if m["responseExpected"] == False and m["functionName"] not in [ KeyError: 'responseExpected'
In the message I found a IP that not belongs to me “192.168.1.10”, I found out this is the default camera ip, I dont use this option, because I connect to my cam directly to the rtsp stream like the bunny video.
Please help! What can i Do to get this working?
Issue Analytics
- State:
- Created 3 years ago
- Comments:57 (18 by maintainers)
Top GitHub Comments
I’ve just stumbled upton this project after realizing that the “NVR” within a UDM Pro is in fact not a NVR but simply a bullshit device to sell more Ubiquiti branded, low-res cameras 😦 Has anyone figured out how to adopt on a UDM Pro?
Ton of refactoring and potential breakages, but the latest version of the branch includes functional motion alerts! You can use automation of your choice to hit the following HTTP endpoints to start and stop motion events which can also trigger push notifications.