Eufy Security Integration

Yes… It is loosing the connection even when i am not streaming. When i click on the stream, the camera gets unavailable immediatly and stays unavailable until i reload the add on anf the integration. It works only for a couple if minutes after installation or reloading.

Same here. Good to hear it’s not just me. It works after a restart of the addon, but only temporarily. Log shows nothing other than normal start, but both ptz cams are unavailable in UI.

Hi,

For me this code runs and all cameras go and they all stop automatically after 55 seconds if I don’t stop them manually.

Start Camera Code:

square: false
columns: 1
type: grid
cards:
  - type: conditional
    conditions:
      - entity: binary_sensor.front_door_streaming_sensor_2
        state: 'False'
    card:
      show_state: true
      show_name: true
      camera_view: auto
      type: picture-glance
      title: Front Door Cam
      entities:
        - sensor.front_door_battery_2
        - binary_sensor.front_door_global_motion_sensor_2
      tap_action:
        action: call-service
        service: camera.turn_on
        target:
          entity_id: camera.front_door_2
      camera_image: camera.front_door_2
      image: camera.front_door_2
  - type: conditional
    conditions:
      - entity: binary_sensor.front_door_streaming_sensor_2
        state: 'True'
    card:
      type: vertical-stack
      cards:
        - type: custom:webrtc-camera
          entity: camera.front_door_2
          ui: true
          shortcuts:
            services:
              - name: Power Off
                icon: mdi:power
                service: camera.turn_off
                service_data:
                  entity_id: camera.front_door_2
              - name: Power Off
                icon: mdi:play
                service: camera.turn_on
                service_data:
                  entity_id: camera.front_door_2

I’ll put in an example code, for me this automation stops the cameras when they go. Automatic script

alias: Stop All Cam
description: Stop All Cam
trigger:
  - platform: state
    entity_id:
      - binary_sensor.front_door_streaming_sensor_2
      - binary_sensor.front_right_side_streaming_sensor
      - binary_sensor.front_right_side2_streaming_sensor
      - binary_sensor.front_side_left_streaming_sensor
      - binary_sensor.garage_streaming_sensor
      - binary_sensor.garden_lake_streaming_sensor
      - binary_sensor.house_right_side_streaming_sensor
      - binary_sensor.left_side_streaming_sensor
      - binary_sensor.terrace_right_streaming_sensor
      - binary_sensor.terrace_left_streaming_sensor
    from: "False"
    to: "True"
condition: []
action:
  - delay:
      hours: 0
      minutes: 0
      seconds: 55
      milliseconds: 0
  - service: script.all_camera_stop
    data: {}
mode: restart


Stop Script:

alias: "All Camera Stop "
sequence:
  - service: camera.turn_off
    target:
      entity_id:
        - camera.front_door_2
        - camera.front_right_side
        - camera.front_right_side2
        - camera.front_side_left
        - camera.garage
        - camera.garden_lake
        - camera.house_right_side
        - camera.left_side
        - camera.terrace_right
        - camera.terrace_left
    data: {}
mode: single
icon: mdi:stop

I hope this helps

I’m still seeing

Config entry 'localhost' for eufy_security integration not ready yet: Start Listening was not completed in timely manner; Retrying in background

, but now it’s showing up as a warning in the logs instead of an actual error in the Integrations list.

However, I am getting errors related to an invalid DEVICE_TYPE for two of the new video smart locks. For both it’s coming back with,

eufy_security - Exception - process_messages: 55 is not a valid DEVICE_TYPE - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/websocket.py", line 57, in process_messages await self.on_message(msg) File "/config/custom_components/eufy_security/websocket.py", line 68, in on_message await self.message_callback(message) File "/config/custom_components/eufy_security/coordinator.py", line 313, in on_message await self.process_get_device_properties_response( File "/config/custom_components/eufy_security/coordinator.py", line 258, in process_get_device_properties_response device.set_properties(properties) File "/config/custom_components/eufy_security/const.py", line 452, in set_properties type = DEVICE_TYPE(self.type_raw) File "/usr/local/lib/python3.10/enum.py", line 385, in __call__ return cls.__new__(cls, value) File "/usr/local/lib/python3.10/enum.py", line 710, in __new__ raise ve_exc ValueError: 55 is not a valid DEVICE_TYPE - message: WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"result","success":true,"messageId":"get_device_properties","result":{"serialNumber":"xxxxxxxxxxxxx","properties":{"name":"Back Door","model":"T8530","serialNumber":"xxxxxxxxxxxxx","type":55,"hardwareVersion":"P1","softwareVersion":"1.1.7.2","stationSerialNumber":"xxxxxxxxxxxxx"}}}', extra='')

I then see a followup error stating

Error setting up entry localhost for eufy_security
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/eufy_security/__init__.py", line 51, in async_setup_entry
    await coordinator.initialize()
  File "/config/custom_components/eufy_security/coordinator.py", line 90, in initialize
    await self.set_devices()
  File "/config/custom_components/eufy_security/coordinator.py", line 171, in set_devices
    await self.ws.ws.close()
AttributeError: 'NoneType' object has no attribute 'close'

Eufy Security Add-on stopped working for me a few days ago, I’m getting

2022-11-20 21:13:35.414  INFO  Eufy Security server listening on host 0.0.0.0, port 3000 
2022-11-20 21:15:00.996  INFO  Client disconnected with ip: 172.30.32.1 port: 36076 code: 1000 reason: Normal Closure 
2022-11-20 21:16:34.004  INFO  Client disconnected with ip: 172.30.32.1 port: 56614 code: 1000 reason: Normal Closure 
...

this is not my ip

I had the same issue. Check out this link: changing the TRUSTED_DEVICE_NAME to any value worked for me.

4 Likes

yes, helped, thanks!

Since the update of HA yesterday my Eufy status isn’t updated anymore. Nor can I control my alarm system. Anyone else experiance this?

Practically it armed the alarm yesterday before Inupdated HA, but never disarmed it in the morning. Automations and dashboard do not respond. The dashboard shows the old ‘armed away’ status despite using the Eufy app to set it to armed home.

Logs show a wifi error?


• device.ts:37 initializeState
    node_modules/eufy-security-client/src/http/device.ts:37:14
2022-11-22 18:28:00.108  ERROR Invalid Property wifiSignalLevel error 
 InvalidPropertyError  Property wifiSignalLevel invalid
error stack:
• device.ts:507 getPropertyMetadata
    node_modules/eufy-security-client/src/http/device.ts:507:15
• device.ts:76 updateProperty
    node_modules/eufy-security-client/src/http/device.ts:76:48
• device.ts:120 handlePropertyChange
    node_modules/eufy-security-client/src/http/device.ts:120:18
• device.ts:2106 handlePropertyChange
    node_modules/eufy-security-client/src/http/device.ts:2106:15
• device.ts:76 updateProperty
    node_modules/eufy-security-client/src/http/device.ts:76:22

We are waiting on new version of eufy-security-ws which will fix this.

4 Likes

Ah! Cool you are ontop of it. Guessing the new release of HA broke something?

Is it still possible to access the pictureurl?

Just updated to the latest versions and the following no longer works and I cant find it in any attributes.

{{ states.camera.doorbell.attributes.inherited.state.pictureUrl }}

For more info:
I’m using a battery doorbell and casting a doorbell sound when the doorbell is pressed with a thumbnail which was the pictureUrl.

Reading previous comments just tried to cast this as the thumbnail: /api/camera_proxy/camera.doorbell
tried with the token on the end of the url as well. ?token=xxxx

Ive created a dashboard with a picture entity of the doorbell image and i can cast that but i cant have a sound with that as well.

EDIT:
figured i needed my external https address on the front of the /api/cameraxxx

https://dnsname:port/api/camera_proxy/camera.doorbell?token=thetoken

and you can get the api/ with the token from

{{ states.camera.doorbell.attributes.entity_picture }}

Thnx, worked like a charm!

Hey,
were you ever able to get the T8210 doorbell video working in HA?

No updates have resolved my issue as yet, and I’m on top of looking for updates and pushing them through as soon as I see them.

It consistently can’t find the camera url for streaming, so the whole card for your integration never appears on my dash (except when I edit it). Curiously, I can FORCE the card to stream by clicking on the idle picture image - then both turn to a live, streaming view. Clicking on “stop streaming” however returns it to the previous “no camera url” view.

Here’s pictures of both scenarios.

And here’s the log relating to this from the addon portion of your integration (IP redacted):

2022-11-27 07:20:16.566  WARN Station T8200N00210315E4 - Heartbeat check failed. Connection seems lost. Try to reconnect... 
2022-11-27 07:20:16.567  INFO  Disconnected from station T8200N00210315E4 
2022-11-27 07:20:21.798  INFO  Connected to station T8200N00210315E4 on host xx.xx.xx.xx and port 16689

Fingers crossed you might have an idea or suggestions to finally resolve this.

I am still messing with the battery doorbell entity picture.

I have noticed that the below attribute updates once every 5 minutes with the new api and token.

{{ states.camera.doorbell.attributes.entity_picture }}

When an event occurs (motion or doorbell press) sometimes the entity picture can be delayed in updating.

Is there an event or attribute i can monitor to know when the latest image has been grabbed and hosted at the api / token address?

The cameras changed or last updated properties don’t seem to update in this scenario.
{{ states.camera.doorbell.last_updated }}

rtspError

i keep getting this error when the stream starts

is there a way to use the nightvision auto as a trigger? I would like to get a notification if the nightvision isnt on after 8pm as it means under my house lights are still on. I cant see nightvision in the history at all but thought id ask :slight_smile:

Thanks guys.

Took 2 weeks for me to find out.
Thank you! This worked for me as well!

1 Like

I am currently in the exact same state using my eufy dual doorbell. Clicking the card does nothing that just throws me more errors and when in dashboard edit mode its shows the same error as you have.

Did you also take this card(s) as an example?

Is the picture that it shows supposed to be the last event or the last frame of the stream? Cause it never updates for me :stuck_out_tongue: and is the same frame it took when the doorbell was first turned on (earlier today)

When i look at the ‘Doorbell Streaming Source Address entity’ it showed a address for a couple minutes then became unavailable. Could this have to do something with the installation of ’ WebRTC’

Hopefully we can find a solution.

Yes, that’s exactly what I’m using, though I have tried other ways with no joy either. It doesn’t matter how I try to call those Eufy cameras, it can’t find the camera url. If I didn’t have several other Eufy products (Floodlight + Keyless Entry) I’d consider migrating to Arlo instead.

My understanding is the pictures it shows is the same snapshot you’d see on your phone in the Eufy app for the most recent event. So in my post, it was 2 Amazon delivery people having dropped something at my door the previous night.