samemory / homebridge-eufy-security

Work in progress
Apache License 2.0
97 stars 14 forks source link

HomeBase Security Status switch off - but no reaction in HomeKit. #39

Closed karesake closed 3 years ago

karesake commented 3 years ago

Hi there,

Found a little Problem. We use the KeyPad to switch the Security Modes. The "Away" und "Home" Mode works great but if I click the "Off" Button, only the Eufy HomeBase switch to "off" mode - no reaction in HomeKit.

To change the plugin settings does not work.

schliemann commented 3 years ago

Have you mapped Eufy off mode to Homekit off mode?

export enum GuardMode { UNKNOWN = -1, AWAY = 0, HOME = 1, DISARMED = 63, SCHEDULE = 2, GEO = 47, CUSTOM1 = 3, CUSTOM2 = 4, CUSTOM3 = 5, OFF = 6}

karesake commented 3 years ago

Its correctly Set. HomeBase switchs to „Off“ but no response in HomeKit.

Whether I use "63" or "6".

schliemann commented 3 years ago

Can you post your logs when changing modes?

karesake commented 3 years ago

Yes. Away and Home Mode are working great. The HomeBase switch to the right mode and HomeKit also. Only the off Mode not.

schliemann commented 3 years ago

I will try and test it tonight.

PeterAlexander75 commented 3 years ago

Tested. I can can confirm this is the case for me, too.

 "username": "username",
            "password": "password",
            "hkHome": 1,
            "hkAway": 0,
            "hkNight": 3,
            "hkOff": 63,
            "platform": "EufySecurity"
schliemann commented 3 years ago

@PeterAlexander75 hkOff should be "6" to work with eufy off.

PeterAlexander75 commented 3 years ago

Set to 6, rebooted homebridge, same result.

karesake commented 3 years ago

Also with 6 only HomeBase is in Off Mode.

21685-B01-DFAD-4-EA4-A165-1-D77-F0-EE873-B CE8-C76-F5-4-CE9-4307-BDAB-5-CF24024-F30-D

Nothing when switch to off Mode

FB389-B50-16-F0-4-D33-86-A5-F0-F32-EEF66-BF

but when switch to Away or home mode

CB06-F0-FC-AC8-E-4389-B489-7724-D7-C5-CA19

schliemann commented 3 years ago

Might be a problem with the eufy-security-client then.

lenoxys commented 3 years ago

Code 6 is triggered when disabled by Keypad instead of 63. Confirmed on my lab. I'm pushing the change.

lenoxys commented 3 years ago

41

schliemann commented 3 years ago

@lenoxys Can you elaborate on what in your PR fixed the event not being triggered. I can see you added "this.eufyStation.connect()". I thought the station already had a connection when the connection is established in the platform startup?

lenoxys commented 3 years ago

Hhaaa I forget to remove this line I was trying p2p. I will push the tentative to fix the motion on doorbell and remove this one

schliemann commented 3 years ago

Perfect and awesome work you did. But how did you fix the off mode?

lenoxys commented 3 years ago

Line 164 in SecuritySystemPlatformAccessory.ts case 6: // 6 is triggered when disabled by Keypad return this.convertMode(63);

Code 6 mean disarmed means everything is desactivated. while 63 it's desactivated but you can still enable thing.

schliemann commented 3 years ago

I get it now. Thought it was already mapped there. Apparantly not. Great work 👍🏻

schliemann commented 3 years ago

Tested and solved. Please close.

schliemann commented 3 years ago

@samemory please close this.