[RELEASE] Eufy Security (Abandoned)

Login is working (also after reset base API URL), but get devices not:

app:157 2021-02-17 07:31:57.582 error groovyx.net.http.HttpResponseException: Unauthorized on line 507 (selectDevicePage)
app:157 2021-02-17 07:31:57.569 warn makeHttpCall: Invalid access token. Need to login again. uri=https://security-app-eu.eufylife.com/v1/app/get_hub_list
app:157 2021-02-17 07:31:57.565 error makeHttpCall: HttpResponseException uri=https://security-app-eu.eufylife.com/v1/app/get_hub_list status=401, body=null
app:157 2021-02-17 07:31:57.363 trace makeHttpCall methodFn=httpPost,
headers=[phone_model:Hubitat, openudid:..., x-auth-token:...]
app:157 2021-02-17 07:31:57.359 info updateDeviceList
app:157 2021-02-17 07:31:25.620 trace initPushNotifications
app:157 2021-02-17 07:31:25.617 debug setAuthToken: authTokenExpirationEpochMillis=1616135484000
app:157 2021-02-17 07:31:25.613 debug setAuthToken: authToken=...
app:157 2021-02-17 07:31:25.609 debug setAuthToken: userId=...
app:157 2021-02-17 07:31:25.606 info login: Changing base API URL to https://security-app-eu.eufylife.com/v1
app:157 2021-02-17 07:31:25.602 trace makeHttpCall: uri=https://mysecurity.eufylife.com/api/v1/passport/login status=200, data=[code:0, msg:ok, data:[user_id:..., email:..., nick_name:..., auth_token:..., token_expires_at:1616135484, avatar:, invitation_code:..., inviter_code:, verify_code_url:, mac_addr:, domain:security-app-eu.eufylife.com, ab_code:DE, geo_key:..., privilege:0, phone:, phone_code:, params:null, trust_list:[]]]
app:157 2021-02-17 07:31:24.575 trace makeHttpCall methodFn=httpPost,
body=[email:..., password:...],
headers=[phone_model:Hubitat, openudid:..., x-auth-token:...]
app:157 2021-02-17 07:31:24.571 trace login: loginScreen=true
app:157 2021-02-17 07:31:19.847 info appButtonHandler: Resetting base API URL to https://mysecurity.eufylife.com/api/v1

Added snooze function in v0.0.1, but had problems with clearing. Fixed snooze clearing in v0.0.3

1 Like

Looks like the domain got changed to "https://security-app-eu.eufylife.com" which is good, though looks like the error this time from the get_hub_list call is 401 error (rather than the missing data error before). Looks like it first logged in at "https://mysecurity.eufylife.com" and got the access token from there, my guess is you need to login to "https://security-app-eu.eufylife.com" instead. Subsequent logins should go to "https://security-app-eu.eufylife.com". Could you try hitting login one more time and then refreshing devices again?

Yeah, this time I got my 6 devices! :+1:
Thanx a lot!

Now I'm researching what I can do with the generated Devices...

BTW: I hope, renaming/relabeling is not a problem, is it?

Fantastic! It's working great with a quick test.

Awesome! Renaming is fine.

1 Like

Found 'em!

Excellent work. Now finding my doorbell.
Many Thanks

Hey there,

First of all @amosyuen, so glad you have worked on this! Have been looking for eufy integration to Habitat for a while. Am sure there will be many others.

Got the code installed and after a little jigging around with eufy login found my eufy devices (Homebase2, two EufyCam2, and wireless 2k Doorbell).

Used MakerAPI to expose these to iOS Home app and could see tiles for the eufycam2s and doorbell in Home app. (not the HomeBase2)
(screen grabs from makerAPI and Home APP attached)

Setup notes:

  • My two EufyCam2 and the 2kwireless doorbell are attached to Homebase2 wirelessly.
  • I have set up the two EufyCam2s in eufy app for apple hksv as they are HomeKit compatible (not the doorbell).

Am exploring to see how it all works so will likely come back with a stack of questions later. :slight_smile:

Thanks a lot for this -- great work!

I've managed to add my HomeBase2 and it's 'present' and I've managed to add my 2k battery doorbell, but it doesn't appear as present -- any ideas...?

Not present status means the poll http request is failing. So you I would recommend turning on trace logging and seeing why the http request is failing.

1 Like

Some weird (to me) things seem to be happening...

Looks like since I wrote the driver for the wired doorbell and the wired doorbell also acts like it's own station with a guard mode, it isn't handling the wireless doorbell correctly, which has the guard mode on the home base station. I pushed a fix in v0.0.4 that should handle the doorbell not having a guard mode properly. Let me know if that fixes the errors and presence problem.

1 Like

@amosyuen -- it worked! Great stuff, thanks for your work again!

Feature enhancement

This is just a thought, but since you are creating a device for the camera device could that device include the ability to be a virtual motion device. This would allow integration with something like the Tiny Cam app. I was testing and having good success with that application to bring motion events for the camera from my motion server into Hubitat.


Second that!

Unfortunately hubitat doesn't support UDP sockets or UDP requests with multiple responses. And looks like it's fairly low priority Persistent UDP - Feature Requests - Hubitat. So it looks like I won't be able to support:

  • Write commands to devices connected directly to a station (outdoor cameras and wireless doorbells)
  • Motion device
  • Push notifications
1 Like

Understood, but what i am asking for is not that you receive motion detentions as part of your app but allow the capability to be on the devices like the virtual motion sensor that is currently avaliable. Then i could use a external event to send the command to activate motion on the virtual device.

The purpose would be to eliminate having two devices in hubitat for motion detection with one Eufy device like I would need right now. I can get motion detection into Hubitat with a smartapp called TinyCam Connector. That software simply listens on a webhook for the motion trigger from a remote device that monitors the camera. As the software name indicates it was written to use with the Android App Tiny Cam Pro, but can also take a webhook from any software that will hit the correct URL. I actually have Motion Eye on my unraid server triggering the event. It has actually been working well for some time since i set it up. Once the webhook it called it then well send the state to any Virtual motion device setup. If we could enable the Motion capabilty on your driver then instead of building a second virtual device, i could just point it to the device your driver creates.


Ah, thanks for clarifying what you meant. I'm worried that it might be confusing for other users to have a virtual motion ability that is meant to be controlled by some other app.

Having two different devices doesn't seem too bad in terms of user experience in dashboards and UIs, and might be good in the sense that it clearly separates out the two different data sources.

Hi @amosyuen,

I've noticed that you use capability "Battery" for Cams and Bases - but I cannot see/get any battery values... :thinking:

So... Are you planing to integrate the battery values in the near future (for the Cams it would make sense) - or is this just a false declaration in the driver code?