homebridge-eufy-security / plugin

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

[Bug]: iOS16 / v2.2.0 b5 - Doorbell Motion Toggle doesn't retain state but still works #162

Open DaveM8686 opened 1 year ago

DaveM8686 commented 1 year ago

What happened?

I'm not sure whether this was affected by iOS16 or moving to v2.2.0b5, as I did both on the same day. But the motion toggle switch no longer retains its status. It still works, but visually flips back to the last status.

So if it's off, I toggle it on, this is reflected in Eufy, and the switch flips back to off. From there, I have to quickly toggle it on and then off again to turn it off.

Running HomeBridge 1.5.0

Device Type

Doorbell (Supported)

Plugin Version

beta (Best Effort)

HomeBridge Version

other (UnSupported)

NodeJS Version

v16 (Supported)

Operating System

Docker (UnSupported)

Relevant log output

I can't paste any log here, as it disappears. I mean I see it appear as "set motion true / false" etc, but then it deletes when the switch reverts back.  I do, however, get this error on restarting the bridge.

[9/16/2022, 11:50:38 AM] [EufySecurity-2.2.0-beta.5] ERROR: Error cleaning config: Error: EACCES: permission denied, open '/homebridge/config.json'
    at Object.openSync (node:fs:585:3)
    at Object.writeFileSync (node:fs:2170:35)
    at EufySecurityPlatform.clean_config (/homebridge/node_modules/homebridge-eufy-security/src/plugin/platform.ts:577:10)
    at new EufySecurityPlatform (/homebridge/node_modules/homebridge-eufy-security/src/plugin/platform.ts:146:10)
    at ChildBridgeFork.startBridge (/usr/local/lib/node_modules/homebridge/src/childBridgeFork.ts:150:42) {
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/homebridge/config.json'
}

config

{
            "username": "XXXX",
            "password": "XXXX",
            "country": "AU",
            "ignoreStations": [
                "XXXX"
            ],
            "cameras": [
                {
                    "serialNumber": "XXXX",
                    "enableCamera": true,
                    "useCachedLocalLivestream": true,
                    "videoConfig": {
                        "audio": true,
                        "vcodec": "copy",
                        "useSeparateProcesses": true
                    },
                    "enableButton": false,
                    "motionButton": true,
                    "refreshSnapshotIntervalMinutes": 360,
                    "unbridge": true,
                    "rtsp": false,
                    "talkback": true,
                    "immediateRingNotificationWithoutSnapshot": false,
                    "snapshotHandlingMethod": 3,
                    "hsv": true
                }
            ],
            "platform": "EufySecurity",
            "_bridge": {
                "username": "XXXX",
                "port": XXXX
            },
            "ignoreDevices": [],
            "cleanCache": true,
            "enableDetailedLogging": true,
            "experimentalMode": true
        }
github-actions[bot] commented 1 year ago

Did you check this Common Issues pages ?

thieren commented 1 year ago

Hey @DaveM8686

Can you try if this also happens with the latest 2.1.0 version? Thx!

DaveM8686 commented 1 year ago

Hey @thieren, unfortunately not right now. My NAS died this morning, which is what I was running Homebridge on. I've ordered a new one. If it's still happening once that arrives and I set everything up, then I'll let you know.

DaveM8686 commented 1 year ago

Hey @thieren, managed to get every thing back up and running today. Can confirm it's the latest beta. If I drop back to 2.1 stable it doesn't do it, but then go back to 2.2b5 and it does again.

DaveM8686 commented 1 year ago

Hey @thieren, figured this out. It was experimental mode causing it. I turned that off and it's all good again. I have another issue now that is definitely since beta 5, and really weird, but I'll raise another bug about that. Not sure if you want to keep this one open or closed.

thieren commented 1 year ago

Thx for the feedback.

I'd let it open for now. When I have time, I'll look into this, but since this seems to be a really isolated issue it might take some time.

Did you just enable experimantal mode, or did you actually use an experimental feature, like e.g. enabled RTSP on a doorbell?

DaveM8686 commented 1 year ago

No problem. I just had it enabled to see what other features it provided. Hadn't actually used any.