Eufy Camera Integration

No that I’ve seen no.

I’ve recently purchased an indoor cam 2k (non pan-tilt) and been exploring the python library. I do have quite a bit of experience with python and reverse engineering things but I don’t consider myself an expert at all. A few things I’ve already noticed after about an hour of tinkering:

  • You can see the ON/OFF state of the camera in the params so I’m gonna investigate the possiblity to change this with the API.
  • Same as above but for the Status LED.

I know these aren’t groundbreaking discoveries but it’s a start, hopefully I get determined to investigate more and stumble across something. My only concern right now is I only have the indoor cam and I am aware that there might be param differences between cameras so I might need some help from others who have other cameras!

If you want to check to see what I am doing on my fork of the repo, check it here

Streaming is working for you?

I can get a costant streaming on motioneye if in the eufy setting I have the continuos recording on the sd card and in the RTSP setting

cool, how do I use this in HA?

I am able to get RTSP live stream into HA with following config after enabling it for through “storage” option from eufy secuirty app,

configuration.yaml

ffmpeg:
stream:
camera:
  - platform: generic
    name: Living Room
    still_image_url: http://194.178.20.159/jpg/image.jpg #fake url
    stream_source: rtsp://195.178.20.159:554/live0

and Lovelace config

  - type: vertical-stack
    cards:
      - type: picture-entity
        entity: camera.living_room
        camera_view: live
        tap_action:
          action: call-service
          service: camera.snapshot
          service_data:
            entity_id: camera.living_room
            filename: '/local/livingroom.jpg'

any knows how to get still image url from eufy cam?

5 Likes

Right now this is still in development on the API side of things, so it’d need to be merged in to the existing repo and then have the HA component updated, but thats probably not going to happen any time soon.

I made some nice progress tinkering with my indoor cam, I was able to get the following configurable using the API, it’s pretty much everything that is configurable in app for the settings of the indoor camera. I can’t guarantee this works for all camera’s because I don’t know if the property IDs are the same or not.

  • Status LED ON/OFF
  • Camera ON/OFF
  • Auto night vision ON/OFF
  • Watermark (Off, timestamp, timestamp and logo)
  • Motion detection ON/OFF
  • Motion detection activity zones (clear, set) (This currently only takes coordinates, there is no UI to configure the zones)
  • Motion detection types (Person/Pet/Other)
  • Motion detection sensitivity (lowest-highest)
  • Sound detection ON/OFF
  • Sound detection type (crying/other)
  • Sound detection sensitivity (lowest-highest)
  • Pet command ON/OFF
  • Pet command activity zones (this is the same as motion detection zones)
  • Pet command auto respond (this is fidgety - you can’t create audio here but you can select the one to be played, but you need to know it’s ID which currently is only known when it’s currently selected)
  • Continuous recording ON/OFF
  • Continuous recording type (24/7 OR scheduled) (can’t configure the schedules)
  • Video quality Streaming Quality (auto/high/medium/low)
  • Video quality Recording quality (2k/1080p)
  • Audio settings Microphone ON/OFF
  • Audio settings Audio recording ON/OFF
  • Audio settings speaker ON/OFF
  • Audio settings speaker volume (0-100)
  • Notification settings type (person/pet/other motion/crying/other sound) (switch each on/off)
  • Notification settings interval time (configurable in minutes, although UI only shows 0-5)
  • Notification settings content (most efficient/full effect/include thumbnail)
  • Mounting settings Flip image 180 ON/OFF

I know it seems like a lot but it’s got a glaring issue with it all. The camera DOESN’T update when you change these settings. You do see the new config in the app (after a pull to refresh), but the camera doesn’t reflect these changes. This is clearly noticable with the status LED, it doesn’t turn on/off when you change it with the API, but it does with the app.

My hunch is that it makes the API request, then makes a request directly to the camera to tell it that new config is available and it should download it, then the camera does a GET from the API and applies the new config. Unfortunately, I have been unable to track any requests so if anyone with better knowledge on that front can intercept some messages between the app -> camera or the camera -> the internet, we could get a clearer picture of what is going on.

Until the above is figured out, the API isn’t that useful if you need to change something in the app anyway for it to take effect. But I still think this is good progress in the right direction!

If you want to take a look through my changes/have a play with it, here is the repo:

3 Likes

I think this may be why @nosleepr went towards using MQTT? I recall that when there was a change in the way things worked around March I could see changes in the app (to turn off motion, for example) but I’d still get motion alerts.

Is there a way to automate this camera.turn_on Call Service? I notice I have to do it manually to get my eufy camera to update in my dashboard every time I restart my server. I’m using the HACS integration to setup and use my eufy camera in HA

Sure, i’m surprised that the camera stream is lasting long for you, I thought it timed out after 3 minutes.

But you can create an automation that triggers when HASS reboots and then fire the camera.turn_on script.


