-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug/fix everything around brightness/nightmode... (#31)
* bug/get_rid_of_duplicate_configs closes #26 * clean up some more, did this thing ever work right? * reformat some more * Update ovos_gui_plugin_shell_companion/__init__.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * drop hardcoded sleeps, use events, standardize brightness handlers names to follow conventions * further simplify dimming logic * night mode tweaks * refactor periodic nightmode check, schedule events directly for sunset/sunrise times * typo * readme * safety checks around brightness manager, default_brightness setting, change brightness during nightmode * safety checks and error logs * low_brightness and auto_dim_seconds from config * autodim during night mode * fix value range * ensure ints not floats * remove redundant checks * simplify further * fix sunrise/sunset calculation * fix sunrise/sunset typo * Update README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update README.md * improve responsiveness * streamline sunset calculations, no need for a 12h timer... * avoid multiple events firing * simplify suntimes calc * DRY * less log spam * syntax error * Update README.md * configurable sunset/sunrise times * refactor/split discover into helper methods * check if modes are enabled on launch, not only on GUI settings change use the ovos-shell native brightness control WHY did this code even exist * option to make default * better nightmode autodim * better nightmode autodim * more logs * error handling * fix night time check * minimize writes --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2c19374
commit 18dcb8d
Showing
11 changed files
with
438 additions
and
440 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,61 @@ | ||
# OVOS Shell companion | ||
|
||
provides various bus APIs that integrate with ovos-shell | ||
provides various bus APIs that integrate with [ovos-shell](https://github.com/OpenVoiceOS/ovos-shell) | ||
|
||
- color scheme manager | ||
- notifications widgets | ||
- configuration provider (settings UI) | ||
- brightness control (night mode etc) | ||
|
||
|
||
these used to be several individual plugins but they all are ovos-shell specific integrations and ovos-shell requires all of them, so they have been unified | ||
## Features | ||
|
||
```json | ||
{ | ||
"gui": { | ||
"ovos-gui-plugin-shell-companion": { | ||
"sunrise_time": "auto", | ||
"sunset_time": "auto", | ||
"default_brightness": 100, | ||
"night_default_brightness": 70, | ||
"low_brightness": 20, | ||
"auto_dim_seconds": 60, | ||
"auto_dim": false, | ||
"auto_nightmode": false | ||
} | ||
} | ||
} | ||
``` | ||
|
||
|
||
### Night mode | ||
|
||
night mode will perform actions based on sunset/sunrise times | ||
|
||
- the homescreen changes to a simple clock with white text on a black background. | ||
- default brightness is reduced. | ||
- auto-dim is enabled | ||
|
||
`sunrise_time` and `sunset_time` will be automatically calculated based on location if set to `"auto"`, specific times can be explicitly set with the format `"HH:MM"`, eg. if you are an early riser you may want `"sunrise_time": "05:30"` | ||
|
||
brightness level during nighttime can be set via `"night_default_brightness"` | ||
|
||
### Auto Dim | ||
|
||
auto-dim will lower the screen brightness after 60 seconds of inactivity, until the user interacts with the GUI or talks to the OVOS device | ||
|
||
brightness level when idle can be set via `"low_brightness"` | ||
|
||
auto-dim can be enabled at all times by setting `"auto_dim": true` in your config | ||
|
||
|
||
## DEPRECATION WARNING | ||
|
||
> in **ovos-core version 0.0.7** the bus apis provided by this repo used to be several individual PHAL plugins | ||
the following packages have been deprecated in favor of this repo: | ||
- https://github.com/OpenVoiceOS/ovos-PHAL-plugin-dashboard <- DEPRECATED, community maintained, no official replacement, [removed from ovos-shell](https://github.com/OpenVoiceOS/ovos-gui/pull/10) | ||
- https://github.com/OpenVoiceOS/ovos-PHAL-plugin-configuration-provider | ||
- https://github.com/OpenVoiceOS/ovos-PHAL-plugin-notification-widgets | ||
- https://github.com/OpenVoiceOS/ovos-PHAL-plugin-brightness-control-rpi | ||
- https://github.com/OpenVoiceOS/ovos-PHAL-plugin-color-scheme-manager | ||
- [ovos-PHAL-plugin-dashboard](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-dashboard) <- DEPRECATED, community maintained, no official replacement, [removed from ovos-shell](https://github.com/OpenVoiceOS/ovos-gui/pull/10) | ||
- [ovos-PHAL-plugin-configuration-provider](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-configuration-provider) <- now part of this repo | ||
- [ovos-PHAL-plugin-notification-widgets](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-notification-widgets) <- now part of this repo | ||
- [ovos-PHAL-plugin-brightness-control-rpi](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-brightness-control-rpi) <- now part of this repo | ||
- [ovos-PHAL-plugin-color-scheme-manager](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-color-scheme-manager) <- now part of this repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.