homebridge-eufy-security / plugin

Homebridge plugin to control certain Eufy Security devices
Apache License 2.0
166 stars 24 forks source link

Plugin loses its complete configuration in the event of a power failure #483

Open thecolinscott opened 10 months ago

thecolinscott commented 10 months ago

What happened?

I am having some power problems at home, meaning that from time to time power is lost to the device running HomeBridge. When power has been restored, if I login to HomeBridge, I find it is up and running OK, but the EufySecurity plugin Json config is empty. Each time this happens, the Home App deletes every scene and automation that relies on any of the Eufy devices defined by the plugin. This has now occurred 3 times in the last 48 hours.

Whatever the selection boxes below might show:

I am running Homebridge V1.7.0 I am running plugin "homebridge-eufy-security" v2.2.21 with 2 x Eufy 2C cameras 2 x Eufy wireless doorbells 1 x Eufy wired doorbell I am running NodeJS 18.15.0 I am running HomeBridge on a Synology DS420J NAS under DSM 7.2.1 version 3

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

Log starts on power restoration ...

[12/08/2023, 16:05:15]  [EufySecurity]  INFO    Updating existing accessory: eufy HomeBase2
[12/08/2023, 16:05:51]  [EufySecurity]  INFO    Looking for old cached accessories that seem to be outdated...
[12/08/2023, 16:05:51]  [EufySecurity]  INFO    Removing cached accessory 4bc47710-ef67-48a2-af11-28f46a023908 Front Cam
[12/08/2023, 16:05:51]  [EufySecurity]  INFO    Removing cached accessory 1b833fc8-c589-4d98-b241-8f0d1508e429 Rear Cam
[12/08/2023, 16:05:51]  [EufySecurity]  INFO    Removing cached accessory 98cdb9d3-5aa1-4eff-9020-af76f6a6ef80 Outer Back Doorbell
[12/08/2023, 16:05:51]  [EufySecurity]  INFO    Removing cached accessory 5149b26c-41f1-4476-9656-1756a45b5010 Back Doorbell
[12/08/2023, 16:05:51]  [EufySecurity]  INFO    Removing cached accessory 7c256ab7-25c1-421a-a4ab-802a987f33f9 Front Doorbell
[12/08/2023, 16:05:51]  [EufySecurity]  INFO    Removed 5 cached accessories
[12/08/2023, 16:06:10]  [EufySecurity]  INFO    Back Doorbell is set to handle snapshots with cloud images. Snapshots might be older than they appear.
[12/08/2023, 16:06:10]  [EufySecurity]  INFO    Outer Back Doorbell is set to handle snapshots with cloud images. Snapshots might be older than they appear.
[12/08/2023, 16:06:10]  [EufySecurity]  INFO    Front Doorbell is set to handle snapshots with cloud images. Snapshots might be older than they appear.
[12/8/2023, 6:00:39 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:00:39 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:00:39 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:00:39 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:00:39 PM] [Homebridge UI] [homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:00:39 PM] [Homebridge UI] [@spectralblu/homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:00:39 PM] [Homebridge UI] [@spectralblu/homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:00:39 PM] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:00:51 PM] [Homebridge UI] [@spectralblu/homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:00:51 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:00:51 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:03:02 PM] [Homebridge UI] [homebridge-eufy-security] [12/08/2023 18:03:02]        [EufySecurity-2.2.21]   DEBUG   [server.js:77[EufySecurity-2.2.21]] Using bropats eufy-security-client library in version 2.8.1
[12/8/2023, 6:03:02 PM] [Homebridge UI] [homebridge-eufy-security] Incoming Request: /storedAccessories
[12/8/2023, 6:03:02 PM] [Homebridge UI] [homebridge-eufy-security] Incoming Request: /storedAccessories
[12/8/2023, 6:03:21 PM] [Homebridge UI] Changes to config.json saved.
[12/8/2023, 6:03:21 PM] [Homebridge UI] Changes to config.json saved.
[12/8/2023, 6:03:31 PM] [Homebridge UI] [@spectralblu/homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:03:31 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:03:31 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:03:31 PM] [Homebridge UI] Running Command: npm uninstall --save @spectralblu/homebridge-eufy-security
[12/8/2023, 6:03:49 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:03:49 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:04:12 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:04:12 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:04:21 PM] [Homebridge UI] [homebridge-eufy-security] [12/08/2023 18:04:21]        [EufySecurity-2.2.21]   DEBUG   [server.js:77[EufySecurity-2.2.21]] Using bropats eufy-security-client library in version 2.8.1
[12/8/2023, 6:04:21 PM] [Homebridge UI] [homebridge-eufy-security] Incoming Request: /storedAccessories
[12/8/2023, 6:04:21 PM] [Homebridge UI] [homebridge-eufy-security] Incoming Request: /storedAccessories
[12/8/2023, 6:06:54 PM] [Homebridge UI] [homebridge] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:06:54 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:06:54 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:06:54 PM] [Homebridge UI] [homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:06:54 PM] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:06:54 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:06:54 PM] [Homebridge UI] [homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:06:54 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:06:54 PM] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:07:59 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:07:59 PM] [Homebridge UI] [homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:07:59 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:07:59 PM] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:23:07 PM] [Homebridge UI] [homebridge] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:23:07 PM] [Homebridge UI] [homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:23:08 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:23:08 PM] [Homebridge UI] [homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:23:08 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:23:08 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:23:08 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:23:08 PM] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:23:08 PM] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:25:54 PM] [Homebridge UI] [homebridge-eggtimer-plugin] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:25:54 PM] [Homebridge UI] [homebridge-config-ui-x] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:25:54 PM] [Homebridge UI] [homebridge-eufy-security] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.
[12/8/2023, 6:25:54 PM] [Homebridge UI] [homebridge-tapo] Failed to check registry.npmjs.org for updates: "timeout of 10000ms exceeded" - see https://homebridge.io/w/JJSz6 for help.

