but it can be that you get cashing problems. because i noticed that with default browser settings all those pics are still accessible afterwards.
so in that case you need to play with cash settings from your browser.
please report back in a few days if its going like we hope.
i will find out together with andrew how we can make it that the ha url and password dont need to be set.
and then i will make a PR so that Andrew can implement it.
It took longer this time, almost 10 minutes but it started flashing again. Only way around it was to refresh the page. I’ll keep trying some things. Thanks again
thats really a cash problem.
i had something simular on my beebox running linux.
i use firefox there.
then i edited the settings that pages dont get cashed at all and my problems were gone.
Just wanted to say thanks to ReneTode and photo64 for this! I’ve had the same issue with my synology camera setup and it’s been driving me nuts. This fix and refresh works perfectly so far! Thanks again.
Is this still the best way to add a camera? I have an LTS (OEM for HIKVision) and my camera shows an image for 4 seconds, refreshes, takes 10 seconds with a blank image until it refreshes. In Lovelace it is working fine.
you got the custom camera widget i created.
try changing the refresh.
and you can try the original widget with a long lived token. (remove custom widget)
i tried an easy fix for long lived token, but i cant get access that way, so then i need to take more time to completely rewrite the widget.
so for the moment its all there is.
the fact that you have blank image for so many time has to do with networkspeed and cache.
lovelace doesnt need a token and uses stream in stead of pics.
One, thanks so much for all your assistance. It has been great.
Two, I did try the original widget with a long lived token (I think) but it keeps changing the token.
This method seems to work well other than the blank image for a bit, so I will tweak the refresh. I am also running a home run cable so my HA server is wired, instead of wireless. Hopefully that will help. Do you recommend a longer or shorter refresh time?
HA server wired? and the device that runs the dashboard?
you got the refresh set to 10, with a still imageurl.
i dont know the default refreshrate from the still image cam, but i wouldnt go below that.
you could check in javaconsole if it blanks out at the moment it tries to reload, if thats the case it would be hard to get away from it.
i would first try it at 5 secs.
there is 1 other option i could try tonight. in my custom widget i retrieve the token from the entitypicture attribute.
that only gives the interval image and not the stream.
i could try to change that to stream and then there would be no refresh needed.
create a dashboard that contains camera like this:
title: camera
widget_dimensions: [120, 120]
widget_size: [1,1]
widget_margins: [2, 2]
columns: 8
layout:
- my_camera(3x2)
my_camera:
widget_type: camera
camera: camera.yourcamera
ha_url: http://your_ha_url:8123
password: your_ha_password
title: any title
stream: 1 #leave this out when streaming gives a to high load on the devices
refresh: 2 # leave this out for stream (unless you got cache problems the use a high (180) refreshrate)
to update there are 2 options:
replace your existing baseiframe.js and camera.yaml file with my new ones
edit camera.yaml
add the line
stream: ""
after pasword: “”
and edit baseiframe.js and add these lines
if ("stream" in self.parameters)
{
url_part2 = url_part2.replace("camera_proxy","camera_proxy_stream");
}
after
if ("password" in self.parameters)
{
url_part3 = "&api_password=" + self.parameters.password;
}
I tried both with my HA server being wireless and wired. Getting the stream for about 10 seconds, then it goes black for about 10 seconds, and goes back to the stream for 10 seconds. I have stream: 1 and left out the refresh:
Still not perfect, but perhaps it is how I have the camera set up. I will keep playing. Thank you so much for all your work.
So now I tried without the stream, but putting the refresh at 2. That seems to have done it! My HA server is still hard wired which was always in the plan, but now it has become a must. I can live with a 2 second feed to my camera!
Now I really have to figure out the slider for the dimmer. On to a different forum post pertaining to that! Thanks so much ReneTode
Hello ReneTode,
first off all i’am new here and so i have to say Hello @ all
The code looks fine and after reading all messages i believe it will wokrs fine.
On my side I have the motioneye camera working in HA and the sensor shows a picture as well.
I use the Cloude9 IDE, and try to find the bug.
I think it will be the URL / IP Adress to the device or Buffer.
How it is possible to debug the code or visualizes the URL on run state?
I hope my English is readable enough to describe me problem.
first you need to know that you need to show YAML and code as codeblock, or else it wont be readable.
that said, i dont know what your problem is.
you say it works well, but you dont say what is not working.
if you are trying to setup HADashboard and have a problem setting up widgets and also have trouble with english you can also reach me at https://discord.gg/ba93Fr4 where we have support in german. (i guess you are german, because you use german entity names )
interesting stuff here, i am also using the long url with the token, but i use it in a total other system in the cloud, where i fill in the url with token
but token changes, so url is not correct anymore
is there a way to exclude the token in the url , so i can use it in my other program? maybe with bearer or something?
For some reason i can only display images every 10 seconds apart. Not true streaming like lovelance UI. Any ideas what can i check? I applied ur code from Feb 20