Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage dashboards support #81

Closed
2 tasks done
alexjustesen opened this issue Oct 24, 2022 · 41 comments · Fixed by #463
Closed
2 tasks done

Homepage dashboards support #81

alexjustesen opened this issue Oct 24, 2022 · 41 comments · Fixed by #463
Assignees
Labels
🎉 feature New feature or request

Comments

@alexjustesen
Copy link
Owner

alexjustesen commented Oct 24, 2022

The following selfhosted homepages reference Speedtest Tracker data for widgets:

@zvarg
Copy link

zvarg commented Jan 19, 2023

Waiting for homepage support ;)

@alexjustesen
Copy link
Owner Author

Waiting for homepage support ;)

Me too, man this developer is slacking 😅

@philhagger
Copy link

Would love this!

@casudo
Copy link

casudo commented Mar 2, 2023

Any updates?

@zvarg
Copy link

zvarg commented Mar 2, 2023

I am quietly announcing that @alexjustesen is not authorized to delay this feature to later milestone rather than v0.14.0 🤣🤣

@alexjustesen
Copy link
Owner Author

Working a bit slower these days... https://twitter.com/alexjustesen/status/1629641625868681223?t=2kDg6llnqM1hqNvfJhk4jw&s=19

@cinderblockgames
Copy link
Contributor

How are you converting download/upload into Mbps on the Result detail modal? I've almost got this working, but I need to do the same conversion.

@alexjustesen
Copy link
Owner Author

@cinderblockgames there is a broken ass method currently doing that conversion, it might be better in the API to not covert any metrics and instead report them as the bytes their stored as.

This also reminds me, I need to create a data model so each attribute is well defined.

@cinderblockgames
Copy link
Contributor

@alexjustesen The issue is that Homepage expects it as Mbps. My widget currently shows 45 Tbsp speeds, lol.

@SAS-1
Copy link

SAS-1 commented Mar 9, 2023

yeah I was playing with it in PowerBI and ended up using this conversion
Download/125000
rounding to 2 decimal places
same with upload, it looked right when doing a manual check to the web interface.
Getting it stored properly would be helpful though

@shamoon
Copy link

shamoon commented Mar 9, 2023

@alexjustesen The issue is that Homepage expects it as Mbps. My widget currently shows 45 Tbsp speeds, lol.

Homepage expects it in bytes

@alexjustesen
Copy link
Owner Author

@alexjustesen The issue is that Homepage expects it as Mbps. My widget currently shows 45 Tbsp speeds, lol.

Homepage expects it in bytes

That's what I had thought, been a while since I've done any Homepage source code diving though

@cinderblockgames
Copy link
Contributor

cinderblockgames commented Mar 9, 2023

...Huh. So, I've got this coming out of the API:

