Closed schliemann closed 3 years ago
"Off" is only supported on a keypad device. Do you set this mode on a keypad device? If not, then the error is correct ;)
As I already explained to you in issue #13.
Ah. Makes sense. Thanks.
It was possible in 0.8.3. I do understand the argument of it being a keypad only value in eufys code. I am using a homebridge plugin and mapping and trying to set the station guard mode to Off since that is the value the keypad will set when I leave the house.
But without this property it is not possible programmatically to set the mode to Off.
The properties are mapped to the respective device, so if you have a keypad the "Off" value should work. Here you can find the keypad property:
But without this property it is not possible programmatically to set the mode to Off.
Have you tried it or are you just assuming? I mean at the keypad
Is you proposal to call https://github.com/bropat/eufy-security-client/blob/65ed8cb02675924b914c480079b16fe91160e056/src/http/device.ts#L78 on the keypad device?
I guess I can do this. But I don't understand the argument for not supporting all guard modes on the station. I know that the only physical device that can set the Off mode is the keypad. But the guard mode is persisted in the base station, right?
No, here:
The following check in the setGuardMode
method is based on the official Eufy App:
The reason why I reproduce the checks is because otherwise unforeseen situations can occur in the app or the device.
Otherwise you can also use the getPropertyMetadata
of the Station
class to load the respective property and query it for supported values.
One more thing:
I don't have a keypad, so it's also easy that I misinterpreted and included something wrong ;) If it is so, just say.
Previously I was calling
this.Station.setGuardMode(6)
which would then update the guard mode to Off.
I don't see how https://github.com/bropat/eufy-security-client/blob/65ed8cb02675924b914c480079b16fe91160e056/src/http/station.ts#L525-L526 would work since the station is not a KeyPad?
Hello, I'm really enjoying this homebridge-eufy-security plugin via Hoobs. To the point that I bought/add Eufy Keypad to my setup. I would love to get the Eufy keypad status blue light indicators to reflect the status too OFF when turning OFF via Homekit, but currently it's just Disarming the eufy system. Which makes the keypad status light on Keypad not light OFF.
I'm willing to assist with troubleshooting if you need someone to test it out directly from the Eufy Keypad.
Below are the logs when I turn the Eufy system off directly from the Keypad:
8/3/2021, 1:18:49 PM [EufySecurity] Handle Station Raw Property Changes: -- 1266 -35 1628021929527 8/3/2021, 1:18:49 PM [EufySecurity] Handle Station Raw Property Changes: -- 1147 1628021928 1628021929527 8/3/2021, 1:19:00 PM {"name":"eufyLog","hostname":"hoobs","pid":980,"level":30,"msg":"Alarm mode for station T8010P132019084A changed to: undefined","time":"2021-08-03T20:19:00.881Z","v":0} 8/3/2021, 1:19:00 PM [EufySecurity] Handle Station Raw Property Changes: -- 1151 6 1628021940882 8/3/2021, 1:19:00 PM [EufySecurity] Received onStationCurrentModePushNotification - currentMode 6 homekitCurrentMode 3 8/3/2021, 1:19:00 PM [EufySecurity] Handle Station Property Changes: -- currentMode { value: 6, timestamp: 1628021940882 } 8/3/2021, 1:19:00 PM [EufySecurity] Handle Station Raw Property Changes: -- 1266 -34 1628021940998 8/3/2021, 1:19:01 PM [EufySecurity] Handle Station Raw Property Changes: -- 1224 6 1628021940998 8/3/2021, 1:19:01 PM [EufySecurity] Received onStationGuardModePushNotification - guardmode 6 homekitGuardMode 3 8/3/2021, 1:19:01 PM [EufySecurity] Handle Station Property Changes: -- guardMode { value: 6, timestamp: 1628021940998 } 8/3/2021, 1:19:01 PM [EufySecurity] Handle Station Raw Property Changes: -- 1147 1628021940 1628021940998
@bropat I'm still not sure how I, with the current version of the client, can set the guardMode to Off?
I am using this functionality through eufy-security-ws web socket, no issues.
@fuatakgun And you are able to set the guardmode to 6 (Off)?
My bad, i am using disarmed mode, not off.
@fuatakgun As far as I can see you don't use Off state?
@schliemann Can someone share a keypad with me?
I can.
I need admin rights to be able to test everything and implement other features if necessary.
Where are you from? USA or Europe? Just so I send you the right account ;)
@bropat Europe
@schliemann
REDACTED
@bropat Shared now. I have disabled all device alarms just so we don't trigger alarms at home 😅
@schliemann Thank you very much. I'll have a look tonight and let you know.
My 2 cents, I still can trigger off mode (6) from app as well not only from the keypad.
@schliemann I'm working on it now and will be doing some tests soon.
The OFF mode is clear to me now.
Great news, @bropat 👍🏻. You are doing an awesome job. Really appreciate it.
@schliemann Thank you :-)
The OFF mode is now applied correctly (only visible and usable if a keypad is registered at the station).
I am adding or correcting a few other functions. e.g.: Eufycam 2c and 2c Pro now support turning the light on and off, the night vision setting has been corrected (haven't had a 2c/2c pro in my hands yet to test :-P).
Do you think you can still give me access tomorrow, so I can finish testing a few things and check your issue regarding the doorbell livestream, among other things?
That's it for today.
@bropat Sounds like a really good solution. You are welcome to use the access as long as you need it.
Trying to understand why do we need off
and how is it different than disarmed
? Can you help me?
Background: i see that keypad creates it automatically and it goes to off mode when keypad used but it doesn't exist for non-keypad users, so we can not generalize it.
Off is useful if you have keypad because he does display the status directly on the keypad if you select off but it doesn't if you use disarmed. Disarmed can't be custom while off can be.
I see, thanks
Which version will start having the OFF capability? I'd like to test it out with my keypad to see if works. I'll send my feedback if it does or not.
@a-watts As of version 1.1.0 (2021-08-11):
(bropat) Fixed issue with guard mode setting where the "Off" state was not handled correctly (only supported with keypad) (#27)
Trying to setGuardMode on station to 6 throws the following error:
(node:6913) UnhandledPromiseRejectionWarning: InvalidPropertyValueError: Value "6" isn't a valid value for property "guardMode" at Object.validValue (/usr/lib/node_modules/homebridge-eufy-security-control/node_modules/eufy-security-client/src/utils.ts:108:19) at Station.setGuardMode (/usr/lib/node_modules/homebridge-eufy-security-control/node_modules/eufy-security-client/src/http/station.ts:513:13)
I think 6: "Off" should be added to StationGuardModeProperty here? https://github.com/bropat/eufy-security-client/blob/65ed8cb02675924b914c480079b16fe91160e056/src/http/types.ts#L2233