homebridge-eufy-security / plugin

Homebridge plugin to control certain Eufy Security devices
Apache License 2.0
167 stars 23 forks source link

[Bug]: 2.3.14 does not load any accessories into homekit at all #528

Closed zthun closed 7 months ago

zthun commented 7 months ago

What happened?

I installed 2.3.14 and nothing is loading into Homekit.

From the logs, it looks like the plugin is trying to delete persistent.json which doesn't exist since I reset everything; I'm not sure if that's throwing an exception at all, but that's the only thing that seems to make any sense.

It's hard to describe everything that's happening, so I'm just attaching screenshots here.

image

image

In 2.20.x, I was able to see all of the accessories in the accessories tab. This is empty now.

image

Device Type

Doorbell (Supported)

Plugin Version

v2.0.x (Supported)

HomeBridge Version

v1.6.x (Supported)

NodeJS Version

v18 (Supported)

Operating System

Other (UnSupported)

Relevant log output

{"0":"Using bropats eufy-security-client library in version 3.0.0","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:48:13.042Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:82:18","fileName":"server.js","fileNameWithLine":"server.js:82","fileColumn":"18","fileLine":"82","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:82","method":"UiServer.initTransportStreams"}}}
{"0":"Could not get stored accessories. Most likely no stored accessories yet: Error: ENOENT: no such file or directory, open '/root/.homebridge/eufysecurity/accessories.json'","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:48:13.106Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:175:22","fileName":"server.js","fileNameWithLine":"server.js:175","fileColumn":"22","fileLine":"175","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:175","method":"UiServer.loadStoredAccessories"}}}
{"0":"Could not get stored accessories. Most likely no stored accessories yet: Error: ENOENT: no such file or directory, open '/root/.homebridge/eufysecurity/accessories.json'","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:48:13.107Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:175:22","fileName":"server.js","fileNameWithLine":"server.js:175","fileColumn":"22","fileLine":"175","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:175","method":"UiServer.loadStoredAccessories"}}}
{"0":"deleting persistent.json due to new login","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:48:31.542Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:101:26","fileName":"server.js","fileNameWithLine":"server.js:101","fileColumn":"26","fileLine":"101","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:101","method":"UiServer.login"}}}
{"0":"Could not delete persistent.json due to error: Error: ENOENT: no such file or directory, unlink '/root/.homebridge/eufysecurity/persistent.json'","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:48:31.543Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:106:22","fileName":"server.js","fileNameWithLine":"server.js:106","fileColumn":"22","fileLine":"106","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:106","method":"UiServer.login"}}}
{"0":"init eufyClient","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:48:31.543Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:110:22","fileName":"server.js","fileNameWithLine":"server.js:110","fileColumn":"22","fileLine":"110","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:110","method":"UiServer.login"}}}
{"0":"login with credentials","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:48:31.777Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:129:26","fileName":"server.js","fileNameWithLine":"server.js:129","fileColumn":"26","fileLine":"129","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:129"}}}
{"0":"connected?: true","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:48:32.197Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:133:46","fileName":"server.js","fileNameWithLine":"server.js:133","fileColumn":"46","fileLine":"133","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:133"}}}
{"0":"Using bropats eufy-security-client library in version 3.0.0","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:50:20.156Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:82:18","fileName":"server.js","fileNameWithLine":"server.js:82","fileColumn":"18","fileLine":"82","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:82","method":"UiServer.initTransportStreams"}}}
{"0":"Using bropats eufy-security-client library in version 3.0.0","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:51:03.668Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:82:18","fileName":"server.js","fileNameWithLine":"server.js:82","fileColumn":"18","fileLine":"82","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:82","method":"UiServer.initTransportStreams"}}}
{"0":"Using bropats eufy-security-client library in version 3.0.0","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:52:03.048Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:82:18","fileName":"server.js","fileNameWithLine":"server.js:82","fileColumn":"18","fileLine":"82","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:82","method":"UiServer.initTransportStreams"}}}
{"0":"Using bropats eufy-security-client library in version 3.0.0","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:54:23.199Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:82:18","fileName":"server.js","fileNameWithLine":"server.js:82","fileColumn":"18","fileLine":"82","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:82","method":"UiServer.initTransportStreams"}}}
{"0":"compressing log files to /root/.homebridge/eufysecurity/logs.zip and sending to client.","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.18.2","hostname":"homebridge","name":"[2.3.14]","date":"2024-03-21T00:55:38.094Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:238:18","fileName":"server.js","fileNameWithLine":"server.js:238","fileColumn":"18","fileLine":"238","filePath":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js","filePathWithLine":"/usr/local/lib/node_modules/homebridge-eufy-security/homebridge-ui/server.js:238","method":"UiServer.downloadLogs"}}}

config

{
    "enableDetailedLogging": true,
    "CameraMaxLivestreamDuration": 30,
    "pollingIntervalMinutes": 10,
    "hkHome": 1,
    "hkAway": 0,
    "hkNight": 3,
    "hkOff": 63,
    "ignoreStations": [],
    "ignoreDevices": [
        "T8410P3121365E64",
        "T8410P4122322C95"
    ],
    "country": "US",
    "cameras": [
        {
            "serialNumber": "T8510Q152224031B",
            "rtsp": false,
            "talkback": false
        },
        {
            "serialNumber": "T8410P3121365E64",
            "rtsp": false
        },
        {
            "serialNumber": "T8410P4122322C95",
            "rtsp": false
        },
        {
            "serialNumber": "T8422T10212800E8",
            "rtsp": false,
            "videoConfig": {
                "audio": true,
                "vcodec": "copy",
                "useSeparateProcesses": true
            },
            "talkback": true,
            "snapshotHandlingMethod": 3
        }
    ],
    "cleanCache": true,
    "unbridge": true,
    "ignoreMultipleDevicesWarning": true,
    "syncStationModes": false,
    "autoSyncStation": false,
    "platform": "EufySecurity",
    "username": "<Redacted>",
    "password": "<Redacted>",
    "deviceName": "",
    "hsv": true
}
github-actions[bot] commented 7 months ago

Did you check this Common Issues pages ?

lenoxys commented 7 months ago

hello! Which platform you're using ? looks like permission issue on root folder. Usually, it's not recommended to work with root account to run homebridge. See installation guide of HB : https://github.com/homebridge/homebridge/wiki

zthun commented 7 months ago

I'm on TrueNAS in a FreeBSD jail. This is somewhat working fine if I revert back to 2.2.21 - some accessories show up but my cameras are all missing in homebridge. It's when I update to 2.3.x that I'm seeing the issue. I reset the plugin and went ahead and made the .homebridge directory writable by all users just to rule out that possibility, but I'm still seeing nothing get loaded.

zthun commented 7 months ago

Quick note on this. This is the guide I used to setup homebridge in a jail: https://github.com/homebridge/homebridge/wiki/FreeNAS-11.1-Installation-using-a-Jail.

lenoxys commented 7 months ago

hum thanks, sorry to ask but did you do the common errors section ? https://github.com/homebridge/homebridge/wiki/FreeNAS-11.1-Installation-using-a-Jail#common-errors

zthun commented 7 months ago

OK, found the core issue which was annoying to track down since this does not show up in the logs; it looks like the problem is with the sharp module and the fact that it doesn't support freebsd at all:

image

https://sharp.pixelplumbing.com/install

Ugggg...that's so annoying and I ran into a similar issue awhile back will rollup and the fact that they don't provide specific linux binaries.

Closing this. I'll update this bug if I can find a workaround for freebsd, but given that this plugin doesn't officially support freebsd, there's not much for it to do in this case.

lenoxys commented 7 months ago

I will look to see if I can remove sharp. Part of the work I'm doing is to clean a lot of unused things