this post was submitted on 11 Jul 2023
50 points (98.1% liked)

Selfhosted

40407 readers
204 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I would like to have a screen in my home displaying a summary of different information that is relevant to me, like weather forecast, bus/train times, news headlines, etc. I was planning to use a Raspberry Pi and either buy a screen to display the information or just show it on my TV. It could probably be as simple as serving a page with HTML and JavaScript and then displaying it in a full screen web browser.

I feel like this is probably something that a lot of people want so I am wondering if there is something out there already that can easily be extended with custom "widgets". Nextcloud actually has a dashboard that's a bit like this but ideally I'd like something that is standalone and easier to extend with my own widgets.

Anyone have any recommendations?

top 15 comments
sorted by: hot top controversial new old
[–] [email protected] 22 points 1 year ago (1 children)

On the other side - not standalone - people often use Home Assistant for this, you can configure the dashboard on a different device, write custom widgets, it’s interactive, etc.

Someone made this, which is mindblowing!

https://community.home-assistant.io/t/use-esphome-with-e-ink-displays-to-blend-in-with-your-home-decor/435428

[–] [email protected] 3 points 1 year ago

In a similar vein, I've also seen Nextcloud used for this purpose.

[–] [email protected] 21 points 1 year ago (1 children)

I just installed homepage https://gethomepage.dev

Haven't looked into actually extending it with custom widgets since I'd also like bus times.
I'm planning in having it in an unused tablet I have around.

[–] [email protected] 3 points 1 year ago (1 children)

This looks promising, thanks!

[–] [email protected] 7 points 1 year ago

Made a post showing my homepage on Lemmy a couple weeks ago! https://lemmy.world/pictrs/image/f9a05589-f82d-4771-a1b3-80a351235c92.png

[–] brian 15 points 1 year ago (1 children)

The first thing that springs to mind is something like a "magic mirror". I haven't delved into it a ton, but I'm fairly certain that it would be able to hit most of your criteria.

That being said, I'd think it could be a decent enough starting point to at least find other things in the same vein.

[–] [email protected] 3 points 1 year ago

Yes you're right, what I'm thinking of is basically a magic mirror without the mirror. Thanks for the link, I will check that out!

[–] [email protected] 4 points 1 year ago (1 children)

I use Heimdall. It is basic and simple to setup. I tried Organizr but it was more customization than I was looking for.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

+1 for Heimdall, but I don't think it does widgets. It's more like a Intranet homepage.

[–] [email protected] 4 points 1 year ago (1 children)

I use Flame Dashboard for something similar to this. It uses a simple sqllite database, so i just whipped together a few python scripts that gather information such as my to do list, calendar, gir repos, etc and update the database table it uses.

[–] [email protected] 2 points 1 year ago (1 children)

I just set up flame and am liking it so far. Care to share your scripts?

[–] [email protected] 2 points 1 year ago

Keep in mind they are hacked together and were not meant for mass consumption. Here is an example of one of the scripts that contacts the gitea api and inserts the most recent 10 issues into Flames database with a specific category.

`import sqlite3 from datetime import datetime import requests import re import json from datetime import datetime, timezone

def insert_bookmark(name, url, category_id, order_id): conn = sqlite3.connect('/app/db.sqlite') cursor = conn.cursor()

cursor.execute("SELECT MAX(id) FROM bookmarks")
result = cursor.fetchone()
max_id = result[0] if result[0] else 0

current_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f %z')
values = (name, url, category_id, "", current_time, current_time, 0, order_id)

cursor.execute("INSERT INTO bookmarks (name, url, categoryId, icon, createdAt, updatedAt, isPublic, orderId) VALUES (?, ?, ?, ?, ?, ?, ?, ?);", values)

max_id += 1

conn.commit()
conn.close()

return max_id

def delete_bookmark(category_id): conn = sqlite3.connect('/app/db.sqlite') cursor = conn.cursor() cursor.execute("DELETE FROM bookmarks WHERE categoryId = ?", (category_id,)) # Commit the changes and close the connection conn.commit() conn.close()

def get_recently_updated_issues(repo_urls, user_name, api_token): headers = { "Authorization": f"token {api_token}", "Content-Type": "application/json" }

all_issues = []

for repo_url, repo_name in repo_urls:
    api_url = repo_url

    # Query the Gitea API to get the issues
    response = requests.get(api_url, headers=headers, params={"state": "all"})
    response.raise_for_status()

    issues = response.json()

    sorted_issues = sorted(issues, key=lambda x: x["updated_at"], reverse=True)

    all_issues.extend(sorted_issues[:5])

sorted_all_issues = sorted(all_issues, key=lambda x: x["updated_at"], reverse=True)

recent_issue_titles = []
recent_issue_links = []
recent_timestamps = []

for issue in sorted_all_issues[:10]:
    title = issue["title"]
    link = issue["html_url"]
    timestamp = issue["updated_at"]

    recent_issue_titles.append(title)
    recent_issue_links.append(link)
    recent_timestamps.append(timestamp)

return recent_issue_titles, recent_issue_links, recent_timestamps

repo_urls = [ ("https://gitea.example.com/api/v1/repos/user1/repo1/issues", "repo1"), ("https://gitea.example.com/api/v1/repos/user1/repo2/issues", "repo2") ] user_name = "user1" api_token = "example token"

delete_bookmark(8) order_id = 1

recent_issue_titles, recent_issue_links, recent_timestamps = get_recently_updated_issues(repo_urls, user_name, api_token)

for title, link, timestamp in zip(recent_issue_titles, recent_issue_links, recent_timestamps): print("Issue Title:", title) print("Issue Link:", link) print("Last Updated:", timestamp) print() bookmark_id = insert_bookmark(title, link, 8, order_id) order_id += 1`

[–] [email protected] 3 points 1 year ago

Hey, just wanted to share this one so you have more options. https://github.com/awesome-selfhosted/awesome-selfhosted#personal-dashboards

[–] [email protected] 2 points 1 year ago

If you want to skip the web browser + server part (well, sort of), you could also build your dashboard as an electron or nwjs app. That way you can easily make it go fullscreen on its own and it doesn't come with most browser UI around your page. It's still running essentially Chrome, but it has some advantages if you need to interact with system things, run shell commands at the press of a button, etc.

[–] [email protected] 2 points 1 year ago

Organizr might be the closest thing you're looking for

load more comments
view more: next ›