Context: In the Eufy app, I typically oscillate between the Home mode when I'm home and Schedule mode when I'm away, which has a schedule for mostly "Away" mode, but I do have a window for "Home" mode so my yard cameras don't trigger an alarm during the time that my gardener visits. (This works well for me because the Eufy schedule mode has been much more reliable than trying to schedule it with HomeKit automations)
In the Eufy mode mappings I have likely what's pretty typical (except for hkAway mode):
This causes an issue when setting the Eufy mode via (or even loading the homebridge Accessories page) with this error (more relevant logs and backtrace below):
Error STATION Homebase3 No matching HomeKit mode found for Eufy mode 0
When Eufy is actually set to schedule (from the app), it's returning a StationCurrentMode of 0 for Away, but this doesn't match the "Schedule" mode (2) that the plugin knows to map to hkAway. I believe the fix is to use StationGuardMode as this is the configured vs. the active mode:
StationAccessory.js
/**
* Handle requests to get the current configured value of the 'Security System Target State' characteristic
*/
handleSecuritySystemTargetStateGet(stateCharacteristic = 'handleSecuritySystemTargetStateGet') {
try {
const configuredValue = this.device.getPropertyValue(eufy_security_client_1.PropertyName.StationGuardMode);
if (configuredValue === -1) {
throw new Error('Something wrong with this device', configuredValue);
}
this.log.info(`GET StationGuardMode: ${configuredValue}`);
return this.convertEufytoHK(configuredValue);
}
catch (error) {
this.log.error(`${stateCharacteristic}: Wrong return value`, error);
return false;
}
}
This change seems to at least let me load the Accessories page, but I imagine the change from StationCurrentMode -> StationGuardMode will need to be done in more places.
What happened?
Context: In the Eufy app, I typically oscillate between the Home mode when I'm home and Schedule mode when I'm away, which has a schedule for mostly "Away" mode, but I do have a window for "Home" mode so my yard cameras don't trigger an alarm during the time that my gardener visits. (This works well for me because the Eufy schedule mode has been much more reliable than trying to schedule it with HomeKit automations)
In the Eufy mode mappings I have likely what's pretty typical (except for hkAway mode):
hkHome => eufyHome hkAway => eufySchedule hkNight => eufyNight hkOff => eufyDisabled
This causes an issue when setting the Eufy mode via (or even loading the homebridge Accessories page) with this error (more relevant logs and backtrace below):
When Eufy is actually set to schedule (from the app), it's returning a
StationCurrentMode
of 0 for Away, but this doesn't match the "Schedule" mode (2) that the plugin knows to map to hkAway. I believe the fix is to useStationGuardMode
as this is the configured vs. the active mode:StationAccessory.js
This change seems to at least let me load the Accessories page, but I imagine the change from
StationCurrentMode
->StationGuardMode
will need to be done in more places.Device Type
Station (Supported)
Plugin Version
v4.3.x (Best Effort)
HomeBridge Version
v1.8.4 (Supported)
NodeJS Version
v20 (Supported)
Operating System
Ubuntu 22.04+ (Supported)
Relevant log output
config