VA3HDL / hamdashboard

Customizable Dashboard for Ham Radio
https://youtu.be/sIdqMQTGNSc
MIT License
84 stars 41 forks source link

Possibility to show HTML/PHP as a tile #12

Closed agc346 closed 2 days ago

agc346 commented 1 month ago

Is it possible to point directly at an HTML or PHP page such as HamClock or WeeWX to get real time data on the dashboard?

VA3HDL commented 1 month ago

This is already in the To Do list, along with the separate rotate timer for each tile (now all tiles rotate every 30 s)

midair55 commented 2 weeks ago

Just a note for reference as others may see similar. I'm NOT expecting a 'fix'...!!!!

The National Weather Service has a PHP program that generates a forecast graphic for a given location such as: https://forecast.weather.gov/MapClick.php?lat=28.3874&lon=-80.6048&unit=0&lg=english&FcstType=graphical

A 'right click' on the image and copying its address is similar to: https://forecast.weather.gov/meteograms/Plotter.php?lat=28.3893&lon=-80.6088&wfo=MLB&zcode=FLZ447&gset=18&gdiff=3&unit=0&tinfo=EY6&ahour=0&pcmd=1111111111&lg=en&indu=1!1!1!&dd=3&bw=0&hrspan=48

(Note: I modified the URL to display specific parameters and interval...) The graphic can be displayed in a tile but it does not update using the July 6 HTML file. This was not noted in the past since the entire page was refreshed every 5 minutes but removed with the enhancement of setting refresh/rotate intervals for each tile.

As a work around, I added the meta refresh tag to the HTML file to update every 30 minutes.

Steve - N5NG

VA3HDL commented 2 weeks ago

Hi Steve,

I've also noticed minor issues like this after removing the refresh meta tag and the javascript page refresh.For example, my Hamclock image hasn't been updated since 50 minutes ago.

The caching prevention mechanism I put in place consists in adding a random string added at the end of the URL as a parameter. It works very well with the majority of the image sources, however, it fails for these sources like you mentioned in your previous email that already have a bunch of parameters already on the URL. I'm trapping this issue in the code and removing the variable I added and trying again to load the image. This works but the image sometimes doesn't get refreshed unless the entire page is reloaded. This is why I was a little bit skeptical about removing the whole page refresh.

Now going back to the topic of the issue of this thread. Yesterday spent few hours working on a new code to load mini-websites on the tiles like in iFrames tags. I haven't finished yet this this experiment. More to come.

Pablo - VA3HDL

midair55 commented 2 weeks ago

Do you now regret starting this “simple” project that has become a job?

On Mon, Jul 8, 2024 at 11:46 AM Pablo @.***> wrote:

Hi Steve,

I've also noticed minor issues like this after removing the refresh meta tag and the javascript page refresh.For example, my Hamclock image hasn't been updated since 50 minutes ago.

The caching prevention mechanism I put in place consists in adding a random string added at the end of the URL as a parameter. It works very well with the majority of the image sources, however, it fails for these sources like you mentioned in your previous email that already have a bunch of parameters already on the URL. I'm trapping this issue in the code and removing the variable I added and trying again to load the image. This works but the image sometimes doesn't get refreshed unless the entire page is reloaded. This is why I was a little bit skeptical about removing the whole page refresh.

Now going back to the topic of the issue of this thread. Yesterday spent few hours working on a new code to load mini-websites on the tiles like in iFrames tags. I haven't finished yet this this experiment. More to come.

Pablo - VA3HDL

— Reply to this email directly, view it on GitHub https://github.com/VA3HDL/hamdashboard/issues/12#issuecomment-2214485619, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7TZ55THJ4WO6PHDCIXBNELZLKX5ZAVCNFSM6AAAAABJ65XP4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJUGQ4DKNRRHE . You are receiving this because you commented.Message ID: @.***>

VA3HDL commented 2 weeks ago

Not at all. On the contrary I feel I made a contribution to the community for the ones that found a valuable addition to their shacks. I received very good feedback from many and that keeps me going.

Thanks for your help.

midair55 commented 2 weeks ago

Hmmmm....... The graphical weather PHP image mentioned above is not refreshing with, "" in the HTML. Go big deal..

VA3HDL commented 2 weeks ago

I believe because the time on the chart is embedded on the links you used...

> https://forecast.weather.gov/meteograms/Plotter.php?lat=28.3874&lon=-80.6048&wfo=MLB&zcode=FLZ747&gset=18&gdiff=3&unit=0&tinfo=**EY5**&ahour=0&pcmd=11101111110000000000000000000000000000000000000000000000000&lg=en&indu=1!1!1!&dd=&bw=&hrspan=48&pqpfhr=6&psnwhr=6
> https://forecast.weather.gov/meteograms/Plotter.php?lat=28.3893&lon=-80.6088&wfo=MLB&zcode=FLZ447&gset=18&gdiff=3&unit=0&tinfo=**EY6**&ahour=0&pcmd=1111111111&lg=en&indu=1!1!1!&dd=3&bw=0&hrspan=48
> https://forecast.weather.gov/meteograms/Plotter.php?lat=28.3893&lon=-80.6088&wfo=MLB&zcode=FLZ447&gset=18&gdiff=3&unit=0&tinfo=**EY7**&ahour=0&pcmd=1111111111&lg=en&indu=1!1!1!&dd=3&bw=0&hrspan=48

the part in between and is the hour of the chart I believe.

midair55 commented 2 weeks ago

Hit - https://forecast.weather.gov/meteograms/Plotter.php?lat=28.3893&lon=-80.6088&wfo=MLB&zcode=FLZ447&gset=18&gdiff=3&unit=0&tinfo=EY6&ahour=0&pcmd=1111111111&lg=en&indu=1!1!1!&dd=3&bw=0&hrspan=48

Then wait until the top of the hour and refresh. The X axis time-line changes by one hour where the first labeled hour is the next hour. I don't recall what values I had to change so it shows the 'next' hour labeled minus two hours. The 'hrspan' is the number of hours to display.