robertklep / name.klep.homekitty

HomeyKit 3.0
14 stars 5 forks source link

Support additional Dufy Security App Devices passthrough HomeKitty #23

Open DolmensDude opened 1 year ago

DolmensDude commented 1 year ago

(make sure you also edit the title)

Type (brand/model) of device

Eufy Doorbell Eufy Floodlight Cam 2 Pro

Is it supported by HomeyKit?

No (not currently)

Device Classes

Find the device here: https://tools.developer.homey.app/tools/devices

What are it's class, and virtual class (if it has one)?

doorbell Driver | homey:app:com.eufylife.security — driver_VIDEO_DOORBELL_2K_BATTERY

Device Capabilities

(see above for where you can find these; please post ID, title and type)

(let me know if I should capture these better!)

for doorbell

onoff CMD_DEV_LED_SWITCH alarm_motion measure_battery measure_temperature CMD_DOORBELL_QUICK_RESPONSE CMD_START_STREAM CMD_SET_SNOOZE_MODE_HOMEBASE CMD_IRCUT_SWITCH CMD_BAT_DOORBELL_VIDEO_QUALITY CMD_BAT_DOORBELL_WDR_SWITCH NTFY_MOTION_DETECTION NTFY_FACE_DETECTION NTFY_PRESS_DOORBELL

for floodlight cam 2 pro

onoff CMD_DEV_LED_SWITCH alarm_motion CMD_IRCUT_SWITCH CMD_SET_FLOODLIGHT_MANUAL_SWITCH CMD_INDOOR_PAN_TURN CMD_SET_ARMING CMD_SET_ARMING_HUB CMD_REBOOT_HUB CMD_START_STREAM CMD_SET_SNOOZE_MODE CMD_TRIGGER_ALARM CMD_SET_HUB_ALARM_CLOSE NTFY_MOTION_DETECTION NTFY_FACE_DETECTION NTFY_PET_DETECTED

DolmensDude commented 1 year ago

eufy HomeBase2 is also not supported, although motion sensors linked to the homebase2 are coming through.

class is homealarm

robertklep commented 1 year ago

@martijnpoppen how is the onoff capability used for the doorbell? Is that the capability that's used to signal the doorbell has been pressed? And if so, does it switch on and then automatically back to off after some time?

DolmensDude commented 1 year ago

Hopefully these tables’ formatting doesn’t get mangled by replying via mail ;-)

onoff Turned on boolean null truefalse

SET

UNSET

CMD_DEV_LED_SWITCH Status LED boolean null

alarm_motion Motion alarm boolean false

3 hours ago measure_battery Battery number 91

14 hours ago measure_temperature Temperature number 13

14 hours ago CMD_DOORBELL_QUICK_RESPONSE Send Quick Response enum null 123456

SET

UNSET

CMD_START_STREAM Stream url string null

CMD_SET_SNOOZE_MODE_HOMEBASE Set Homebase snooze mode string null

CMD_IRCUT_SWITCH Toggle IR string null

CMD_BAT_DOORBELL_VIDEO_QUALITY Toggle HDR string null

CMD_BAT_DOORBELL_WDR_SWITCH Toggle WDR switch string null

NTFY_MOTION_DETECTION Motion Detected boolean false truefalse

SET

UNSET 3 hours ago NTFY_FACE_DETECTION Person Detected boolean false truefalse

SET

UNSET 14 hours ago NTFY_PRESS_DOORBELL Doorbell Press Detected boolean false truefalse

SET

UNSET 14 hours ag o

ID Title Type Value Set Value Last Changed onoff Turned on boolean true truefalse

SET

UNSET 21 hours ago CMD_DEV_LED_SWITCH Status LED boolean null

alarm_motion Motion alarm boolean false

21 hours ago CMD_IRCUT_SWITCH Toggle IR string null

CMD_SET_FLOODLIGHT_MANUAL_SWITCH Light boolean false truefalse

SET

UNSET 21 hours ago CMD_INDOOR_PAN_TURN CMD_INDOOR_PAN_TURN boolean null

CMD_SET_ARMING Arm Mode enum null homeawayschedulegeodisarmedoffcustom_1custom_2custom_3

SET

UNSET

CMD_SET_ARMING_HUB CMD_SET_ARMING_HUB boolean null

CMD_REBOOT_HUB Reboot string null

CMD_START_STREAM Stream url string null

CMD_SET_SNOOZE_MODE Set snooze mode string null

CMD_TRIGGER_ALARM Turn generic alarm on string null

CMD_SET_HUB_ALARM_CLOSE Turn generic alarm off string null

NTFY_MOTION_DETECTION Motion Detected boolean false truefalse

SET

UNSET 21 hours ago NTFY_FACE_DETECTION Person Detected boolean false truefalse

SET

UNSET 21 hours ago NTFY_PET_DETECTED Pet Detected boolean false truefalse

SET

UNSET 21 hours ago

DolmensDude commented 1 year ago

