Camera widget doesn't work

I am having trouble getting this to work in HADashboard as well. i am getting a blank image when I try to use camera. I think I have turned SSL off in HA and I never setup SSL in HADashboard. If I type in the address into chrome I am getting an error 401: Unauthorized which has me a little confused.

do you have set api pasword in HA?

http:
  api_password: !secret http_password

and do you have that same password in appdaemon.yaml?

the url you need to test in chrome is

http://the_url_you_used_in_appdaemon.yaml/api/camera_proxy/camera.living_room?api_password=the_api_password

Yes I have all of that and I had api_password in my URL. I wouldn’t think it would matter but my cameras are coming in from the Zoneminder component.

Here are my config files…

homeassistant:
  # Name of the location where Home Assistant is running
  name: HA
  # Location required to calculate the time the sun rises and sets
  latitude: XX
  longitude: -XX
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: XX
  # metric for Metric, imperial for Imperial
  unit_system: imperial
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/Indiana/Indianapolis
  # Customization file
  customize: !include customize.yaml
  packages: !include_dir_named includes/packages

# Show links to resources in log and frontend
#introduction:

# Enables the frontend


frontend:
  themes: !include themes.yaml

# Enables configuration UI
config:

http:
  api_password: !secret http_password
  base_url: XXX.XXX.XXX.XXX:8123

appdaemon.yaml

log:
  logfile: /conf/log/logfile.log
  errorfile: /conf/log/errorfile.log
  diagfile: /conf/log/diagnostic.log
appdaemon:
  threads: 10
  app_dir: /conf/apps
  plugins:
    HASS:
      type: hass
      ha_url: http://XXX.XXX.XXX.XXX:8123
      ha_key: Same as HA
      
hadashboard:
  dashboard_dir: /conf/dashboards
  dash_url: http://XXX.XXX.XXX.XXX:5050

does the camera have a token?
in some cases you need to pass that also.

if you cant get the url to work in the browser it cant work in the dashboard.
but its standard HA API, so it should work.

It does have a token and I have tried adding that as well and no luck.

So if i open in HA and right click on the image and open in a new tab I get the url at the top and it opens up fine in the browser. However if I try that same url in a new tab where I paste this address in then I get the 401: Unauthorized.

if you rightclick from the HA frontend, then you are authenticated the new way.
is that url the same as the one i gave you?

Yes i am authenticated the new way. It is the same (except it has the token like you mentioned.)

I noticed I had some denials in my home assistant so I went and added my IP under trusted_networks in the http section of the configuration and it worked.

1 Like

@ReneTode Thanks for your input of HADB. Just started to replace my MQTT Dashboard with HADB but am missing the cameras popping up when you click on them. I have a camera that is created from a file when someone pushes my doorbell and the wife clicks on that to get a fullscreen image quite regularly.

Any feedback on whether that can ever be supported?

recently we have been talking about adding javascript action files to dashboard.
the goal is to create default actions like navigate or popup and the user can connect those actions in the dashboard to a specific part from a widget.

but that is still on the drawingboard.

at this moment you got 2 options:

  1. put a small navigate widget beside the small cam, create a fullscreen dashboard for the cam, navigate to that and let it return after a set time (you can set that in the navigate widget)
  2. create a custom widget that does what you want, but it involves quite a bit of programming.

so the possibility to do it is there already, all it costs you is an extra widget place.

Awesome, thanks for the prompt reply. Hadn’t thought of option 1 and that could be a suitable workaround, thank you. And congrats on the documentation. Haven’t seen anything that comprehensive in a while. Well done.

i cant take credit for it.
Appdaemon, HADashboard and the docs is all the work from @aimc

i am just a sidekick that helps him, and answer the user questions as much as possible so he can do his awsome work.

Rene is too modest - AppDaemon and HAdashboard would not be what they were without his advice and support!

Agreed. Awesome project both of you.

Thanks for the tip! Added two buttons below; one for a 3s zoom and one for 7s. Wife happy! Any way to call one of the fullscreen dashes from Home Assistant?

navigate can be used for any url you like.
so you can also navigate to homeassistant

Thanks. I was more looking to get HA to call a HADB URL based on say motion detection but I see I can use Fully Kiosk Browser for that.

you dont even need fullly for that :wink:

https://appdaemon.readthedocs.io/en/latest/DASHBOARD_CREATION.html#external-commands

it can be done from AD directly or even from HA

Even better! Thank you. That will allow me to show the front door fullscreen when someone pushes the doorbell. Brilliant!

1 Like

Question. How does HA know where my HADB instance is if it running in a docker container on another IP?

thats the only disadvantage that we still have to deal with in the moment.
it changes all live dashboards that are out there if you follow the docs.