[RELEASE] Eufy Security (Alpha)

Very early alpha release of Eufy Security. Recommend installing through Hubitat Package Manager

Code repo: hubitat/eufysecurity at main · amosyuen/hubitat · GitHub

Capabilities

Station

  • Read and write guard mode

  • Polls the servers every pollIntervalSeconds seconds, where pollIntervalSeconds can be set by the user. Defaults to every 5 minutes.

    Tested Devices

    • HomeBase 2

Doorbell

WARNING: Writing settings doesn't work for wireless doorbells connected directly to homebase

  • Turn on or off

  • Read and write guard mode

  • Read and write audio recording setting

  • Read and write motion detection setting

  • Read and write dection type setting

  • Read and write dection sensitivity setting

  • Polls the servers every pollIntervalSeconds seconds, where pollIntervalSeconds can be set by the user. Defaults to every 5 minutes.

    Tested Devices

    • Wired 2k Doorbell

Cameras

WARNING: Writing settings doesn't work for cameras connected directly to homebase

  • Turn on or off

  • Read and write audio recording setting

  • Read and write motion detection setting

  • Read and write dection type setting

  • Read and write dection sensitivity setting

  • Read and write power mode setting

  • Read and write record clip length setting

  • Read and write record retrigger interval setting

  • Polls the servers every pollIntervalSeconds seconds, where pollIntervalSeconds can be set by the user. Defaults to every 5 minutes.

    Tested Devices

    • EufyCam2

I don't have other Eufy devices to test with, but app should work with most of the cameras and doorbells assuming they work similarly. Please let me know if it works for you for other devices not in the tested list.

Known Issues

  • Devices directly connected to the homebase such as security cameras and wireless doorbells are unable to write settings with this implementation. Still working on figuring out if there is a way to get around that as they use some obscure P2P protocol.

Debugging

Steps to provide helpful debugging info if things aren't working.

Device not in list

If your device isn't showing up and is a doorbell / camera please do the following:

  1. Enable trace logging in the app
  2. In the app go to the page to list devices
  3. In your logs for the app, look for the logged response right after a "get_devs_list" call. Please PM me that response and explain what devices aren't getting listed. If you see any errors, also send those to me.

Device settings not showing up on device page

If your device settings are not showing on refresh, please do the following:

  1. Enable trace logging in the device page
  2. Click refresh on the device page
  3. In your logs for the device look for the logged response right after a "get_devs_list" call. Please PM me that response and explain what setting isn't getting set. If you see any errors, also send those to me.

Changing device settings not working

NOTE: If the device is connected directly to the home base (all the outdoor cameras and wireless doorbells), this is currently expected.

If your device settings are not getting changed do the following:

  1. Enable trace logging in the device page
  2. Click refresh on the device page
  3. In your logs for the device look for the logged response right after a "upload_devs_params" call. Please PM me that response and explain what setting isn't getting set. If you see any errors, also send those to me.
5 Likes

I only have one Eufy device, a wired doorbell, and the only function I've been looking for is the Motion Snooze.

I've installed this and it works great for everything it does. On/off, motion on/off, etc. Is there a way to trigger the snooze function?

I have four eufyCam 2C and two HomeBase 2 - so it would be very useful to have a working driver. :+1:

@amosyuen: I tried every step you mentioned, but cannot get any devices listed. :cry:

The log shows on every attempt this:
app:157 2021-02-14 16:04:55.000 [trace] updateDeviceList: hubs=null
app:157 2021-02-14 16:04:54.996 [trace] makeHttpCall: status=200, data=[code:0, msg:Succeed.]
app:157 2021-02-14 16:04:54.409 [trace] makeHttpCall methodFn=httpPost, uri=https://security-app.eufylife.com/v1/app/get_hub_list, body=[:], headers=[phone_model:Hubitat, openudid:7a57..., x-auth-token:4c38...]

=> Access-Token is valid, Internet-Connection is running.

I connected my account and the Wired doorbell 2k shows up as a device. Woohoo!

Dumb question: does this receive motion and doorbell events? Or is it just to control the settings of the doorbell itself?

Thanks!

1 Like

Thank you for this! I have the wireless doorbell and can at least change modes now so thanks!

