Eufy Camera Integration

Good point i will check that.

Thanks

Still no joy. I have logged into the eufy mobile app and for the account im logging into with iobroker there are 4 devices available.

Actually ive added a new instance in iobroker and its now picking the devices up.

Thanks for the help.

1 Like

Once I get to a good point with the Eufy Security ioBroker integration, I may look into that.

1 Like

Thanks! I will come back to this :slight_smile:

1 Like

Some progress news:

I have now downloaded an encrypted video stored on the station, over P2P communication, decrypted it and converted it to an HLS stream. I played it back in the browser, including the audio, without any problems.

Now I will dedicate myself at the P2P livestream. :slight_smile:

I think that the current P2P implementation of my adapter will handle the livestream without further ado.

As soon as I have tested this successfully I will start to put all the pieces together and publish a first testable version for you.

So stay tuned :wink:

Some more progress news:

The P2P livestream also works.

Now it’s time to put all the pieces together and release a first testable version.

All tests were done by me with an eufyCam 2 streaming with h264 video codec and aac audio codec. The 2k cameras should stream with h265. Here I have not yet looked more closely in the source code of the Eufy Security App how this is handled…

PS: Sadly i reached the max number of replies on this topic (3)… :frowning: So i edited this message…

Some more progress news:

The P2P livestream has no time limit :wink:


Can someone explain to me why I can’t make new posts in this thread now? I already have 16 posts in this thread and now I get this message:

You have reached the reply limit for this topic
We’re sorry, but new users are temporarily limited to 3 replies in the same topic.

Instead of adding another reply, please consider editing your previous replies, or visiting other topics.

Thanks for any help.

13 Likes

Yes jbrukardt I added the eufy integration in HA

Sancho

Thanks! I followed the setup on your blog. Everything seems worked except the streaming. The picture-glance card does show the last motion image, however click it the pop windows doesn’t streaming. When I tried the stream url directly on the browser I got below response:

{
    error: "object has no state"
}

In HA log there is error:

ERROR (stream_worker) [homeassistant.components.stream.worker] Error opening stream No Stream

How do I troubleshoot this?

Thank you!

