beele / homebridge-unifi-protect-camera-motion

Camera & Motion sensor support for Unifi Protect cameras in Homekit via Homebridge
Apache License 2.0
103 stars 12 forks source link

Cameras add to Homebridge but don't show in Home #41

Closed pelowj closed 4 years ago

pelowj commented 4 years ago

Are there any known issues with cameras adding successfully to Homebridge but then not showing up in Home? Nothing I do seems to work to add them, but other plugins seem to work as expected. I'm on 1.14.10-beta.4 on a UDM-Pro logging in with Unifi OS credentials.

-Jp

beele commented 4 years ago

In your persist folder in the .homebridge there might be files like AccessoryInfo.xxxxxxx.json (where xxxx are random hex values).
Open each file in an editor, if the category is 17 and the name matches you camera, delete it and restart homebridge (make a backup first).

Do you have any other camera plugins running simultaneously in homebridge?

pelowj commented 4 years ago

In your persist folder in the .homebridge there might be files like AccessoryInfo.xxxxxxx.json (where xxxx are random hex values). Open each file in an editor, if the category is 17 and the name matches you camera, delete it and restart homebridge (make a backup first).

Do you have any other camera plugins running simultaneously in homebridge?

Hi Beele,

It's a fresh install and homebridge-unifi-protect-camera-motion v0.3.3 is my only camera plugin. I have a Sonos plugin too, but that's it. Removing the AccessoryInfo files didn't seem to make any difference.

-jp

beele commented 4 years ago

@pelowj Ok. Just to be sure, you are trying to add the camera's in manually but they are not listed? (the camera's are not added to your home automatically).

What is the output log of your homebridge when you start it?

Edit are you using a VM? I had issues adding accessories when my VM network was set to NAT instead of bridged in vmware

pelowj commented 4 years ago

Yeah, I'm trying to add them manually but nothing is coming up. It's running on a raspberry pi, no VM.

Output log as follows:

[5/19/2020, 22:45:06] [HB Supervisor] Starting Homebridge with extra flags: -I -D
[5/19/2020, 22:45:06] [HB Supervisor] Started Homebridge v1.1.0 with PID: 3903
[5/19/2020, 22:45:08] Loaded config.json with 0 accessories and 2 platforms.
[5/19/2020, 22:45:08] ---
[5/19/2020, 22:45:10] Loaded plugin: homebridge-config-ui-x@4.19.0
[5/19/2020, 22:45:10] Registering platform 'homebridge-config-ui-x.config'
[5/19/2020, 22:45:10] ---
[5/19/2020, 22:45:20] Loaded plugin: homebridge-unifi-protect-camera-motion@0.3.4
[5/19/2020, 22:45:20] Registering platform 'homebridge-unifi-protect-camera-motion.UnifiProtectMotion'
[5/19/2020, 22:45:20] ---
[5/19/2020, 22:45:20] Loading 2 platforms...
[5/19/2020, 22:45:20] [Config] Initializing config platform...
[5/19/2020, 22:45:20] [Config] Running in Service Mode
[5/19/2020, 22:45:20] [Unifi protect cameras & motion sensors] Initializing UnifiProtectMotion platform...
Setup Payload:
X-HM://0024L6VI145E3
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 676-19-321 │     
    └────────────┘     

[5/19/2020, 22:45:20] Homebridge is running on port 51905.
[5/19/2020, 22:45:20] [Unifi protect cameras & motion sensors] Endpoint Style: UnifiOS
[5/19/2020, 22:45:20] [Unifi protect cameras & motion sensors] WARNING: No previous session found, a new session must be created!
[5/19/2020, 22:45:21] [Unifi protect cameras & motion sensors] Authenticated, returning session
[5/19/2020, 22:45:21] [Unifi protect cameras & motion sensors] Cameras retrieved, enumerating motion sensors
[5/19/2020, 22:45:21] [Unifi protect cameras & motion sensors] Cameras: 5
[1589924726230] INFO  (503 on raspberrypi): incoming request
    reqId: 109
    req: {
      "method": "GET",
      "url": "/api/server/qrcode.svg",
      "hostname": "192.168.68.240:8581",
      "remoteAddress": "::ffff:192.168.68.117",
      "remotePort": 59941
    }
[1589924726268] INFO  (503 on raspberrypi): request completed
    reqId: 109
    res: {
      "statusCode": 200
    }
    responseTime: 33.81082199513912
[1589924726279] INFO  (503 on raspberrypi): incoming request
    reqId: 110
    req: {
      "method": "GET",
      "url": "/api/server/qrcode.svg",
      "hostname": "192.168.68.240:8581",
      "remoteAddress": "::ffff:192.168.68.117",
      "remotePort": 59941
    }
[1589924726298] INFO  (503 on raspberrypi): request completed
    reqId: 110
    res: {
      "statusCode": 200
    }
    responseTime: 17.20210701227188
2020-05-19 22:45:29.640663: W tensorflow/core/framework/allocator.cc:107] Allocation of 25159680 exceeds 10% of system memory.
[5/19/2020, 22:45:30] [Unifi protect cameras & motion sensors] Motion checking setup done!
[5/19/2020, 22:45:30] [Unifi protect cameras & motion sensors] Setup done
[5/19/2020, 22:45:30] 3. Side Passage Front is running on port 44779.
[5/19/2020, 22:45:30] Please add [3. Side Passage Front] manually in Home app. Setup Code: 676-19-321
[5/19/2020, 22:45:30] 4. Side Passage Back is running on port 38623.
[5/19/2020, 22:45:30] Please add [4. Side Passage Back] manually in Home app. Setup Code: 676-19-321
[5/19/2020, 22:45:30] 2. Front Garden is running on port 35337.
[5/19/2020, 22:45:30] Please add [2. Front Garden] manually in Home app. Setup Code: 676-19-321
[5/19/2020, 22:45:30] 1. Front Door is running on port 34595.
[5/19/2020, 22:45:30] Please add [1. Front Door] manually in Home app. Setup Code: 676-19-321
[5/19/2020, 22:45:30] 5. Back Garden is running on port 41315.
[5/19/2020, 22:45:30] Please add [5. Back Garden] manually in Home app. Setup Code: 676-19-321
beele commented 4 years ago

@pelowj I see all your camera names have a . in it. Maybe that is causing issues? Or it could be a network issue. If you add another camera via another plugin, can you add that to home app?

pelowj commented 4 years ago

@pelowj I see all your camera names have a . in it. Maybe that is causing issues? Or it could be a network issue. If you add another camera via another plugin, can you add that to home app?

Bingo! I removed the full-stop and they all showed up straight away! Thanks for all your help.