home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.64k stars 30.41k forks source link

Last motion image entity no longer being provided #121205

Open Tomanic-glitch opened 3 months ago

Tomanic-glitch commented 3 months ago

The problem

After update to core-2024.7.0 the Last motion mage entity is no longer being provided by the ezviz integration for my DP2 doorbell.

https://www.ezviz.com/product/DP2-2K/47961

ezviz_error

What version of Home Assistant Core has the issue?

core-2024.7.0

What was the last working version of Home Assistant Core?

core-2024.6.0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ezviz

Link to integration documentation on our website

https://www.home-assistant.io/integrations/ezviz

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 months ago

Hey there @renierm26, @baqs, mind taking a look at this issue as it has been labeled with an integration (ezviz) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `ezviz` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign ezviz` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


ezviz documentation ezviz source (message by IssueLinks)

anasiot commented 3 months ago

Same problem here

kirikorneev commented 3 months ago

+1

gabrielcolceriu commented 3 months ago

Same problem.

leebger commented 3 months ago

+1

banolka commented 3 months ago

+1

FerranMartin commented 3 months ago

+1

Here is some more information in case it is helpful ;)

I checked the logs, and I have this error:

2024-07-10 09:39:43.299 INFO (MainThread) [homeassistant.components.image] Setting up ezviz.image
2024-07-10 09:39:43.301 ERROR (MainThread) [homeassistant.components.image] Error while setting up ezviz platform for image
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 372, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 631, in async_add_entities
    for entity in new_entities:
  File "/usr/src/homeassistant/homeassistant/components/ezviz/image.py", line 39, in <genexpr>
    EzvizLastMotion(hass, coordinator, camera) for camera in coordinator.data
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/ezviz/image.py", line 60, in __init__
    camera.data[CONF_PASSWORD] if camera is not None else None
    ~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'password'

I have a CP4 device, and when I installed the integration I already had problems with this entity. It turned out that since I had configured a PIN to encrypt video and image data in the EZVIZ account, the integration couldn't use the image when accessing it, so I disabled this option. I don't think it has anything to do with it because I have checked and I still have this option disabled.

GuidoTraversari commented 3 months ago

same problem

Schermata 2024-07-11 alle 16 49 48
DmitryPodolsckiy commented 3 months ago

+1

cobirnm commented 3 months ago

+1

Here is some more information in case it is helpful ;)

I checked the logs, and I have this error:

2024-07-10 09:39:43.299 INFO (MainThread) [homeassistant.components.image] Setting up ezviz.image
2024-07-10 09:39:43.301 ERROR (MainThread) [homeassistant.components.image] Error while setting up ezviz platform for image
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 372, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 631, in async_add_entities
    for entity in new_entities:
  File "/usr/src/homeassistant/homeassistant/components/ezviz/image.py", line 39, in <genexpr>
    EzvizLastMotion(hass, coordinator, camera) for camera in coordinator.data
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/ezviz/image.py", line 60, in __init__
    camera.data[CONF_PASSWORD] if camera is not None else None
    ~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'password'

I have a CP4 device, and when I installed the integration I already had problems with this entity. It turned out that since I had configured a PIN to encrypt video and image data in the EZVIZ account, the integration couldn't use the image when accessing it, so I disabled this option. I don't think it has anything to do with it because I have checked and I still have this option disabled.

My error log displays exacly the same error

cobirnm commented 3 months ago

I would like to add that even if the component log does not show any changes, I installed EZVIZ from Home Assistant 2024.6.4 as a custom component and it's working on 2024.7.x. I'm attaching the custom component (I only changed the manifest). This can work as a temporary solution.

ezviz.zip

GuidoTraversari commented 3 months ago

I used that specific entity to send myself the photos of the last image taken from the peephole as an image on Telegram. I found a workaround. I used the entity that provides me with the URL, through a custom component found on hack (downloader), I download the file locally and then send it via Telegram. I couldn’t send the URL directly on Telegram because it didn’t work. I had to create an input_text entity to store the URL and trigger the automation only when the URL changed. It works for me, and maybe it can be useful for you.

`alias: "[Notifica] Notifica Telegram Spioncino 2.0" description: Invia la foto dell'ultimo movimento rilevato fuori la porta trigger:

skydado commented 3 months ago

Same problem here. It comes with HA 2024.7

raffalbednarz commented 3 months ago

Same problem here. It comes with HA 2024.7

Confirm it was working before HA 2024.7

Ciccio1234567 commented 3 months ago

Same problem

b4nd1t0 commented 3 months ago

Same problem

nexitpl commented 3 months ago

This Worked for me:

type: custom:config-template-card entities:

raffalbednarz commented 2 months ago

Thank you very much @nexitpl I can confirm is working for DP2C ! one small tips you need to install in /from HACS in user interface config-template-card and you need to activate entity in ezviz: yourname_last_alarm_picture_url. (in default is disable)

add card -> and very below choose YAML configuration editor then paste the code below:

type: custom:config-template-card entities: sensor.yourname_last_alarm_picture_url card: type: picture image: ${states["sensor.yourname_last_alarm_picture_url"].state}

skydado commented 2 months ago

Thanks @raffalbednarz for these further (needed!) steps. What if I want to recreate the old "image.xxxxxx" entity to let my automations and cards work again with the same old exposed entity name? I see that the HELPERS do not provide any "image" entity/sensor.

elatrapado commented 2 months ago

Thanks to @nexitpl and @raffalbednarz but I think I'm doing something wrong... I install the card from HACS and reboot. Then I create a new card manually as you indicate but it gives me the error in the image, can you please guide me? Greetings to all

Captura de pantalla 2024-08-08 a las 12 06 35

JosemyAB commented 2 months ago

I have created another way to get the image and send it via Telegram:

  1. Create a shell script in your configuration.yaml like this:

    # DOWNLOAD LAST IMAGE
    shell_command:
    download_last_image: "wget -O www/mirila-entrada-last-image.png  \"{{ states('sensor.<your-sensor>_last_alarm_picture_url') }}\""

    You need to restart your Home Assistant to apply the changes

  2. Create an automation to trigger the download and send it via Telegram every time the ...last_alarm_picture_url changes

    alias: "[Notificacion] Movimiento mirilla"
    description: ""
    trigger:
    - platform: state
    entity_id: sensor.<your-sensor>_last_alarm_picture_url
    action:
    - service: shell_command.download_last_image
    data: {}
    - service: telegram_bot.send_photo
    data:
      authentication: digest
      file: www/mirila-entrada-last-image.png

I hope it helps

raffalbednarz commented 2 months ago

Thanks to @nexitpl and @raffalbednarz but I think I'm doing something wrong... I install the card from HACS and reboot. Then I create a new card manually as you indicate but it gives me the error in the image, can you please guide me? Greetings to all

Captura de pantalla 2024-08-08 a las 12 06 35

HI the second type must be below card image

fnxfnx commented 1 month ago

I have the same problem :( It doesn't work on the latest version either.