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

[screensaver.turnoff] v0.10.2 #1213

Merged
merged 1 commit into from
Nov 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
83 changes: 80 additions & 3 deletions screensaver.turnoff/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
[![GitHub release](https://img.shields.io/github/release/dagwieers/screensaver.turnoff.svg)](https://github.com/dagwieers/screensaver.turnoff/releases)
[![Build Status](https://travis-ci.org/dagwieers/screensaver.turnoff.svg?branch=master)](https://travis-ci.org/dagwieers/screensaver.turnoff)
[![Codecov status](https://img.shields.io/codecov/c/github/dagwieers/screensaver.turnoff/master)](https://codecov.io/gh/dagwieers/screensaver.turnoff/branch/master)
[![License: GPLv2](https://img.shields.io/badge/License-GPLv2-yellow.svg)](https://opensource.org/licenses/GPL-2.0)
[![Contributors](https://img.shields.io/github/contributors/dagwieers/screensaver.turnoff.svg)](https://github.com/dagwieers/screensaver.turnoff/graphs/contributors)

# Kodi screensaver that turns your screen off to save power

This Kodi screensaver turns your TV, projector or monitor off, so it can actually "save your screen".


## How does it work ?

It supports the following methods:
It supports the following display methods:

- **CEC (built-in)**
- The screensaver forces the display to go into Standby using internal CEC controls.
Expand All @@ -28,9 +34,80 @@ It supports the following methods:
- **CEC on Android (kernel)**
- The screensaver immediately forces the display off using kernel CEC controls and turns off device.

- **Backlight on Raspberry Pi (kernel)**
- The screensaver turns off the backlight of the display. This only works on Raspberry Pi.

- **Backlight on Odroid C2 (kernel)**
- The screensaver turns off the backlight of the display. This only works on Odroid C2.


Optionally it also can put your system to sleep or power it off.
Optionally it also can put your system to sleep or power it off using one of the following methods:

- **Suspend (built-in)**
- **Hibernate (built-in)**
- **Quit (built-in)**
- **Shutdown (built-in)**
- **Reboot (built-in)**
- **Powerdown (built-in)**

Or log off your user or mute audio.

One can press the `HOME` key to deactivate the screensaver, depending on the method used and the state of the display it may turn your display back on.
One can press the `HOME` key to deactivate the screensaver, depending on the method used and the state of the display/system it may turn your display and system back on.


## Related
A collection of related links:

- [Hardware hack for turning RPi on over CEC](https://forum.kodi.tv/showthread.php?tid=174315&pid=2651811#pid2651811)


## Reporting issues
You can report issues at [our GitHub project](https://github.com/dagwieers/screensaver.turnoff).


## Releases
### v0.10.2 (2019-11-21)
- Create separate entrypoint
- Improve stability
- Add more unit tests

### v0.10.1 (2019-10-30)
- Add sanity tests, unit tests and coverage support
- Use JSON-RPC for all built-ins
- Improvements for Python 3
- Support Odroid-C2 display method

### v0.10.0 (2019-03-13)
- Support RPi touchscreen display method
- Improve mute and unmuting audio using JSON-RPC

### v0.9.2 (2018-06-07)
- Fix translations
- Fix an issue when stopping the screensaver

### v0.9.1 (2018-04-14)
- Improve documentation
- Don't log when no action was taken
- Fix sanity issues

### v0.9.0 (2018-04-13)
- Improve help in add-on settings
- Improve add-on logging
- Add icon and title to pop-ups

### v0.8.1 (2018-04-12)
- Renamed add-on from 'No Signal' to 'Turn Off'
- Support vbetool and xrandr display methods
- Support Android CEC display method
- Support built-in and Android power methods
- Support Mute built-in
- Show a pop-up when errors are detected

### v0.8.0 (2018-04-12)
- Support built-in DPMS and CEC display methods
- Improve add-on settings

### v0.7.4 (2018-04-12)
- Support RPi and X11 xset DPMS display methods
- Support System.LogOff built-in
- Initial release
50 changes: 43 additions & 7 deletions screensaver.turnoff/addon.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="screensaver.turnoff" name="Turn Off" version="0.9.1" provider-name="Dag Wieers">
<addon id="screensaver.turnoff" name="Turn Off" version="0.10.2" provider-name="dagwieers">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
</requires>
<extension point="xbmc.ui.screensaver" library="default.py"/>
<extension point="xbmc.addon.metadata">
<platform>all</platform>
<summary lang="en_GB">Screensaver that turns your screen off to save power</summary>
<description lang="en_GB">The Turn Off screensaver turns your TV, projector or monitor off, like any old fashioned screensaver is intended to do.</description>
<source>http://github.com/dagwieers/plugin.screensaver.off</source>
<license>GPL2+</license>
<summary lang="en_GB">Screensaver that turns your display off to save power</summary>
<description lang="en_GB">
The Turn Off screensaver turns your TV, projector or screen off, like any old fashioned screensaver is intended to do.

Next to managing your display, it can also manage your device power state, log your profile off or mute audio to avoid sounds through your A/V receiver.
</description>
<license>GPL-2.0-or-later</license>
<email>[email protected]</email>
<website>https://kodi.wiki/view/Add-on:Turn_Off</website>
<source>https://github.com/dagwieers/screensaver.turnoff</source>
<forum>https://forum.kodi.tv/showthread.php?tid=331076</forum>
<news>
v0.10.2 (2019-11-21)
- Create separate entrypoint
- Improve stability
- Add more unit tests

v0.10.1 (2019-10-30)
- Add sanity tests, unit tests and coverage support
- Use JSON-RPC for all built-ins
- Improvements for Python 3
- Support Odroid-C2 display method

v0.10.0 (2019-03-13)
- Support RPi touchscreen display method
- Improve mute and unmuting audio using JSON-RPC

v0.9.2 (2018-06-07)
- Fix translations
- Fix an issue when stopping the screensaver

v0.9.1 (2018-04-14)
- Improve documentation
- Don't log when no action was taken
- Fix sanity issues
</news>
<assets>
<icon>resources/media/icon.png</icon>
</assets>
</extension>
<extension point="xbmc.ui.screensaver" library="screensaver.py"/>
<requires><import addon="xbmc.python" version="2.25.0"/></requires>
</addon>
8 changes: 8 additions & 0 deletions screensaver.turnoff/default.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Dag Wieers (@dagwieers) <[email protected]>
# GNU General Public License v2.0 (see COPYING or https://www.gnu.org/licenses/gpl-2.0.txt)
''' This Kodi addon turns off display devices when Kodi goes into screensaver-mode '''

from __future__ import absolute_import, division, unicode_literals
import screensaver
screensaver.run()
Loading