Hi Sancho2 - I ended up using MQTT (https://github.com/matijse/eufy-ha-mqtt-bridge/) to get this to work again. I now see a state change with doorbell press and the latest camera image pop up in lovelace. good luck!

2 questions:

  1. did you add stream: to your config?
  2. Did you try manually turning the stream on first in ioBroker/testing to see if the rest sensor template for the camera url will create a URL for you? It looks like you’re getting the “No Stream” default
  1. Yes stream: is added to the configuration.yaml file and restarted.
  2. How do I test that?

One thing to confirm, “CAMERA_ID” and “CAMERA_SERIAL_NUMBER” should be same thing, right?

Thanks.

Were you able to see your entities before MQTT?

Sancho

  1. ok cool.
  2. try manually calling the rest commands you set up and see if you see an RTMP url in the stream sensor you set up. If you turn it on, there should be a change. Alternatively, try the URL in your browser and see if you get a result or a failure.

And yes, that’s just a typo/overlook on my part. They’re the same ( eufy-security.0.CAMERA_ID.cameras.CAMERA_ID should be what you get from the iobroker page)

I’m having similar issues. Used your guide (with MaxW’s IObroker home assistant addon).

Getting a few errors in the log:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:215
Integration: Sensor (documentation, issues)
First occurred: 10:35:16 PM (10 occurrences)
Last logged: 10:40:16 PM

  • Platform rest not ready yet. Retrying in 30 seconds.
  • Platform rest not ready yet. Retrying in 60 seconds.
  • Platform rest not ready yet. Retrying in 90 seconds.
  • Platform rest not ready yet. Retrying in 120 seconds.
  • Platform rest not ready yet. Retrying in 150 seconds.

Logger: homeassistant.components.rest.data
Source: components/rest/data.py:67
Integration: rest (documentation, issues)
First occurred: 10:35:16 PM (10 occurrences)
Last logged: 10:40:16 PM

Log Details (ERROR)

Logger: homeassistant.components.generic.camera
Source: components/generic/camera.py:162
Integration: generic (documentation, issues)
First occurred: 10:35:35 PM (4 occurrences)
Last logged: 10:35:45 PM

Error getting new camera image from Eufy Doorbell: Cannot connect to host 192.168.1.251:8082 ssl:default [Connect call failed (‘192.168.1.251’, 8082)]

Relevant sections of my configuration.yaml below

Lovelace yaml for the card, same as yours but cleaned up a little to match my config

    cards:
      - type: picture-glance
        camera_image: camera.eufy_doorbell
        entities:
          - entity: camera.eufy_doorbell
        title: Eufy Camera
        double_tap_action:
          action: call-service
          service: rest_command.eufy_start_stream
        hold_action:
          action: call-service
          service: rest_command.eufy_stop_stream

Relevant portions of the config.yaml

sensor:
  - platform: rest
    name: Eufy Doorbell Guard Mode
    resource: "http://192.168.1.251:8087/getPlainValue/eufy-security.0.T8400P2020190CB2.station.guard_mode"
    scan_interval: 10
    value_template: >-
      {% set v = value | replace('"', "")|int  %}
      {{ {0: "Away",
          1: "Home",
          2: "Schedule",
          3: "Custom1",
          4: "Custom2",
          5: "Custom3",
          47: "Geofence",
          63: "Disarmed"}[v] | default("Unknown state:" + (value|urlencode)) }}

  - platform: rest
    name: Eufy Doorbell Stream
    resource: "http://192.168.1.251:8087/getPlainValue/eufy-security.0.T8400P2020190CB2.cameras.T8400P2020190CB2.livestream"
    scan_interval: 10
    value_template: >-
      {% if (value) is not none and (value) != 'error: datapoint "Livestream URL" not found' %}
        {{ value.replace('"', "") }}
      {% else %}
        No Stream
      {% endif %}
rest_command:
  eufy_start_stream:
    url: "http://192.168.1.251:8087/toggle/eufy-security.0.T8400P2020190CB2.cameras.T8400P2020190CB2.start_stream"

  eufy_stop_stream:
    url: "http://192.168.1.251:8087/toggle/eufy-security.0.T8400P2020190CB2.cameras.T8400P2020190CB2.stop_stream"

camera:
- platform: local_file
  file_path: /<config path>/images/mail_and_packages/mail_today.gif
  name: mail_usps
  
- platform: generic
  name: Eufy Doorbell
  still_image_url: http://192.168.1.251:8082/getPlainValue/eufy-security.0.T8400P2020190CB2.jpg
  stream_source: "{{ states('sensor.eufy_doorbell_stream') }}"

stream:
1 Like

Everything looks good in iobroker, i see all my addons, the rest interface is live on 8087

When i paste the rest command
http://192.168.1.251:8087/getPlainValue/eufy-security.0.T8400P2020190CB2.cameras.T8400P2020190CB2.livestream

in a browser I get nothing back. Times out

If i issue the same command on 8081 instead of 8087 i get

Cannot GET /getPlainValue/eufy-security.0.T8400P2020190CB2.cameras.T8400P2020190CB2.livestream

I´m trying to setup nonsleepers integration, but it fails after entering the credentials.
Log output:

2021-01-27 11:56:36 ERROR (MainThread) [homeassistant.components.camera] Error while setting up eufy_security platform for camera
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/eufy_security/camera.py", line 31, in async_setup_entry
    [EufySecurityCam(hass, camera) for camera in api.cameras.values()], True
  File "/config/custom_components/eufy_security/camera.py", line 31, in <listcomp>
    [EufySecurityCam(hass, camera) for camera in api.cameras.values()], True
  File "/config/custom_components/eufy_security/camera.py", line 46, in __init__
    self._ffmpeg_image_frame = ImageFrame(self._ffmpeg.binary, loop=hass.loop)
TypeError: __init__() got an unexpected keyword argument 'loop'

Edit:
Was already fixed, sorry for spam.

Check out this post: Eufy Camera Integration

Might need to open the ports as you may not have the port open.

ok, this did something, thank you!. Im getting rid of some errors now at least

doing the port mapping per that post, and changing all the rest calls in config.yaml to point to 8086 instead of 8087. That got rid of all the errors in the log except one

Error opening stream 404 page not found is the one that remains.

What happens if you try the URL directly in your browser?

unfortunately cant try that one right now as im remotely logged in. If i try it points to an internal ip/port thats not exposed. Will try in about 10 hours though.

This seems to be a complaint by HA about the stream: entry in the configuration.yaml. Thats jsut supposed to be a blank section?

Yeah should just be stream: as a line all by itself.