ring: TypeError: hap_1.hap.Accessory.cleanupAccessoryData

Bug Report

Describe the Bug

After install of the homebridge-ring plugin, homebridge is throwing an error on startup. [Ring] Error connecting to API [Ring] TypeError: hap_1.hap.Accessory.cleanupAccessoryData is not a function at createHomebridgeAccessory…

To Reproduce

  • Start Homebridge
  • Error is thrown during the initialization phase

Expected behavior

Expect Ring plugin to initialize with 1 camera / 1 device so that they could be added to homekit

Screenshots/Logs

[5/4/2020, 11:20:21 PM] Homebridge is running on port 51826. [5/4/2020, 11:20:21 PM] Kitchen Wyze Cam is running on port 36923. [5/4/2020, 11:20:21 PM] Please add [Kitchen Wyze Cam] manually in Home app. Setup Code: xxx-xx-xxx [5/4/2020, 11:20:21 PM] Garage Wyze Cam is running on port 45645. [5/4/2020, 11:20:21 PM] Please add [Garage Wyze Cam] manually in Home app. Setup Code: xxx-xxx-xxx [5/4/2020, 11:20:22 PM] [Ring] Configuring 1 cameras and 1 devices for location “My correct city shows here” - locationId: this-looks-like-a-valid-id-in-the-logs [5/4/2020, 11:20:22 PM] [Ring] Adding new accessory doorbell_v4 Front Door [5/4/2020, 11:20:22 PM] [Ring] Error connecting to API [5/4/2020, 11:20:22 PM] [Ring] TypeError: hap_1.hap.Accessory.cleanupAccessoryData is not a function at createHomebridgeAccessory (/usr/lib/node_modules/homebridge-ring/lib/homebridge/ring-platform.js:185:49) at /usr/lib/node_modules/homebridge-ring/lib/homebridge/ring-platform.js:188:82 at Array.forEach (<anonymous>) at RingPlatform.<anonymous> (/usr/lib/node_modules/homebridge-ring/lib/homebridge/ring-platform.js:167:28) at Generator.next (<anonymous>) at fulfilled (/usr/lib/node_modules/homebridge-ring/lib/homebridge/ring-platform.js:5:58) at processTicksAndRejections (internal/process/task_queues.js:94:5)

Additional context

Note - i swapped out my setup code and location ID in the log above

Homebridge Ring Config


{
    "bridge": {
        "name": "Homebridge",
        "username": "NN:NN:NN:NN:NN:NN",
        "port": 51826,
        "pin": "XXX-XX-XXX"
    },
    "accessories": [
        {
            "name": "Alarm Activated",
            "stateful": true,
            "reverse": false,
            "time": 1000,
            "accessory": "DummySwitch"
        },
        {
            "name": "Garage Door",
            "username": "an email",
            "password": "a password",
            "accessory": "Chamberlain"
        }
    ],
    "platforms": [
        {
            "name": "Config",
            "port": 8080,
            "auth": "form",
            "theme": "auto",
            "restart": "sudo -n systemctl restart homebridge",
            "tempUnits": "f",
            "sudo": true,
            "log": {
                "method": "systemd"
            },
            "platform": "config"
        },
        {
            "name": "Camera ffmpeg",
            "cameras": [
                {
                    "name": "Kitchen Wyze Cam",
                    "videoConfig": {
                        "source": "-rtsp_transport tcp -re -i rtsp://WyzeCam:HomeKit@0.0.0.0/live",
                        "maxStreams": 2,
                        "maxWidth": 640,
                        "maxHeight": 360,
                        "maxFPS": 15,
                        "debug": false,
                        "vcodec": "copy"
                    }
                },
                {
                    "name": "Garage Wyze Cam",
                    "videoConfig": {
                        "source": "-rtsp_transport tcp -re -i rtsp://WyzeCam:HomeKit@0.0.0.0/live",
                        "maxStreams": 2,
                        "maxWidth": 640,
                        "maxHeight": 360,
                        "maxFPS": 15,
                        "debug": false,
                        "vcodec": "copy"
                    }
                }
            ],
            "platform": "Camera-ffmpeg"
        },
        {
            "refreshToken": "xxx",
            "debug": false,
            "platform": "Ring"
        }
    ]
}

Environment

  • OS: Raspbian GNU/Linux Buster (10)
  • Node.js: 12.15.0
  • NPM: 6.13.4
  • homebridge-ring: 8.0.0
  • homebridge: 1.0.4

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 29 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Hi. I ran into this issue today. I was able to resolve it by uninstall then reinstall both latest homebridge-ring and homebridge. Sorry I haven’t thought of capturing the dependencies tree to confirm if this is the same issue. But I hope this helps.

Clean load of Raspian and homebridge to clean up my “multiple instances” issues. Installed Ring plugin…Works Flawlessly, including the programming of a doorbell chime being played on my home pod. Thank you for this!

got mine working by cleaning up multiple homebridge folder, I had to erase homebridge somehow it was installed in /usr/lib/node_modules and /usr/local/node_modules

normal fpm commands to remove and re-install did not work so deleted the files manually and reinstalled homebridge, all works now.

Thanks

I seem to have multiple instances of homebridge installed as well, per the errors I am seeing… I am going to wipe my SD and perform a clean load, especially using homebridge v 1+ as I have only updated overtime and perhaps I have a bit of a mess. I will post my success or failure one I m complete.

Excellent, thank you for the explanation and for taking the time to assist me. I will perform the test later this evening. Please stand by.

npm uninstall -g homebridge to uninstall, then npm i -g homebridge@latest to reinstall. If install fails because of permissions, sudo npm install -g --unsafe-perm homebridge@latest