Illegal login - camera entity IDs always changing

Try WITHOUT token and WITH api key in the URL

appdaemon.yaml is not involved here!! it does nothing for the camera!
i know, because i have setup AD 1000 times and am involved in the development.
frank started to use api password in the url instead of token.

like i do also. i DONT use token in the url

@ReneTode I removed the token from the camera url as you suggested and replaced it with api_password=myownpassword

No camera stream showing and the Login attempt failed with invalid authentication appeared in HA from the device I tried to access the HADashboard I configured.

HA throws up a Login attempt or request with invalid authentication from my device as soon as I attempt to open my HADashboard dash file and no camera stream appears

The only way to stop this error AND show a stream is to use the short term access token OR I can comment out the Generic Camera in the Dash file which of course will show unknown widget.

I thought the whole point of the long term access token was to avoid situations like this.

Iā€™ve tried including the api_password=myownpassword and omitting the short term token in the camera url but this makes no difference.

It possibly works in the Foscam camera widget but not in the Generic camera widget.

i have 10 generic cams working with that so that definitly does work untill 0.82
the cams have there own tokens. not the one you create with HA.


this is a pic from 2 generic cams. and i never created any tokens.
and to access those cams i use

http://HA_IP:8123/api/camera_proxy/camera.gang_firetab?api_password=MY_PASSWORD or
http://HA_IP:8123/api/camera_proxy/camera.hal_1e_firetab?api_password=MY_PASSWORD

i can do that in a browser or in my dashboards without token, and it keeps running.

off course its possible they changed something after 0.82
the widget is just not setup to work with tokens, because at the time that AD was last updated we didnt know how to work with the tokens in js. thats why creating tokens will not work.

the url you give in the dashboard must be a valid 1 and it needs to work in a browser also.

I can confirm that my cam settings are exactly the same as yours in HA.

I can also confirm that the following url works in the browser and in HA Dashboard using the token currently in use in the HA UI entity_picture url in entity_picture using the token method which changes every few minutes. The api_password=myownpassword method does not work.

http://myurl/api/camera_proxy/camera.galaxy_9000?token=a2717a57e31c4a030a791d4491e6847554f8c9fc7a0c7a9d6342adc2af90270c

I am not requesting a token to be used anywhere in my setup so im wondering why now in v87 HA insists that HA Dashboard supplies one before it will pass the stream to it

i dont know.
2 possibilities:

  1. your api password isnt setup correct
  2. they have made a change in a version between 83 and 87 that makes that api doesnt work anymore with the camera proxy. they have made many changes in that area, but i cant confirm it because i still run 82.

but it should not be that hard to adapt the widget, so that it gets that entity picture url.
ill look into if i can find time to make a working custom widget for it, but i dont promise anything.

Thanks for that.

Looks like its back to v0.73ā€¦ again!!!

The new authorisation/verification system has blown it apart for me.

1 Like

Back at v073 now and all that authorisation and verification madness has disappeared and cameras are streaming away on Dashboard.

Iā€™m wondering how many others have upgraded and reverted as a result of these type of difficulties.Doesnā€™t sound too promising.Surely others using the generic widget were experiencing similar difficulties

not everyone, because i also have generic cameras and it works.
so you could also try version 0.82.1

Iā€™m still puzzled why HA is not feeding the stream back to HA Dashboard.

I was looking at the camera_entity in version 073 and while itā€™s displaying a token HA Dashboard does not require one to display the stream

I created a user name and password and a long term token when setting up HA v087 but thatā€™s purely for logging into HA. Thatā€™s nothing to do with HA Dashboard or the camera streams.

I did use the api_password without token in the dash file as you suggested but this made no difference.

I wonder what is causing this problem.

As a developer would you normally keep your system updated with the most recent release of HA.

you think so???. a developer is just someone who offers something he created for himself to other to use also.
there is not an obligation to check out HA every 2 weeks if there is something HA changing so you must also create an update to please others for free.
i think you forget that this is created in free time, for no money, by 1 person (with a little help), and that he has a live besides HA also :wink:

i personally think that the 2 week release from HA is insane, and i only update my system every few months. i really have no need to shutdown my heating, my lights, etc. make an update and hope that nothing breaks, every 2 weeks.
if i would do that, my wife would rip out everything.

I completely agree with you. I was just asking if it was something you would normally do.

I couldnā€™t agree more with the update cycle too. Maybe a stable release as a reference point and a beta version for those who want to spend their days testing.

I had v073 working nicely for an extended period and only realised that the whole authorisation/verification concept had been introduced at v076.

I tried updating with disastrous results so I reinstalled v087 and rebuilt my setup. Still trying to get it right as youā€™ve seen from todayā€™s question.

Thanks for all your help!!!

1 Like

Working perfectly in 0.87 here.

How about port number? 8123.

1 Like

@nickrout yes Iā€™m using 8123 as the port number in the url in the dash file

Could you paste a copy of the url from your dash file here so I can compare it with mine.

entity_picture: http://192.168.xx.yy:8123/api/camera_proxy/camera.dafang_motion_snapshot?token=d484e987c5e0e35dc52498605023ff7defdffe97bbef3736c6819de9f8295c85&api_password=xxxxxxx

The token I took from the dev-state page when first trying to set it up. It didnā€™t work so I added the api_password and then it did.

The token does keep changing on the dev-state page, I havenā€™t tried it without the token.

Ok so you use the token AND the api_password in the url. Thatā€™s interesting. Iā€™ll try that and report back here.

Yeah but I doubt that the token is doing anything as it keeps on changing in HA.

you could also try the custom widget i created (and forgot about)
it mentioned in here

1 Like

Thanks @ReneTode

Iā€™ll try both options and report back the results.

@nickrout thanks for that. Unfortunately this solution didnā€™t work in my case.

I assume you are using an updated version 87. This is a fresh install and the legacy password wouldnā€™t apply here.