Motion Sensor and Tasker to Turn on Tablet (No Internet Required)

Now I need to remember how I did this.... :slight_smile:

I will outline what I have setup, but hopefully you can see that there are other options at almost each point in this setup, in terms of how to trigger and what to trigger. The key point is you can use Tasker and AutoRemote on a tablet to allow a HTTP call to be made from a HE hub (or elsewhere) to trigger "something" to happen on the tablet.

Not saying these are requirements, but I just wanted to outline the setup I am working with:

  • 7 year old tablet running Android 4.2.2, Tasker v4.7u3m
  • HE C-7 Hub with Hue Motion Sensor paired directly, located alongside the tablet mounted on my fridge
  • Second HE C-4 Hub with motion sensors linked from C-7 hub via Hub Mesh, running Rule Machine

One requirement of this setup will be a fixed IP address for the tablet being used.

There's probably going to be some steps I have missed below, so will update if anyone has any issues... I did play around with Event Ghost, but don't believe this is required, but some of the configuration settings for this may come into play for the setup I have now, not sure...

App Install and Configuration

Look up the Settings on your Tablet or router to find the IP Address configured
Install Tasker on the tablet from the Google Play Store (I think I have paid a few dollars for this...)
Install AutoRemote on the tablet from Google Play Store
Open AutoRemote App and go to Preferences
Under Advanced tick the "Wifi All Networks" option

Tasker Profile Setup

Open Tasker
Under the Profiles section press the + icon to create a new Profile, selecting Event as the type of trigger
Type "Auto" in the Filter textbox, selecting AutoRemote from the results
Press the pencil icon to edit the Configuration of the trigger
Press the Message Filter option
Type in a key word, e.g. "screen_on"
Back out to the Profile screen and press the New Task entry from the pop-up that appears alongside the new screen_on Profile
Give the new Task a name, e.g. Open Dashboard
Press the + icon to add an action, press the App Category, Launch App action, press the Chrome app
Back out to the Profiles screen

To test this setup so far:
Open Chrome on the tablet, navigating to the HE dashboard you want to display
Switch to another app on the tablet, or go back to the Home Screen, leaving Chrome open
Open a browser on another device, such as a another tablet or PC
Paste / type the following into the address bar, replacing the Tablet-IP-Address:
http://<Tablet-IP-Address>:1817/?message=screen_on
Chrome should open up on the tablet, displaying the dashboard opened earlier

HE Rule Setup

In my HE setup I have chosen to include a Virtual Switch, this is optional and can be skipped. The motion trigger from the first rule could be combined with the actions from the second to have the HTTP calls made in response to motion being detected. This switch provides options for triggering in other ways that do not include motion.

Open a browser and access the Devices section for the HE hub
Setup a new Virtual Switch device, with a name such as Display Dashboard
Access the Apps section of your HE hub
If not installed, install the Built-In App Rule Machine
Open Rule Machine and create 2 new rules:

To test, trigger motion and watch the dashboard display on the tablet.

You will notice that the rule includes a second HTTP call when motion is no longer detected. To achieve this I have repeated the Tasker Profile setup process, responding to a screen_off message, launching a Clock App instead of Chrome.

Some other ideas I have had are to launch different dashboards based on when I am doing, such as an A/V Dashboard when I am watching TV in the Kitchen, or a Climate dashboard when severe weather conditions are forecast or detected.

Simon

1 Like