Problem with showing camera's from HA on Appdaemon Dashboard?

Hmm, it’s only on my wallmounted tablet that it won’t show. On my PC (where I could see console errors) they are both shown.
One is just a weather report, and there is nothing to really stream, so that might be the wrong widget for this.

Tried clearing the browser cache? I have tested it on iPad, Galaxy Tab, Chrome and Firefox and Safari. I haven’t tested with a still image, only with streaming camera entities.

Well, it’s wallpanel and not a browser as such, but if I open it in a browser on the tablet, it just shows the first stream, not the second, in Wallpanel it shows the second image, not the first. I guess it doesn’t like the still image.
It’s more important for me to get the stream (which is my frontdoor doorbell) than the weather report :slight_smile:

I don’t see it update the image, if I refresh the page it does, but not until I do that, any idea?

Ok, it does update, just rather slowly, it’s more a series of snaps, than a stream.

It just displays the video stream from Home Assistant so it should update with the same interval as in the HA UI.

When using your custom widget, my cameras are not stream but instead displaying images in intervals of 3 seconds and 6 seconds. Strange! The stream is also not going full-screen on click.

Exactly the same I see, inside HA its more of a stream.

Interesting, well for the time being it seems to work alright for panels. Now I just need to figure out how to get WallPanel to stop randomly minimizing!

So I got this working and streaming via blue iris. A couple things I’ve run into:

  • Cameras stop streaming after an hour or so, dashboard must then be refresh to re-stream.
  • I can’t show more than 6 cameras on one dashboard.

I could add an option to reload the page at an interval. Can you see if you have any websocket errors in the HA log? Most likely, the websocket connection to Home Assistant is being closed for some reason.
Regarding the number of cameras, I have similar issues and I never figured out the cause.

  1. A refresh option might work, that way I could set the camera stream to reset every 30 minutes or so and that may keep the stream alive.
  2. No websocket errors and my log is in debug mode.
  3. The same camera limitation occurs with Rene’s custom component. This leads me to believe it’s a limitation of HA or possibly AppDaemon.

ok, if you add

    setTimeout(function(){
        location.reload()
    }, 30 * 60 * 1000)

(after the WidgetBase.call line) at line 20 in the basecamerastream.js file, the page will reload every 30 minutes. I will implement this properly as soon I have some time, with a parameter for the interval. I will also add som logging so you can see if HA or Appdaemon drops the websocket connection.

The limitation of the number of streams appear also in a stand-alone page (without using Appdaemon) so there might be a limitation in the browsers for this type of stream. I could try loading the stream into for instance an object tag instead of an img tag and see if there is any difference.

Implemented and works great. Is there a way to refresh the stream only, rather than the entire page?

The stream is refreshed roughly every 5 minutes which is the time-to-live assigned by HA to each token. The widget listens for state update on the camera entity and every 5 minutes, HA sends a new token and a few seconds later, the old token is no longer valid. The src property of the img tag is then updated with the new token. This should be enough to keep the page “alive”, but apperently not, so the page reload is the only safe option for now.

I see, that makes total sense. Thank you for info.

Did some testing. The stream stops after ~10 minutes.

You sir are a lifesaver. I have tried everything to get my cameras back after the api depreciation.
This has been the only fix that has worked for me so far.

I’m sure there are still a few tweaks to make this super smooth and bug free but…
Bloody legend it’s better than nothing

1 Like

ok, I will try a few more things and upload a test widget. Do you see any reason for the disconnect in the console and are there any "New access token: xxx" messages in the log?

I see tokens being assigned to camera in my HA log, but not specifically “New access token:”. The Appdaemon log only shows dashboards disconnects when refreshing the dashboard. Is there a way to get more info from Appdaemon?