-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add date/time metrics #32
Comments
In addition to the date/time metrics, would love to see the Network In/Out if readily availalbe. Why - this secondary monitor screen will be a nice addition to NAS system like Synology DS or other headless home theater PC(HTPC) Currently using it on my Raspberry Pi 3B+ (running Retropie) however CPU temp is not supported |
I love this idea, but it should probably be it's own feature request. |
@Nealtron and @waynehuang85 you can subscribe to this feature request for network metrics: #51 |
Hi, My purpose: I used datetime. In scheduler.DateStats() In @async_job("Date_Stats")
@schedule(timedelta(seconds=THEME_DATA['STATS']['DATE'].get("INTERVAL", None)).total_seconds())
def DateStats():
# logger.debug("Refresh date stats")
stats.Date.stats() In class Date:
@staticmethod
def stats():
date_now = datetime.datetime.now()
if THEME_DATA['STATS']['DATE']['DAY']['TEXT'].get("SHOW", False):
display.lcd.DisplayText(
text=f"{date_now.day}-{date_now.month}-{date_now.year}",
x=THEME_DATA['STATS']['DATE']['DAY']['TEXT'].get("X", 0),
y=THEME_DATA['STATS']['DATE']['DAY']['TEXT'].get("Y", 0),
font=THEME_DATA['STATS']['DATE']['DAY']['TEXT'].get("FONT", "roboto-mono/RobotoMono-Regular.ttf"),
font_size=THEME_DATA['STATS']['DATE']['DAY']['TEXT'].get("FONT_SIZE", 10),
font_color=THEME_DATA['STATS']['DATE']['DAY']['TEXT'].get("FONT_COLOR", (0, 0, 0)),
background_color=THEME_DATA['STATS']['DATE']['DAY']['TEXT'].get("BACKGROUND_COLOR", (255, 255, 255)),
background_image=get_full_path(THEME_DATA['PATH'],
THEME_DATA['STATS']['DATE']['DAY']['TEXT'].get("BACKGROUND_IMAGE",
None))
)
if THEME_DATA['STATS']['DATE']['HOUR']['TEXT'].get("SHOW", False):
display.lcd.DisplayText(
text=f"{date_now.strftime('%H:%M:%S')}",
x=THEME_DATA['STATS']['DATE']['HOUR']['TEXT'].get("X", 0),
y=THEME_DATA['STATS']['DATE']['HOUR']['TEXT'].get("Y", 0),
font=THEME_DATA['STATS']['DATE']['HOUR']['TEXT'].get("FONT", "roboto-mono/RobotoMono-Regular.ttf"),
font_size=THEME_DATA['STATS']['DATE']['HOUR']['TEXT'].get("FONT_SIZE", 10),
font_color=THEME_DATA['STATS']['DATE']['HOUR']['TEXT'].get("FONT_COLOR", (0, 0, 0)),
background_color=THEME_DATA['STATS']['DATE']['HOUR']['TEXT'].get("BACKGROUND_COLOR", (255, 255, 255)),
background_image=get_full_path(THEME_DATA['PATH'],
THEME_DATA['STATS']['DATE']['HOUR']['TEXT'].get("BACKGROUND_IMAGE",
None))
) In your DATE:
# In seconds. Longer intervals cause this to refresh more slowly.
# Setting to lower values will display near real time data,
# but may cause significant CPU usage or the display not to update properly
INTERVAL: 1
DAY:
TEXT:
SHOW: True
X: 4
Y: 4
FONT: roboto-mono/RobotoMono-Regular.ttf
FONT_SIZE: 16
FONT_COLOR: 53, 191, 92
# BACKGROUND_COLOR: 0, 0, 0
BACKGROUND_IMAGE: background.png
HOUR:
TEXT:
SHOW: True
X: 160
Y: 4
FONT: roboto-mono/RobotoMono-Regular.ttf
FONT_SIZE: 16
FONT_COLOR: 53, 191, 92
# BACKGROUND_COLOR: 0, 0, 0
BACKGROUND_IMAGE: background.png |
I created a pull request for it. |
Thanks @RussNelson ;) |
Implemented in #72 |
Is your feature request related to a problem? If so, please describe the problem.
There is no entries in theme.yaml for date/time
Describe the feature / solution to your problem you'd like
Entries in theme.yaml to be able to display date and time on screen, with configurable format
Describe alternatives you've considered / and or tested
Using static_text entries but it is not updated at runtime
Environment:
feature/system-monitor
branchThe text was updated successfully, but these errors were encountered: