fuatakgun / eufy_security

Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Camera image not updating

bkr1969 opened this issue · comments

Please check existing (open or closed) issues before creating a new one. (https://github.com/fuatakgun/eufy_security/issues?q=is%3Aissue+)

If this is not an issue, you can use Discussions (https://github.com/fuatakgun/eufy_security/discussions) section.

Describe the bug

The thumbnail for the rtc camera does not update, neither during streaming event nor forced generate_image

To reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Image should update

Additional information

Go to Settings -> System -> Repairs -> Click on 3 dots (...) -> System Information and get Version and Installation Type to below fields;

  • Home Assistant Installation Type (OS - Supvervised - Core): Home Assistant OS
  • Home Assistant Core Version: 2024.1.2
  • Eufy Security Add-on Version: 1.7.1
  • Eufy Security Integration Version: Latest?

Hardware Information;

  • Camera Model: S330

  • Live Streaming Protocol (RTSP/P2P): RTSP

  • Debug Logs from Home Assistant (#624) - Without this, I will automatically resolve this issue

2024-01-11 07:20:48.480 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'event', 'event': {'source': 'device', 'event': 'command result', 'serialNumber': 'T8160P112317185D', 'command': 'set_property', 'returnCode': 0, 'returnCodeName': 'ERROR_PPCS_SUCCESSFUL', 'customData': {'property': {'name': 'rtspStream', 'value': True}}}}
2024-01-11 07:20:48.481 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] event not handled -T8160P112317185D - Event(type='command result', data={'source': 'device', 'event': 'command result', 'serialNumber': 'T8160P112317185D', 'command': 'set_property', 'returnCode': 0, 'returnCodeName': 'ERROR_PPCS_SUCCESSFUL', 'customData': {'property': {'name': 'rtspStream', 'value': True}}})

2024-01-11 07:20:49.083 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'event', 'event': {'source': 'device', 'event': 'command result', 'serialNumber': 'T8160P1123220168', 'command': 'set_property', 'returnCode': 0, 'returnCodeName': 'ERROR_PPCS_SUCCESSFUL', 'customData': {'property': {'name': 'rtspStream', 'value': True}}}}
2024-01-11 07:20:49.083 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] event not handled -T8160P1123220168 - Event(type='command result', data={'source': 'device', 'event': 'command result', 'serialNumber': 'T8160P1123220168', 'command': 'set_property', 'returnCode': 0, 'returnCodeName': 'ERROR_PPCS_SUCCESSFUL', 'customData': {'property': {'name': 'rtspStream', 'value': True}}})
  • Logs from Eufy Security Add-on (either from Add-ons page of Home Assistant or Docker output):
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2024-01-09 18:15:07.271  INFO  Eufy Security server listening on host 0.0.0.0, port 3000 
2024-01-09 18:15:10.818  INFO  Connected to station T8030P1323220444 on host 172.16.0.179 and port 16838 
2024-01-09 18:15:12.466  INFO  Push notification connection successfully established 
2024-01-09 22:10:02.123  INFO  Received push notification for changing guard mode 
{
  guard_mode: 1,
  current_mode: 1,
  stationSN: 'T8030P1323220444'
}
2024-01-10 06:00:42.895  INFO  Received push notification for changing guard mode 
{
  guard_mode: 3,
  current_mode: 3,
  stationSN: 'T8030P1323220444'
}
2024-01-10 12:00:43.153  INFO  Received push notification for changing guard mode 
{
  guard_mode: 1,
  current_mode: 1,
  stationSN: 'T8030P1323220444'
}
2024-01-11 06:00:45.018  INFO  Received push notification for changing guard mode 
{
  guard_mode: 3,
  current_mode: 3,
  stationSN: 'T8030P1323220444'
}
2024-01-11 10:21:52.808  WARN Heartbeat check failed for station T8030P1323220444. Connection seems lost. Try to reconnect... 
2024-01-11 10:21:52.812  INFO  Disconnected from station T8030P1323220444 
2024-01-11 10:21:58.461  INFO  Connected to station T8030P1323220444 on host 172.16.0.179 and port 10005 
2024-01-11 12:00:46.106  INFO  Received push notification for changing guard mode 
{
  guard_mode: 1,
  current_mode: 1,
  stationSN: 'T8030P1323220444'
}
2024-01-11 14:17:41.652  INFO  Client disconnected with ip: 172.16.0.253 port: 38638 code: 1006 reason: Abnormal Closure 
  • Would you share your device with me in case further debugging required? (Yes/No): Yes

Additional context

Add any other context about the problem goes here. Mainly, share everything as log files and use screenshots as last resort.

so, giving this a second thought, I see that camera snapshot is being updated regularly while streaming or when generate_image is called.
but this snapshot is stored under camera entity.
on the webrtc card example I shared, the logic is working like this;

  • if the camera is not streaming, show the poster (image.last_event -> this is not camera snapshot, this is last motion trigger event)
  • if the the camera is steraming, show the webrtc steram.

If you want, you can switch your webrtc card into this below;

type: custom:webrtc-camera
entity: camera.entrance
poster: camera.entrance

That is not helpful. If I even add an entity: line, I repeatedly get a "Can't get URL for camera 'whatever_entity_I_choose'". And I'm still looking at one camera image that is a month old.