Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Smart Lock C33 (T85L0) #528

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/_media/smartlock_t85l0_small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/supported_devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
| ![T8503 image](_media/smartlock_t8503_small.jpg) | Retrofit Smart Lock E110 (T8503; Smart Lock R10) | :heavy_check_mark: | Firmware: 1.0.7.7 (20230622) |
| ![T8504 image](_media/smartlock_t8504_small.jpg) | Retrofit Smart Lock E130 (T8504; Smart Lock R20) | :heavy_exclamation_mark: | |
| ![T8510P image](_media/smartlock_t8510P_t8520P_small.jpg) | Smart Lock S230 (T8510P) | :heavy_check_mark: | Firmware: 1.1.0.0 (20240123) |
| ![T85L0 image](_media/smartlock_t85l0_small.jpg) | Smart Lock C33 (T85L0) | :heavy_check_mark: | Firmware: 1.0.7.1 (20240801) |
| ![T8520P image](_media/smartlock_t8510P_t8520P_small.jpg) | Smart Lock S231 (T8520P) | :heavy_check_mark: | Firmware: ? (20240818) |
| ![T8960 image](_media/keypad_small.jpg) | Keypad (T8960) | :heavy_check_mark: | |
| ![T7400 image](_media/smartsafe_s10_t7400_small.jpg) | Smart Safe S10 (T7400) | :heavy_check_mark: | Firmware: 1.0.3.4 (20221029) |
Expand Down
6 changes: 3 additions & 3 deletions src/eufysecurity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1889,9 +1889,9 @@ export class EufySecurity extends TypedEmitter<EufySecurityEvents> {
}
}
this.getStationDevice(station.getSerial(), result.channel).then((device: Device) => {
if ((result.customData !== undefined && result.customData.property !== undefined && !device.isLockWifiR10() && !device.isLockWifiR20() && !device.isSmartSafe() && !device.isLockWifiT8506() && !device.isLockWifiT8502() && !device.isLockWifiT8510P() && !device.isLockWifiT8520P()) ||
if ((result.customData !== undefined && result.customData.property !== undefined && !device.isLockWifiR10() && !device.isLockWifiR20() && !device.isSmartSafe() && !device.isLockWifiT8506() && !device.isLockWifiT8502() && !device.isLockWifiT8510P() && !device.isLockWifiT8520P() && !device.isLockWifiT85L0()) ||
(result.customData !== undefined && result.customData.property !== undefined && device.isSmartSafe() && result.command_type !== CommandType.CMD_SMARTSAFE_SETTINGS) ||
(result.customData !== undefined && result.customData.property !== undefined && (device.isLockWifiT8506() || device.isLockWifiT8502() || device.isLockWifiT8510P() || device.isLockWifiT8520P()) && result.command_type !== CommandType.CMD_DOORLOCK_SET_PUSH_MODE)) {
(result.customData !== undefined && result.customData.property !== undefined && (device.isLockWifiT8506() || device.isLockWifiT8502() || device.isLockWifiT8510P() || device.isLockWifiT8520P() || device.isLockWifiT85L0()) && result.command_type !== CommandType.CMD_DOORLOCK_SET_PUSH_MODE)) {
if (device.hasProperty(result.customData.property.name)) {
const metadata = device.getPropertyMetadata(result.customData.property.name);
if (typeof result.customData.property.value !== "object" || metadata.type === "object") {
Expand Down Expand Up @@ -2490,7 +2490,7 @@ export class EufySecurity extends TypedEmitter<EufySecurityEvents> {
let found = false;
for (const user of users) {
if (user.user_name === username) {
if ((device.isLockWifiT8506() || device.isLockWifiT8502() || device.isLockWifiT8510P() || device.isLockWifiT8520P()) && user.password_list.length > 0) {
if ((device.isLockWifiT8506() || device.isLockWifiT8502() || device.isLockWifiT8510P() || device.isLockWifiT8520P() || device.isLockWifiT85L0()) && user.password_list.length > 0) {
for (const entry of user.password_list) {
if (entry.password_type === UserPasswordType.PIN) {
let schedule = entry.schedule;
Expand Down
15 changes: 13 additions & 2 deletions src/http/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,7 @@ export class Device extends TypedEmitter<DeviceEvents> {
type == DeviceType.LOCK_85A3 ||
type == DeviceType.LOCK_8506 ||
type == DeviceType.LOCK_8502 ||
type == DeviceType.LOCK_85L0 ||
type == DeviceType.SMART_SAFE_7400 ||
type == DeviceType.SMART_SAFE_7401 ||
type == DeviceType.SMART_SAFE_7402 ||
Expand Down Expand Up @@ -1186,7 +1187,8 @@ export class Device extends TypedEmitter<DeviceEvents> {
Device.isLockWifiR20(type) ||
Device.isLockWifiVideo(type) ||
Device.isLockWifiT8506(type) ||
Device.isLockWifiT8502(type);
Device.isLockWifiT8502(type) ||
Device.isLockWifiT85L0(type);
}

static isLockKeypad(type: number): boolean {
Expand Down Expand Up @@ -1249,6 +1251,10 @@ export class Device extends TypedEmitter<DeviceEvents> {
return false;
}

static isLockWifiT85L0(type: number): boolean {
return DeviceType.LOCK_85L0 == type;
}

static isBatteryDoorbell1(type: number): boolean {
return DeviceType.BATTERY_DOORBELL == type;
}
Expand Down Expand Up @@ -1453,7 +1459,8 @@ export class Device extends TypedEmitter<DeviceEvents> {
sn.startsWith("T8502") ||
sn.startsWith("T8504") ||
sn.startsWith("T8506") ||
sn.startsWith("T8530");
sn.startsWith("T8530") ||
sn.startsWith("T85L0");
}

static isGarageCameraBySn(sn: string): boolean {
Expand Down Expand Up @@ -1608,6 +1615,10 @@ export class Device extends TypedEmitter<DeviceEvents> {
return Device.isLockWifiT8520P(this.rawDevice.device_type, this.rawDevice.device_sn);
}

public isLockWifiT85L0(): boolean {
return Device.isLockWifiT85L0(this.rawDevice.device_type);
}

public isBatteryDoorbell1(): boolean {
return Device.isBatteryDoorbell1(this.rawDevice.device_type);
}
Expand Down
Loading