Want create site? Find Free WordPress Themes and plugins.

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.

Switch-Day-Night-Mode of TabletCall 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 s