config

THIS IS THE PLUGIN'S JSON CONFIG AFTER REBOOT:

{
    "platform": "EufySecurity",
    "name": "EufySecurity"
}

THIS IS THE PLUGIN'S JSON CONFIG AS IT WAS BEFORE THE POWER FAILURE (restored from the HomeBridge Config Editor):

 {
            "username": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "password": "XXXXXXXXXXXXXXXXXX",
            "country": "GB",
            "deviceName": "",
            "platform": "homebridge-eufy-security",
            "ignoreStations": [],
            "ignoreDevices": [],
            "cleanCache": true,
            "stations": [
                {
                    "serialNumber": "T8200N0021121ECA",
                    "manualTriggerModes": [
                        2,
                        1,
                        0
                    ]
                }
            ],
            "cameras": [
                {
                    "serialNumber": "T8200N0021121ECA",
                    "rtsp": false,
                    "enableCamera": true,
                    "videoConfig": {
                        "audio": true,
                        "audioSampleRate": 0
                    },
                    "talkback": false,
                    "enableButton": true,
                    "motionButton": true,
                    "indoorChimeButton": true,
                    "refreshSnapshotIntervalMinutes": 30
                },
                {
                    "serialNumber": "T8210P64220335ED",
                    "rtsp": false,
                    "enableCamera": true,
                    "enableButton": true,
                    "motionButton": true,
                    "indoorChimeButton": true
                },
                {
                    "serialNumber": "T8210P6422033932",
                    "rtsp": false,
                    "enableCamera": true,
                    "videoConfig": {
                        "audio": true,
                        "audioSampleRate": 0
                    },
                    "talkback": false,
                    "enableButton": true,
                    "motionButton": true,
                    "indoorChimeButton": true
                }
            ]
        }
github-actions[bot] commented 10 months ago

Did you check this Common Issues pages ?

thecolinscott commented 10 months ago

I did check the Common Issues, but did not see anything that looked remotely relevant.

On 8 Dec 2023, at 18:59, github-actions[bot] @.***> wrote:

Did you check this Common Issues https://github.com/homebridge-eufy-security/plugin/wiki/Common-Issues pages ?

— Reply to this email directly, view it on GitHub https://github.com/homebridge-eufy-security/plugin/issues/483#issuecomment-1847673979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AURSVCN6USHUODWD3QA6VS3YINPPVAVCNFSM6AAAAABANB7X6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGY3TGOJXHE. You are receiving this because you authored the thread.

bluskye commented 9 months ago

Its not a software problem, get a UPS so the machine shutdowns elegantly on power loss and turns itself back on when power is restored.

thecolinscott commented 9 months ago

Thank you for your reply. Whilst I cannot quarrel with your advice, we are talking about domestic systems here, and UPSs are rare in that environment. In any case, as a retiree from the software industry I would strongly dispute your diagnosis that it is not a software problem. I do not feel any need to run a UPS for any other part of my home computing, of which Home Automation represents a very minor part, and do not accept that I should need to do so for my Home Automation.

There are two aspects to the problems I have experienced:-

That after a power failure the json config of the EufySecurity plugin is lost.

Such a data loss is undoubtedly symptomatic of poor software design or implementation, and no other item in my domestic computing environment is subject to data loss in that way. Whether the fault lies within the plugin itself or within HomeBridge is unknowable to me, but either way it remains appropriate that I should inform yourselves, and for you to pass the information on to the authors of HomeBridge should that prove to be where the fault lies.

That after a power failure, or after any reconfiguration of the EufySecurity plugin, the Home App deletes all scenes and automations relying upon devices defined by the EufySecurity plugin. This is also clearly a software fault, but again it is unknowable to myself whether the fault is likely to exist within the plugin, within HomeBridge, or within Apple’s HomeKit platform - even though I might make an intelligent guess! Again, it is appropriate that I should report this to yourselves, to act upon or hand on as seems suitable.

I appreciate that I am anyway working in an unsupported environment (running HomeBridge on a Synology NAS), but even so reporting problems is an act of community, given that you might otherwise be unaware of them. Even though I am not entitled to support, I would hope that - having taken the time and trouble to report my experience to yourselves - you might at least take the report seriously, and if it turns out to relate tor issues outside your own control that you pass it on to wherever might be relevant.

Colin Scott.

On 15 Dec 2023, at 16:20, bluskye @.***> wrote:

Its not a software problem, get a UPS so the machine shutdowns elegantly on power loss and turns itself back on when power is restored.

— Reply to this email directly, view it on GitHub https://github.com/homebridge-eufy-security/plugin/issues/483#issuecomment-1858137143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AURSVCIVYSTBMAYVLVTN54TYJR2GVAVCNFSM6AAAAABANB7X6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJYGEZTOMJUGM. You are receiving this because you authored the thread.