Open Zoriontsu opened 7 months ago
Hey there @fronzbot, @mkmer, mind taking a look at this issue as it has been labeled with an integration (blink
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
blink documentation blink source (message by IssueLinks)
Have the exact same issue...everything seems to be working except for blink.blink_update. Running Home Assistant os v 2023.12.0 as well
my errors is slightly different "Failed to call service script blink_camera_snapshot. 'device_id'" is flashed along the bottom of the UI... the logs have this: websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'device_id' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action return long_task.result() ^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/blink/services.py", line 150, in blink_refresh for coordinator in collect_coordinators(call.data[ATTR_DEVICE_ID]):
KeyError: 'device_id'
Hi, same condition and same errors here. Not an issue on 2023.11...
Sorry for the mistakes. PR should have the services all fixed up.
Hi! In my case the error still remains. Same like in @kwkid message. Switched back again for the 2nd time to 2023.11.
Core 2023.11.3 Supervisor 2023.11.6 Operating System 11.2 Frontend 20231030.2
BR
I think we have to wait for the next release to have the fix...? (same problem here..) meanwhile thank you
Unfortunately even after the update to 2023.12.2 i have the same problem...
Required key not provided @ data['device_id']
EDIT: I looked better, it seems now the refresh itself is not system wide but requires a camera id, right?
Yes, right. Add a camera ID and everything is fine! Thanks @ all
That doesn't work:
Yes, right. Add a camera ID and everything is fine! Thanks @ all
not clear to me if the update now works only on the listed camera or on all the system... ?
Update works on the whole system by picking one device id from the integration. This is a temporary situation, due to a mistake I made converting services. In the next pr, I have fixed this and you will only pick the integration from a pick list. If everything goes well, it should be in 2024.1
Sorry: I tried in every possible way: Always get the message that the device cannot be found in the device registration.
It doesn't work for me
device_id: has to be something like 9026fab6546fc1516d90045c4f86d1xx Using the GUI I've no problems to define it.
Ok, found it. Thank you. I use yaml and did not found the device_id even in the core registry. But using the gui and change from there into the yaml view provided the device_id. Strange path but it worked :-)
We will be depreciating blink.update
in the near future. Using Home Assistant Core Integration: Update entity
achieves the same result, may as well move to it now :)
Sounds good. Do I have to update one entity for all like blink.update or do I have to list all cameras here?
A list is allowed...
done and works perfectly
one entity gets all entities associated with the integration.
Trying to follow this thread. I found it because my scripts that leverage trigger_camera broke due to change from using entity_id to device_id. This doesn’t seem right, entity_ids should be the preferred method for a call like this right? Does the PR above revert this breaking change?
Use Assistant Core Integration: Update entity
- the core team recommended removing the blink.update
service in the near future. There is a PR https://github.com/home-assistant/core/pull/105413 that modifies Blink.Update
to use the config_entry rather than a device or entity (which makes more sense to me) but at some point the blink.update service will be removed.
Does that replicate the functionality of blink.trigger_camera
? In the past, my understanding was you had to use blink.trigger_camera
to have the camera take a picture and then blink.blink_update
to refresh. I'm basing my assumptions off the Blink documentation that does not reflect any of these changes.
I realize my questions are for a different service call than this original bug, and while I suspect they are related, I have logged an explicit bug for trigger_camera: https://github.com/home-assistant/core/issues/105991
Both services call the exact same code internally, hence the choice to remove one. As for updating, as soon as the next blinkpy is released we should no longer need to do a refresh after the trigger_camera, it will be automatic. https://github.com/home-assistant/core/blob/5f2a13fec6ae026ae8b786a7723f8296d9d48fea/homeassistant/components/blink/camera.py#L105-L110 Any "early" testing is appreciated by installing dev branch of blinkpy.
What is the underlying reason these calls were broken and switched to device_id and in turn, also made them less usable given the need to discover device_id vs. known entity_id? This feels like a major breaking change that was not thought through.
A mistake, no thought was involved :)
It happens, thanks for the clarity!
Both services call the exact same code internally, hence the choice to remove one. As for updating, as soon as the next blinkpy is released we should no longer need to do a refresh after the trigger_camera, it will be automatic.
Any "early" testing is appreciated by installing dev branch of blinkpy.
Hi, so I'm using NodeRed to trigger an update (Take new still) from all my cameras, I don't automation in HA. How does this change affect me?
Sorry should be on a new issue, but feel this thread is already covering it. Thanks.
Hi, already updated to 2024.1.3. The component works well again. blink.update is obsolete, yes but the service update_entity has to be called otherwise the dashboard camera picture will never be updated. Here, it needs around 7 Minutes until the picture is refreshed after a new snapshot.
PS: Correction: It needs a little less then 2 Minutes
From my point of view we can close this ticket.
Hi,
If I launch this simple automation from HA for my 2 Blink cameras:
alias: Blink update thumbnail
description:
condition: []
action:
- service: blink.trigger_camera
data: {}
target:
entity_id:
- camera.cam1
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: blink.trigger_camera
data: {}
target:
entity_id:
- camera.cam2
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: blink.blink_update
data: {}
mode: single
Thumbnails update almost instantly on the Official Blink mobile application.
But on the HA dashboard (Mobile/Desktop), you have to wait between 2 and 5 minutes to see the new thumbnails.
This is new behavior.
You should no longer need to update after the snaps, it's now in the Blinkpy code. I too have noticed the pictures not updating but have not found the root problem. I'm looking :)
Hi, solved: Grid Card:
type: grid
square: false
columns: 1
cards:
- type: entities
entities:
- entity: binary_sensor.casa_movimento
name: Movimento
title: Casa
- show_state: false
show_name: false
camera_view: auto
type: picture-entity
entity: camera.casa
tap_action:
action: call-service
service: script.turn_on
target:
entity_id: script.aggiorna_cam_casa
Script in /homeassistant/scripts.yaml:
aggiorna_cam_casa:
sequence:
- service: blink.trigger_camera
target:
entity_id: camera.casa
- service: blink.blink_update
target:
device_id: 22c370966f59fc92ed577657fff5003e
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
All features of the Blink Integration work OK for me, except the BLINK_UPDATE service. I get the following error: Failed to call service blink.blink_update. Unknown error![image](https://github.com/home-assistant/core/assets/22824068/23a427a7-9763-4b48-9e13-234b6d0eb464)
What version of Home Assistant Core has the issue?
core-2023.12.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Blink
Link to integration documentation on our website
https://www.home-assistant.io/integrations/blink/
Diagnostics information
File "/usr/src/homeassistant/homeassistant/components/blink/services.py", line 150, in blink_refresh
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response