Open arrikhan opened 5 months ago
I'm actually working on this in the images branch, if you're able to give any input on that branch it would be greatly appreciated.
I would love to add current images of sun conditions, corona conditions, aurora predictions. I am trying with multiscraper but no luck yet
Thanks for the interest @arrikhan and @dro-ex
I kind of stalled out on this, but I have it really close I think.
So far in the python library I wrote to actually pull data from NOAA SWPC I have the ability to generate GIFs like this:
[Original 1280x1280]
My first problem is that not all users may want to enable animations because they are network and CPU intensive to stitch together, I haven't figured out how to allow users to enable/disable the feature.
The next problem is that when you install the component it wants to update all the data on initialization, including several animations makes the normally near instant installation of this component take ~30 seconds. I'm not okay with that.
I need to figure out a way to lazy load these after installation, maybe presenting a placeholder until the first image is available. The long creation time shouldn't be an issue in a ~10 minute polling period, I just need to allow opt-out and not make it take so long on installation.
open to ideas and PRs, I'll try to get back into looking at this
My first problem is that not all users may want to enable animations because they are network and CPU intensive to stitch together, I haven't figured out how to allow users to enable/disable the feature.
Could the solution be a play button overlaying the last available image, with the animation initiated by the button itself, and immediately replaced by the pause button?
I think that would be more of a frontend way of handling it, the component itself I don't think you have that much control over how the data is displayed. It might be enough to just not update the image until one is added to a dashboard, I'm not sure what that looks like though, I'll have to play with it.
I think that would be more of a frontend way of handling it, the component itself I don't think you have that much control over how the data is displayed I mean: would it be feasible to make the data downloading be controlled by the play/pause button?
Let me explain: 1) the user opens the page with the card; the last available image is immediately downloaded and displayed, no other data is downloaded. 2) the user clicks a play button contained in the card (e.g. overlay); instead of the play button the animated wait icon appears and in the meantime the data is downloaded (I guess it is a few MB). When the download is complete, the animation starts and the animated wait icon is replaced by the pause icon. 3) the animation (and thus the downloading of data) is stopped if the user clicks on the pause icon; the same happens if he/she changes page In this way the download is delegated to the user.
Note: mine is just a user suggestion, I don't know the codebase, nor Python, Javascript, or Typescript.
I'll look into whether I can change the images/animations from the current polling method, to something that only fetches on demand.
Currently all of the sensors poll for updated data, I think I can change that behavior by entity.
Thanks for the suggestion!
Is your feature request related to a problem? Please describe. N/A
Describe the solution you'd like Grab animation information from https://www.swpc.noaa.gov/products/aurora-30-minute-forecast to be able to display on HA. Looking at source on page, images seem to be accessible from https://services.swpc.noaa.gov/products/animations/ovation_south_24h.json which would be great displayed on HA.
Describe alternatives you've considered Embed webpage of static image from https://services.swpc.noaa.gov/images/animations/ovation/south/latest.jpg
Additional context N/A