{"data":{"id":583,"ping":20.382,"download":45655636,"upload":26669082,

And Homepage is showing me this:

image

Here it is in Speedtest Tracker:

image

@alexjustesen
Copy link
Owner Author

alexjustesen commented Mar 9, 2023

@cinderblockgames you'll need to convert bits vs. bytes. Data stored in the table is in bits while Speedtest Tracker UI and Homepage expects bytes (Megabytes)

@cinderblockgames
Copy link
Contributor

@alexjustesen That's still a factor of 8, not 125000. So, 1000000 bits/second = 125000 bytes/second, which matches what's in the UI as well as what Homepage appears to be looking for.

I've got it working with the 125000 division in my fork, if you want to take a look against your Homepage instance: https://github.com/cinderblockgames/speedtest-tracker

@alexjustesen
Copy link
Owner Author

@shamoon
Copy link

shamoon commented Mar 9, 2023

Ultimately homepage can accept any, https://github.com/benphelps/homepage/blob/fb15f5dbc9273a3a024bfd70edad4544ebfe9208/src/widgets/speedtest/component.jsx#L34 or https://github.com/benphelps/homepage/blob/fb15f5dbc9273a3a024bfd70edad4544ebfe9208/src/widgets/nzbget/component.jsx#L30 etc.

If there's a stable API here Im happy to handle the homepage widget, not clear if that part has been implemented here already? Is it documented?

@alexjustesen
Copy link
Owner Author

alexjustesen commented Mar 9, 2023

@shamoon not yet, since I'm targeting replacing henrywhitaker3/Speedtest-Tracker I (ideally) want this to be a drop-in replacement for those using Homepage.

In a nutshell henrywhitaker3/Speedtest-Tracker references an incorrect uri /speedtest/latest, I'll be enabling this endpoint for backwards compatibility but forwarding the request it to a more standardized endpoint like /api/results/latest.

Hopefully won't need any changes to Homepage so we don't break anything for those using the abandoned project still.

@shamoon
Copy link

shamoon commented Mar 9, 2023

Oh now I understand. Yea that would be great for sure, alternatively homepage could probably handle any changes (or just a separate widget) but agree would probably be cleaner here.

Let me know if I can help at any point!

@SAS-1
Copy link

SAS-1 commented Mar 9, 2023

I use Organizr so hopefully it will be the same as Homepage but happy to test for that once ready

@alexjustesen
Copy link
Owner Author

Let me know if I can help at any point!

I appreciate it!

@alexjustesen
Copy link
Owner Author

I use Organizr so hopefully it will be the same as Homepage but happy to test for that once ready

Organizr uses the same endpoint as Homepage so both will be drop-in replacements once done 🤘: https://github.com/causefx/Organizr/blob/e79b6d39a682f01f8d6d2e6841bb33c5a817d825/api/homepage/speedtest.php#L73

@alexjustesen alexjustesen linked a pull request Mar 9, 2023 that will close this issue
@alexjustesen
Copy link
Owner Author

#463 introduces /api/speedtest/latest route which enables support for home lab dashboards like Homepage and Organizer

At a later date a robust API will be developed, in the interim this endpoint will serve to close the gap with the dashboards.

@alexdelprete
Copy link
Contributor

alexdelprete commented Mar 9, 2023

Let me know if I can help at any point!

Is there an importer for dashy config? I'd love to test homepage, but I've spent so much time on dashy that doing it all over blocks me from trying homepage. (#lazymode ON) :D

image

@alexjustesen
Copy link
Owner Author

@alexdelprete not that I'm aware of and HOLY CRAP

@alexdelprete
Copy link
Contributor

There's more stuff under it...but I stopped there. :)

@alexjustesen
Copy link
Owner Author

I have dashboard envy

@SAS-1
Copy link

SAS-1 commented Mar 10, 2023

working great on Organizr
image
Thanks!

@spupuz
Copy link

spupuz commented Mar 12, 2023

In homepage is there an example to how to make it work? This version uses https and user and password Henry version wasn't

@cinderblockgames
Copy link
Contributor

@spupuz It's a drop-in replacement; it's exactly the same.

        widget:
          type: speedtest
          url: https://speedtest.example.com

@alexjustesen
Copy link
Owner Author

In homepage is there an example to how to make it work? This version uses https and user and password Henry version wasn't

This legacy endpoint isn't behind any authentication and will work with either http or https protocols.

@alexjustesen alexjustesen removed this from the v0.14.0 milestone Mar 12, 2023
@zvarg
Copy link

zvarg commented Mar 12, 2023

I was quiet confused, expected only in version 14... I got to do my homewrok here :)
image

@neonmaus
Copy link
Contributor

neonmaus commented Mar 13, 2023

Something is going wrong for me, on the homepage dashboard the upload is exactly the same value as the download, although my upload speed is only half as high as it is also correctly displayed on the speedtester dashboard

image
image

The API endpoint "/api/speedtest/latest" also reports the wrong values
"id":2,"ping":18.991,"download":522.7744,"upload":522.7744,

@alexjustesen
Copy link
Owner Author

Oops... https://github.com/alexjustesen/speedtest-tracker/blob/main/app/Http/Controllers/API/Speedtest/GetLatestController.php#L32-L33

Unless someone can pr a bugfix it'll be a couple of days until I can circle around to fixing it.

@neonmaus
Copy link
Contributor

I have made quickly :)

@alexdelprete
Copy link
Contributor

alexdelprete commented Mar 17, 2023

I have dashboard envy

You definitely should. :D

Yesterday I completed the configuration...I like dashboard, even though it takes a pretty good hit on the servers with all those widgets open while browsing the page. But it's so cool...:)

image

image

image

@adam50hhh
Copy link

I have dashboard envy

You definitely should. :D

Yesterday I completed the configuration...I like dashboard, even though it takes a pretty good hit on the servers with all those widgets open while browsing the page. But it's so cool...:)

image

image

image

Are you using homepage?

@alexdelprete
Copy link
Contributor

Are you using homepage?

yes, that is Homepage.

@adam50hhh
Copy link

Are you using homepage?

yes, that is Homepage.

Odd question but, how did you get the different groups? (Media, Home Automation, etc.) I'm doing mine and it adds them into different columns. :/

@alexdelprete
Copy link
Contributor

Totally OT here, anyway, did you read the docs? https://gethomepage.dev/en/configs/settings/

It's the Layout setting in settings.yaml.

Here's mine:

title: HomeLab Dash
theme: dark
color: zinc

layout:
  System Management:
    style: row
    columns: 4
  Network Core:
    style: row
    columns: 4
  Network Services:
    style: row
    columns: 4
  Home Automation:
    style: row
    columns: 4
  Media:
    style: row
    columns: 4
  Productivity:
    style: row
    columns: 4
  Starr apps:
    style: row
    columns: 4

headerStyle: boxed
background:
    image: /images/john-towner-FD_sabE544U-unsplash.jpg
    blur: none # none, sm, "", md, lg, xl see https://tailwindcss.com/docs/backdrop-blur
    saturate: 20 # 0, 50, 100 see https://tailwindcss.com/docs/backdrop-saturate
    brightness: 60 # 0, 50, 75 see https://tailwindcss.com/docs/backdrop-brightness
    opacity: 30 # 0-100

providers:
  openweathermap: xxxx
  weatherapi: yyyy

quicklaunch:
    searchDescriptions: true
    hideInternetSearch: false
    hideVisitURL: false

showStats: true

@adam50hhh
Copy link

Totally OT here, anyway, did you read the docs? https://gethomepage.dev/en/configs/settings/

It's the Layout setting in settings.yaml.

Here's mine:

You rock! Thanks for the share and pointing me to the right area!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.