I have several tablets hanging to the wall for controlling my Living room lights, Office environment or Garden lights. To save energy I would like these tablets to power off at night automatically or even better, have a proximity sensor in front of them or a tap to wake. Continue reading to see how to fix that!
I experimented with the following:
- Almost none of the tablets support Wake-on-LAN (WOL) or Wake on WLAN (WoWLAN). Even with the latest Microsoft Surface Pro 7 I was not able to do this.
- Another problem that the devices have is that there is no Tab-To-Wake functionality. So when the tablet is off or even only the screen is off (settings -> energy saving -> screen off after 1 min. of inactivity), you need to press the power button at the side of the device.
- Proximity sensor can be read using a .Net example, the Microsoft Surface Pro 7 has such a proximity sensor but I didn’t succeeded to script this.
So I came up with a Powershell script that you can run on any Windows Tablet. It listens to port 8080 by default. You can call it like a REST interface from your Domoticz or Gira Homeserver when you leave or enter the house or when you are going to sleep.
Call http://ip-address-of-tablet:8080/day to lighten up the display to a default of 50% brightness
Call http://ip-address-of-tablet:8080/night to set the backlight to almost zero and put a blank screen on it. It actually shows the Windows default blank screensaver, so when you tab the screen, it ‘wakens’. This suggest a sort of tab-to-wake functionality.
Call http://ip-address-of-tablet:8080/day/80 to lighten up the display to a default of 80% brightness (in case there is a lot of sun shining in the room).
Call http://ip-address-of-tablet:8080/kill to stop the script.
Notes:
Even at day mode, the tablet will put a blank screen on after 240minutes, which you can exit by tapping the screen.
You can change all values like the default 240minutes or the default port 8080 since the script is open-source!
Download the script here
Before running the script, run: “Set-ExecutionPolicy Unrestricted” once in a powershell cmd, because the script is not code signed with a certificate.
TIP: Set the script in a Scheduled Task that starts when the user is logged in (with elevated privilidges) and disable “stop tasks after running for 3 days”.
Tale a look at „WoLi“ it does the same for android devices bit listening directly on a knx ip interface for specific adresses to wake up
(slightly offtopic) how/where did you find mounts to integrate the tablets in or on the wall in a nice and neat looking way?
Nice script it works fine on a Windows tablet.
Is there also a solution for a Windows LTSC display ??
The modern standby is deactivated.
On AOAC systems (including all ARM systems) the system automatically switches to modern standby mode if the display fails. When a system is in modern standby mode, it can only be reactivated by certain inputs. This is not an exhaustive list. these inputs include, for example, pressing the power on button, opening the lid on a laptop, or clicking the mouse. Touching the screen does not wake up the device from modern standby. If you want the device to be reactivated by fingerprint, you need to configure the device so that it does not go into modern standby mode. To disable modern standby, set the following registry key and start the restart.
reg add HKLM\System\CurrentControlSet\Control\Power /v PlatformAoAcOverride /t REG_DWORD /d 0
have fun!!
Right away I am going to do my breakfast, once having my
breakfast coming again to read further news.