Closed tommyjlong closed 4 years ago
I'm going to close this as I'm not seeing this error. If you can give me the details of where you are seeing this with the latest HA release please comment back and we'll reopen it.
Ok I see this in the HASS Logs not the console or request stream where I'd expect to see them.
@tommyjlong can you file an issue and see what we are supposed to use: https://github.com/home-assistant/core/pull/32473/files has no information and https://developers.home-assistant.io/docs/api/websocket/#fetching-camera-thumbnails still says to use this.
I hope you don't mind but I will decline. I would just be someone in the middle not contributing to the solution.
Logging an issue would be a huge help especially to this project (any help goes a long way). I asked in discord and got no response. I did look at what the front end is doing and it's calling camera_proxy
but the image images are not updated very often at all.....
Maybe this is helpful...after googling a bit, it was reported that Arlo cameras had this problem, but supposedly its been fixed (see here)
I haven't studied the code, but taking a look at the repository, around line 601 appears to be how they did it.
I'm seeing this issue a lot with using this card.
Logger: homeassistant.components.camera
Source: components/camera/__init__.py:552
Integration: Camera (documentation, issues)
First occurred: 11:10:10 AM (3455 occurrences)
Last logged: 2:02:25 PM
The websocket command 'camera_thumbnail' has been deprecated.
This is what the HA frontend does: https://github.com/home-assistant/frontend/blob/dev/src/data/camera.ts#L36
If you don't want to use signed paths, you can use the camera access token that is part of the state:
export const computThumbnailUrl = (entity: CameraEntity) =>
`/api/camera_proxy/${entity.entity_id}?token=${entity.attributes.access_token}`;
@balloob what is the delay on this? It seemed to refresh way slower than what the web sockets refreshed (almost real time). I was playing around with this and it's what I'm using locally (with the cameras token).
what do you mean with delay? We're deprecating the websocket version because we shouldn't push megabytes of data via the websocket API. It's not meant for that.
The camera thumbnail websocket API will be removed in a future version.
@balloob sorry for the delay, I haven't had much time lately but I started refactoring the whole component to be much more lightweight and not even use web sockets at all. I'm really close to pushing it out but stuck on two areas (working on trying to resolve issue 2 currently):
hass
object updates super super often.For delay/interval I was referring to the camera_proxy_stream. Seems like other web socket functions should be deprecated too like getting any image (for media players).
Just down to figuring out the first issue and making sure changes are efficient. Turns out the dirty checking in polymer needed a bit of help: https://polymer-library.polymer-project.org/1.0/docs/devguide/model-data#override-dirty-check
Uh, don't use Polymer 1.0! If you're going to rewrite it, use their new https://lit-element.polymer-project.org/ , it's what we use in the frontend too.
@balloob I'm using that :-)
This has been fixed in 0.0.3
@balloob is it more reliable to just refresh the image every time the hass object changes (throttled) and the motion state changes or listen to the web socket.. What would be really nice if I just set the refresh interval on a camera_proxy_stream and when motion is detected server side it would refresh the proxy stream immediately disregarding the interval.
https://github.com/custom-cards/surveillance-card/commit/1524fcbf95ff7e228ba3bc4c08bbfa5c018b825a
Fix on another component for that error message.
@Wibias I did that commit to resolve this issue. Are you still seeing it?
Whoops that was on the wrong Issue. Had way to many tabs open, sorry! I am using another Component which is having the same problem. https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/issues/67
Just started using this card in 0.107 and I'm getting a log warning (which I presume is coming from this card):
The websocket command 'camera_thumbnail' has been deprecated.
The websocket documentation doesn't mention anything here about it being deprecated: camera_thumbnails