Closed cms365 closed 2 years ago
Did you check this Common Issues pages ?
Did you check this Common Issues pages ?
Yes, I did. After reporting this bug I completely reinstalled the plugin and validated the behavior is the same. Wish the reinstall did the trick, but sadly it did not.
Hi @cms365
I've just added error handling for this error, so that this should prevent Homebridge from crashing. Please wait until #53 was merged.
However I cannot quite see why mode
in your case is NaN
. Could you please provide your json configuration without the personal information?
Sure @thieren, here you go. Thanks for the response. I haven’t done anything fancy. Just mapped the HomeKit off status to the Eufy Disarmed status.
{ "bridge": { "name": "Homebridge 519C", "username": "", "port": , "pin": "" }, "accessories": [ { "name": "Model 3", "vin": "", "username": "", "password": "", "waitMinutes": 1, "disableDoors": true, "disableSentryMode": true, "accessory": "Tesla" } ], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "email": "", "password": "”, "name": "Garage Door", "platform": "myQ" }, { "name": "Harmony Hub Living Room", "hubName": "Harmony Hub Living Room", "TVAccessory": true, "mainActivity": "Watch TV", "platform": "HarmonyHubWebSocket" }, { "name": "Wemo", "platform": "Wemo" }, { "platform": "EufySecurity", "username": "", "password": "", "country": "US", "ignoreStations": [], "ignoreDevices": [ "T8114P61212205F8", "T8114P6121221852", "T8900P0021320EAF", "T8900P00213218DC", "T8900P002138168C", "T8900P00213218CD" ] } ], "disabledPlugins": [ "homebridge-tesla", "homebridge-plugin-eufy-security" ] }
Hi @cms365
I haven’t done anything fancy. Just mapped the HomeKit off status to the Eufy Disarmed status.
Where did you do that? I don't see anything in your config that represents that.
From your config and the plugin code I can't see where the issue lies.
Can you at least confirm that the latest beta prevents homebridge from crashing for you?
Hi @cms365
I haven’t done anything fancy. Just mapped the HomeKit off status to the Eufy Disarmed status.
Where did you do that? I don't see anything in your config that represents that.
From your config and the plugin code I can't see where the issue lies.
Can you at least confirm that the latest beta prevents homebridge from crashing for you?
It is weird you don’t see these configurations in the json. Before v2.0 I set these all up in the HomeBridge UI. Screenshot attached.
Will get the beta up asap and report back!
Beta installed! Crash does seem to be resolved here. However, the guard state change is still failing.
Here’s the log output:
[6/2/2022, 3:52:11 PM] [homebridge-eufy-security] This plugin generated a warning from the characteristic 'Security System Current State': characteristic was supplied illegal value: number 63 exceeded maximum of 4. See https://homebridge.io/w/JtMGR for more info.
[6/2/2022, 3:52:11 PM] [homebridge-eufy-security] This plugin generated a warning from the characteristic 'Security System Target State': characteristic was supplied illegal value: number 63 exceeded maximum of 3. See https://homebridge.io/w/JtMGR for more info.
[6/2/2022, 3:52:19 PM] [EufySecurity-2.0.1-beta.3] INFO: Eufy Homebase Request to change station guard mode to: Home.
[6/2/2022, 3:52:32 PM] [EufySecurity-2.0.1-beta.3] ERROR: Error Setting security mode! Error: Could not convert guard mode value to valid number. Aborting guard mode change...
at StationAccessory.handleSecuritySystemTargetStateSet (/usr/local/lib/node_modules/homebridge-eufy-security/src/accessories/StationAccessory.ts:229:15)
at SecuritySystemTargetState.
+1 to the above I am experiencing the Homebridge crashing, as well as the InvalidPropertyValueError: Value "NaN" isn't a valid value for property "guardMode" error. Log below:
[02/06/2022, 15:18:03] InvalidPropertyValueError: Value "NaN" isn't a valid value for property "guardMode"
at validValue (/usr/local/lib/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/utils.ts:114:19)
at Station.setGuardMode (/usr/local/lib/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/station.ts:484:19)
at StationAccessory.handleSecuritySystemTargetStateSet (/usr/local/lib/node_modules/homebridge-eufy-security/src/accessories/StationAccessory.ts:212:24)
at SecuritySystemTargetState.
Hi @cms365 hi @ripple7511
have added a few debug messages in 2.0.1-beta.4 that should help in understanding this problem. Please enable detailed logging in your config and test again. Then drop the logs here please.
Please ensure that you'll get the entire homebridge log after the last restart or at least one line from the startup that reads something like this: DEBUG: *yourstationname* Mapping for station modes: [...]
. After that a range of +/- 5 lines before and after the error should suffice.
So I think I found a workaround, that admittedly I should have thought of sooner. I switched the mapping for HomeKit Off to another Eufy guard status, saved and rebooted. Then, switched it back to my desired Disarmed guard status, saved and rebooted. That resolved the issue for me and now everything works as expected!
Hey @cms365
yeah that was my thought also but wanted first to confirm it with the debug log. Nevertheless there seems to be a bug, since your config didn't have any hk status fields in it and so the default values should have been fine also.
Can you tell me to what values you have mapped it now? Also I don't really get why you should have to restart multiple times. Are you sure this was necessary?
Sure, @thieren!
Current mappings attached. Probably didn’t need the restarts but years of engineering work has trained me to reboot for good measure haha.
Can you provide your new json config?
For me it is not really clear why the plugin crashed for you without this setting.
Doing as @cms365 stated above (re-mapping disarm to something else, saving, rebooting, switching it back, saving and rebooting) worked for me as well.
Config here:
{ "platform": "EufySecurity", "username": "", "password": "", "country": "", "ignoreStations": [], "ignoreDevices": [ "****", "****", "****", "****", "****" ], "pollingIntervalMinutes": 30, "hkHome": 1, "hkAway": 0, "hkNight": 3, "hkOff": 63, "enableDetailedLogging": false, "CameraMaxLivestreamDuration": 30, "cleanCache": true }
(I blanked out username, password, country, and 'ignoreDevices')
Finally could reproduce and fix in 2.0.1-beta11
Closing this.
Thank you!
Agree! Appreciate the eagerness to figure this out. Thank you! Keep up the awesome work!
What happened?
When Eufy Security is switched from any status to disarmed/off from HomeKit, it fails and throws the below error. Also causes the HomeBridge server to crash and reboot. This issue did not exist prior to the 2.0 update.
Want to note that I love this plugin and am reporting this issue to help the community.
Device Type
Station (Supported)
Plugin Version
v2.0.x (Supported)
HomeBridge Version
v1.4.x (Supported)
NodeJS Version
v16 (Supported)
Operating System
Mac OS X 11+ (Supported)
Relevant log output