I have been PM'ing with Amos as I'm a bit stuck, but perhaps any one else here can help out some?
I've got a HomeBase 2 with a Video Doorbell 2K Battery Powered. Neither device gets found when logging in into the app. Am I missing something? Can understand if the 2K-version might differ, but the HomeBase 2 is the same version both for this and the 1080P one, right?
I have followed Amos' directions, but unsure if it's because of it being so early on in progress or if I'm not tech savvy enough here.

Thought I would try this out and am getting an error when logging in.

Login Error Mon Feb 15 13:15:05 EST 2021 Error requesting two factor auth code: groovy.lang.MissingMethodException: No signature of method: user_app_amosyuen_Eufy_Security_257.apiPOST() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap, java.lang.Boolean) values: [/sms/send/verify_code, [message_type:2], false] Possible solutions: apiUrl()

I am going to test the 2k pan and tilt, and the 2k indoor camera.

Submitted fix for the two factor auth code error in v0.0.1.

So Jost and marcus.soderberg seem to be having the same problem where the get_hub_list and get_devs_list calls do not return any data. Normally the response looks more like:

makeHttpCall: status=200, data=[code:0, msg:Succeed. data:[[device_id: 1234,
...
]]]

but your logs show there is no data subfield in the data. Not sure why it isn't returning data for you guys, but possibly one thing might be different countries. I'm based in the US, what countries are you guys in?

Dumb question: does this receive motion and doorbell events? Or is it just to control the settings of the doorbell itself?

No motion events. I would love to add that functionality, but not finding a way to do that from the exposed API.

Germany.

Do you need some more (debug) data?

Sweden here.

Not really sure what needs to change, but a guess is that Europe needs to use a different api url, I submitted an update with some logic to change the api domain at login if the login response suggests a different domain. Could you try:

  1. Update the app past v0.0.1
  2. Log in again (clicking log in button)
  3. List devices again

So I've updated to latest (which is 0.01), unsure what you mean with past? Logged in again and listed devices once more.
Still no devices listed.
Looking through the logs and comparing with the previous screen dump I PM'ed, the only differences is a new token and that the login-info is fully readable (not good, huh?).

Let me know if there is anything more I can do albeit me being not so tech savvy here! :wink:

I got this in my log:

app:157 2021-02-16 21:56:57.146 error Login: org.apache.http.client.ClientProtocolException
app:157 2021-02-16 21:56:57.128 trace makeHttpCall methodFn=httpPost, uri=null/passport/login, body=[email:...@....., password:...], headers=[phone_model:Hubitat, openudid:7a57..., x-auth-token:4c38...]
app:157 2021-02-16 21:56:57.116 trace login: loginScreen=true

Before 0.0.1 I could at least do the login, now it's not working... :thinking:

OK, after the 4th or 5th attempt I could do the login - but still no devices. :cry:

@Jost: I got the same, but when checking after leaving it for a bit, it was logged in?

app:157 2021-02-16 22:09:16.697 trace updateDeviceList: devices=null
app:157 2021-02-16 22:09:16.694 trace makeHttpCall: uri=https://security-app.eufylife.com/v1/app/get_devs_list status=200, data=[code:0, msg:Succeed.]
app:157 2021-02-16 22:09:16.122 trace makeHttpCall methodFn=httpPost,
uri=https://security-app.eufylife.com/v1/app/get_devs_list,
body=[:],
headers=[phone_model:Hubitat, openudid:7a57..., x-auth-token:6ee8...]
app:157 2021-02-16 22:09:16.118 trace updateDeviceList: hubs=null
app:157 2021-02-16 22:09:16.114 trace makeHttpCall: uri=https://security-app.eufylife.com/v1/app/get_hub_list status=200, data=[code:0, msg:Succeed.]
app:157 2021-02-16 22:09:15.512 trace makeHttpCall methodFn=httpPost,
uri=https://security-app.eufylife.com/v1/app/get_hub_list,
body=[:],
headers=[phone_model:Hubitat, openudid:7a57..., x-auth-token:6ee8...]

Sorry guys, looks like there was a bug in my code that was reading the domain field from the wrong field. I fixed it in v0.0.2, could you try updating and re-logging in again.

groovy.lang.MissingMethodException: No signature of method: user_app_amosyuen_Eufy_Security_265.makeHttpCallAndHandleCode() is applicable for argument types: (java.lang.String, java.lang.String, java.util.LinkedHashMap, java.lang.Boolean) values: [httpPost, /app/trust_device/add, [verify_code:411184], false]

Two-factor authentication is active, got the code by mail as it should, but get the above error now.