- alias: "HASS Restart Camera On"
  trigger:
    platform: homeassistant
    event: start
  action:
    - service: camera.turn_on
      data:
        entity_id: camera.whatever

If you find a solution to automatically call the camera.turn_on let me know! Right now my eufy cams just show some still image from forever ago every time I restart HA. I have to manually go into Developer Tools > Services and call camera.turn_on for my eufy cams

I’m still learning. Where do I put that code snippet you have above? It doesn’t seem to work when I stick it inside my configurations.yaml and the root level. Does it go in a different file? Does it go underneath something? Thanks!

It’s an automation. So either add the snippet to automation.yaml, or create a version of it using the interface: Configuration > Automations, click on the + then skip the wizard. Use the alias as the name, in the trigger section choose Home Assistant from the drop-down (the event should be set as Start automatically). Skip the conditions (unless you want to add conditions, of course!), then in the Actions use Call service from the drop-down, then camera.turn_on from the next one and finally the camera from the last one.

2 Likes

Hi all, i have a wired eufy doorbell
i installed the nosleepr itegration, got a camera doorbell entity, it shows me a still image of the last event triggered.
Is it okay? ive heard that integration for doorbells are lame
also have a check tab on the image (Preload stream) does this affect anything?

Your integration doesnt affect doorbell cameras?

As I don’t have the doorbell myself, I have been unable to test it. It’s possible that it would work (with minor code changes) but it could require a bit more work to support it.

And by “support” I mean just simple controls that the app can do, no doorbell/motion events (yet)

I’d also like to clarify that the fork I have is for the API only, it’s not a HA integration.

I wish someone could do the integration
Great work tho

I installed the custom repository (https://github.com/nonsleepr/ha-eufy-security) in HACS - but I cannot see an image in lovelace. What configurations are required to see that? there are no instructions in the github wiki. Thanks!

log shows:

$ more home-assistant.log |grep eufy                                     
2020-09-03 12:04:45 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for eufy_security which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
$
1 Like

Hello Integration Works for me i have juste the last image when motion or person is detected
but for each camera I have a lot of information. Anyone know the meaning of each code ? Is ther possible to doo something with it ?
Thanks
exemple Doorbeel:

1011: 1
1013: 1
1015: 0
1045: 0
1056: 0
1101: 86
1131: 1
1138: 21
1142: -46
1145: 0
1148: 0
1149: -1
1150: -1
1177: 255
1204: 
1210: 112
1225: 9
1229: 100
1230: 100
1239: 9
1240: 1
1241: 1
1243: 2
1246: 1
1273: 1
1276: 3
1277: 1
1286: 2
1288: 0
1401: 100
1408: 0
1702: 1
1703: 1
1704: 1
1705: 5
1708: 80
1709: 0
1710: {"notification_motion_onoff":1,"notification_ring_onoff":1,"notification_style":2}
1714: 0
1716: 1
1717: 26
1718: 0
2111: 3
99904: 0
100000: 1
access_token: xxxxxxxxxxxxxx (replaced)
model_name: T8210
brand: Eufy Security
attribution: Data provided by Eufy Security
hardware_version: T8210
serial_number: T8210xxxxxxxxxxxxxx (replaced)
software_version: 2.2.1.3
device_upgrade_now: 0
watermark_mode: 1
push_msg_mode: 0
friendly_name: Doorbell
entity_picture: /api/camera_proxy/camera.doorbell?token=xxxxxxxxxxxxxx (replaced)
supported_features: 3

for eufycam 2C :slight_smile:

1011: 1
1013: 1
1015: 0
1045: 1
1056: 0
1101: 58
1131: 1
1138: 22
1142: -55
1145: 1
1146: 1
1148: 0
1149: -1
1150: -1
1177: 255
1204: 
1210: 46
1225: 9
1229: 100
1230: 93
1239: 11
1240: 1
1241: 1
1243: 2
1246: 1
1273: 1
1276: 4
1277: 1
1286: 2
1288: 0
1401: 100
1408: 0
1702: 1
1703: 0
1704: 1
1705: 0
1708: 80
1709: 0
1710: {"notification_motion_onoff":1,"notification_ring_onoff":1,"notification_style":2}
1714: 0
1716: 1
1717: 26
1718: 0
2111: 2
99904: 0
access_token: xxxxxxxxxxxxxx (replaced)
model_name: T8113
brand: Eufy Security
attribution: Data provided by Eufy Security
hardware_version: eufy2_mini
serial_number: T8113xxxxxxxxxxxxxx (replaced)
software_version: 1.6.7
device_upgrade_now: 0
watermark_mode: 1
push_msg_mode: 0
friendly_name: Parking vue Rue
entity_picture: /api/camera_proxy/camera.parking_vue_rue?token=xxxxxxxxxxxxxx (replaced)
supported_features: 3