Camera widget doesn't work

AD 4 is not far away from release.
and AD 4 beta already got the camera widget that doesnt need api.

my advise is to hold of updating HA untill AD 4 is fully released,
or get the camera widgets files from the dev version from AD and place it in the custom_widgets directory. documentation can be found in the dev documentation.

1 Like

@ReneTode, if I understood well, camera widged should be now configured like this:

camera_1:
  widget_type: camera
  entity: camera.garage_camera
  base_url: http://hassio.local:8123   
       (or  http:// 192.168.1.10:8123)
  refresh: 10

depends on which widget you use.
the camera widget that comes with the hassio version from AD only works with api password.
so you need AD 4 beta (not available to hassio)
or you need a custom widget.

It means that AD 4.1.0 installed as add on in hassio is not AD 4?

In this case I used following

entity_picture: /api/camera_proxy/camera.garage_camera?token=redactedb639077777cdc104afc3299393813a205ef9ed85d93fe8d5ada2

Tested even with api_password, but no way :frowning:

But after last HA update to 102.2 it stopped to work - I noticed that token is is not permanent (long lived)
Is there any way how to have camera widget working again?

4.1.0 is the addon version.
when you start AD and look in the logs you see that you are using AD 3.0.5

so you need these docs
https://appdaemon.readthedocs.io/en/latest/DASHBOARD_CREATION.html#camera

api password is been taken out of HA in the HA version you use.
so there are 3 options for you:

  1. wait for the AD 4 release (which is delayed because of IRL situations)
  2. go back to HA 100
  3. use a custom widget.

its possible to take the camera widget files from the AD dev github and place them in your custom widget directory. but they need a small change to work if i am not mistaken.

It is what Iā€™ve tryied, api password still works, problem seems to be changing token.
Thanks anyhow.

i heard that they have taken api password (which was long deprecated) out of HA in 101
with api password you dont need token at all.

Hi,

After holding for a while I did the upgrade to HA 0.103 and to get the camera widget back, I also upgraded to the dev branch of appdaemon (will change to the stable 4.0 release when its ready). The new camera widget has a nice ā€œfull screenā€ mode when you click/touch it but it didnt revert back to the ā€œnormalā€ view. If you are using it on tablet running a full screen browser (fully or wallpanel) you get stuck because thereā€™s no ā€œbackā€ button. Is there a fix/special configuration to change that? thx.

even with fully i always can get back to the previous page. unless you prevent that in the settings.
but i think you have some custom widget, because the inbuilt camera widget in dev doesnt have a fullscreen function.

Yes and no :-). I dont use a custom widget, but a custom js. Sometime ago another user wrote a js which you can add to a skin custom_css dir. It worked fine on hadashboard 3, but not in hadashboard4. But even on a skin without this custom js Iā€™m getting this behaviour. I will start from scratch to check this.

Wellā€¦ I just started a new appdaemon-dev container with minimal configuration and a single dashboard with a camera widget. Here is what it look like:

if you move the mouse to the image you can see the it will open the HA camera URL, not a dashboard URL. And if you click you ended in the camera image:

No back button or click image to go back. Dashboard configuration is as simple as:

cam_ceu:
  widget_type: camera
  title: Cam Ceu
  base_url: http://192.168.0.50:8123
  entity: camera.ceu
  refresh: 10

reload:
  widget_type: reload
  title: Reload
  icon_active: mdi-refresh
  icon_inactive: mdi-refresh

layout:
    - cam_ceu(6x4), reload

i think that must be an option from your camera itself or from HA.
and the url makes me believe its something in HA doing that.

allthough its also possible that its a feature from the program you use to display that dashboard.

its definitely not something that comes from dashboard

when i view a camera widget, the way you do it, in google chrome on windows, its not clickable.

Hi,

Are we using the same appdaemon version? Mine is dev and was created with:

docker create --name=appdaemon-dev \
          -p 5051:5051 \
          -e HA_URL="http://192.168.0.50:8123" \
          -e DASH_URL="http://192.168.0.3:5051" \
          -v /etc/localtime:/etc/localtime:ro \
          -v /docker/appdaemon-dev/config:/conf \
          --restart=unless-stopped \
          acockburn/appdaemon:dev

Iā€™m on OSX but tried with safari, firefox and chrome and all of them had the same behaviour. Wallpanel on fire hd7 tablet too. Thatā€™s oddā€¦

i dont use docker, but i know the code from the widget. there is just NOTHING in the widget that would do that.
i know its on the wishlist from a lot of people, and i know there are custom camera widgets that do that.
but its not in the code.

but i dont have my cams inside HA anymore and my HA is not up to date.
its a HA link that is used to view the cam, so its very wel possible that a recent HA change caused that you think its an AD change.

but you can easy check that.
view the cam directly in a browser (without dashboard) or even better view it in an iframe.

you can even view it in an iframe widget from dashboard, and i think you will see the same behaviour.

I ran into the popup today for the camera widget. I really like it; however, Iā€™ll be finding a way to add the ability to close the window as well. Here is the line of code that added the functionality.

For now, I just added the widget locally as a custom, threw a target="_blank"on the anchor and called it a night. Iā€™ll find a better fix tomorrow after a cup of coffee.

Hi, can you share code?

Assuming youā€™re referring to this post? Camera widget doesn't work. If so, code example is linked in the post.