Open fatuuse opened 9 months ago
Hey there @davet2001, mind taking a look at this issue as it has been labeled with an integration (generic
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
generic documentation generic source (message by IssueLinks)
Working with mjpeg camera. https://www.home-assistant.io/integrations/mjpeg/
Hi @fatuuse, yes, this was identified before and was there are PR to resolve it #80810.
But it was declined with a preference to use a separate image entity #90564.
From what I can see, you can't add that via the integrations page. You may be able to use a picture or picture entity card for what you are trying to do.
Generic is a bit of a strange integration that used to be a multi-tool but is now mostly targeting cameras. I made a push to improve it significantly (UI, preview, URL checking, error messages), after I saw people having so much trouble setting up cameras. But I'm ok if those improvements migrate to improve other integrations that replace it.
For me the general takeaway was that 'generic' is not the best choice for something that only produces still images.
I think the reason generic camera is failing but mjpeg camera is not, is that generic is checking the image validity, but mjpeg is not.
The URL you linked starts with <?xml but the below checking code does not have a case to spot that, so deems the image invalid (I expect that is causing the error you stated, even though I could not see "URL returned image" in any of the error messages).
So I'm little bit confused. My goal is to include the yr.no svg image in my dashboard as fullpage image. As mentioned in this Thread the example "https://www.yr.no/en/content/1-72837/meteogram.svg" does not work with generic camera.
But what is the alternative? How can I create such a image entity ?
P.S. The example in the documentation should be changed in a way that states that this in not possible. It would be nice if the altrnative way would also be mentioned there.
But what is the alternative? How can I create such an image entity ?
You could use a picture card if you want this SVG on a dashboard.
P.S. The example in the documentation should be changed in a way that states that this in not possible. It would be nice if the altrnative way would also be mentioned there.
Yes, I agree. If we are not intending to support all types of SVG here we should use something else as an example.
The problem with the picture card is, that it does not reload frequently. Like this my weather forecast is sometimes 1-2 days old. I would expect it to reload let's say every 4 or 6 hours. Using the iframe card has similar issues. (The Dashboard is shown on a dedicated wall mounted tablet which does nothing else. The Software I'm using is FullyKiosk)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I think this should stay open as it's not really resolved yet.
I kind of found a solution. I'm currently using the "MJPEG IP Camera Integration" and entered the yr.no URL in the fields "MJPEG-URL" and "Standbild-URL" (probably "still image url"). That shows a resizing window which refreshes regularly. I don't know if it has other drawbacks.
The mininum to resolve this issue would be to remove the yr.svg section from the generic camera documentation. It is missleading. Better would be to add the section to the MJPEG IP Camera documentation. Best would be to have a special and intuitively named Integration for that.
Found this after failing to solve the problem of updating Yr datagrams. Tried the example for the Generic Camera. "MJPEG IP Camera Integration" did not work for me. However https://github.com/dimagoltsman/refreshable-picture-card did work. I find it strange that:
The problem
It's not possible to add an Yr SVG image in the integration config page. Error: URL returned image
https://www.yr.no/en/content/1-72837/meteogram.svg
Did work earlier with images from Yr in yaml.
Also broken with example in integration page. "Weather graph from yr.no Still Image URL: https://www.yr.no/en/content/1-72837/meteogram.svg Instructions on how to locate the SVG for your location are available at developer.yr.no"
What version of Home Assistant Core has the issue?
core-2024.2.1
What was the last working version of Home Assistant Core?
?
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Generic Camera
Link to integration documentation on our website
https://www.home-assistant.io/integrations/generic