ugh... table formatting got "flattened"... :-(

robertklep commented 1 year ago

@DolmensDude not a big issue, I only really need the capability names and I can see those in the text 😊 I think the only thing missing is the device class for the floodlight cam 2 pro

DolmensDude commented 1 year ago

For the floodlight camera 2 pro, this is the class

Class camera

DolmensDude commented 1 year ago

How are devices split up into subclasses/capabilities?

The floodlight 2 pro cam is actually, an alarm, a light, a multitude of sensors/states, and also a camera….

robertklep commented 1 year ago

@DolmensDude given that its class is camera I probably won't be able to meaningfully "translate" it to a HomeKit device at all.

robertklep commented 1 year ago

So from what I can see:

DolmensDude commented 1 year ago

HomeKitty Devices page

The Homebase2 is listed, but the slider cannot be slid to ON position.

When I choose “unsupported” view, it’s in that list of items, alongside the doorbells, a Eufy Robovac and two pet doors :-)

martijnpoppen commented 1 year ago

@robertklep onoff is turning the camera off. So it wont detect motion. It also doesn't respond to Doorbell press

robertklep commented 1 year ago

@DolmensDude what happens with the HomeKit slider if you press the on/off button in Homey?

DolmensDude commented 1 year ago

I cannot move the slider in this overview.

If I go back to the devices page, touching this device here does not turn it off/dim it like with other devices. It’s just on.

robertklep commented 1 year ago

@DolmensDude that sounds like the issue is on the Homey side and not the HomeKit side.

DolmensDude commented 1 year ago

Yep, probably.

At least it’s a mismatch between the two.

I was late to the game for Homey, already in the HomeKit space, but bridging stuff into HomeKit was a great idea. A bit oversold by Homey that they had HomeKit support, so have been using the predecessor HomeyKitty off and on over the last year.

Homebridge requires maintenance that Homey tries to do on its own as it’s more productized.

For eufy, Martijn seems more timely with taking care of issues, although Homey cannot do ffmpeg transforms, so video handling is out of the question. The Homebridge eufy solution has fallen over twice recently - so I am looking at what can actually work on Homey, and what, if any, required functionality can and should be left to the native eufy app… or ultimately just ripping eufy out of the solution (which is a big deal actually).

We’ll see…. But what you guys do is truly fantastic. Truly!

martijnpoppen commented 1 year ago

The on/off might be related to the device settings. Every device has a checkbox in the settings if you want to have it permanently on. Because turning off camera's is not really a standard feature :p

Default it's just a on/off. but you can set it to always on

martijnpoppen commented 1 year ago

Not familliar with HKSV. But it's possible to trigger a HLS or RTMP stream from Homey. Not sure if that would work inside Homekit?

robertklep commented 1 year ago

I've never done anything with HKSV either but I briefly glanced at the HomeBridge implementation for Eufy and it looks like it requires a bunch of stream metadata.

martijnpoppen commented 1 year ago

Ah yes I see, and it needs FFMPEG to convert the data to a actual stream

robertklep commented 1 year ago

Okay, so Apple is making life more difficult than it should: there's a HomeKit service called "Doorbell" which I assumed I could use, but it doesn't work:

image

It looks like standalone doorbells aren't supported (anymore) and they should be part of a "video doorbell" accessory. HomeKitty at the moment doesn't support setting the accessory category, and I don't know if it will work if I use the correct category but without the "video" part (which I can't support). So this may take some time.

DolmensDude commented 1 year ago

ah yes, the proverbial “when’s a doorbell not really a doorbell?” dilemna!

Another day, it’s almost Christmas!

robertklep commented 1 year ago

Okay, so the doorbell implementation works, just not in the iOS Home app 🥴

Alternative HomeKit apps, like Home+ (which I use most of the time) can use it for automations, so I can trigger an automation based on the NTFY_PRESS_DOORBELL capability turning on.

I just published v1.2.7 as test version: https://homey.app/a/name.klep.homekitty/test/

martijnpoppen commented 1 year ago

Really nice! :D

DolmensDude commented 1 year ago

Installed the test version.

The slider to enable the two doorbells are now on.

Rebooted a few times.

Saw a “The HomeKitty app has stopped should be restarted manually” message once.

At the Homes Hubs & Bridges screen in the Home app, "Office HomeKitty A122" bridge says it has 8 devices, so that would be 2 more than before, but tapping that, there are still only the 6 true motion sensors but no doorbells.

Progress though!

The HomeBase2 will still not “turn on” within HomeKitty.

robertklep commented 1 year ago

I haven't implemented any other capabilities for the doorbells yet besides the button-pressed one. And the reason that they don't show up is very likely because of what I said, namely that they aren't supported by the iOS Home app (this is just Apple being stupid: the doorbell devices are actually supported by the protocol, it's just that the Home app itself cannot handle them).

As for the HomeBase2, I don't know why it's not working, and without an actual device I can't really debug that issue either 😬

DolmensDude commented 1 year ago

I have the Home app on macOS, tvOS, iPadOS as well… iPadOS being the “full” version like the iOS version.

There’s no hurry to do this right now. I cannot remove the HomeBase2 but perhaps I share to you for a debug session at some point down the line.

I’m still truly happy that the motion sensors are working!!! These were truly important!