Remote Control of Devices

Nicholas Nothom

Introduction

People’s homes are becoming more and more crowded with electronic devices and computers. Sometimes this can become overwhelming. For example, my own bedroom typically is occupied by over 6 separate devices when I am home; a power-hungry desktop computer with three monitors and a sound system, my “Smart Mirror”, my laptop, tablet, phone, and smart watch.  I aimed to simplify my life by adding some simple remote controls for these devices.

Uses

The most important device for me to be able to control was my desktop computer. It is loud (fans and hard drives), the screens are bright, and it uses a lot of power. At night, I would like to be able to turn this computer off, but I don’t always think of that before getting in to bed. The next most important device to control was my tablet. I typically don’t use more than 40% of the battery in a day, so there is no reason to plug it in every night. However, an entire night of running in my backpack does use about 10-20% of the battery. Rather than needing to remember to shut this device down, I can simply control it from my phone.

I have created a graphical interface on my phone which can be opened from a lock screen shortcut. This interface has several buttons to control my desktop computer and tablet.  Options include shutting down, suspending, and powering on. I have also implemented voice controls which can be activated through Google Now.

Design and Programming

Both my desktop computer and laptop run on Linux Mint 17. The phone, tablet, and “Smart Mirror” run on Android 4.4.2 . My smart watch runs Tizen Wearable. Communication between each device is done though SSH.  My Android devices use “Juice SSH” as their ssh client. Both computers do not require any special clients beyond having ssh installed and enabled. The smart watch does not send its own commands, but uses its’ companion Android device to send the command.

To summarize, a typical operation cycle is as follows. First, a shortcut is clicked to open the GUI with a list of commands. Then, one of them is selected. This triggers a connection to the desired device, and execution of a code snippet to achieve the desired result. At the beginning of the snippet, there is a command to send a packet back to the initial device to let it know that the command has been received. This causes the initial device to terminate the SSH session and exit the menu.

GUI Demo (Open in New Tab) 

Continuations

In the future, I plan to implement the existing code in to my “Smart Mirror” to allow control of devices via voice. For example, imagine that I just got home and walked in to my room. I could say “Ok Mirror, turn on computer.” , and my computer would power on within seconds.

I could also place NFC tags on my front door, bedroom door, or bed side table that executed different commands. One on my front door could power on my PC when I get home, and shut it down when I leave. Another by my bedside table could shut down all devices when tapped before I went to bed, and turn everything on in the morning.

These functions could all be automated as well via monitoring WiFi or Bluetooth and acting on state changes accordingly.

Key Takeaways