Goal
This project was created for tracking how people work. For example we need a worker to distribute the add to people. But we can't follow him. That's why we can't be sure that the work was properly done.
For such goals I created this system which can remotely take a photo or a video on a worker's personal smartphone.
Principle of the system
One smartphone (controller) uses ARTIK Cloud to send actions to another smartphone (tracker). After obtaining of the action (makePhoto/ setOnVideo/ setOffVideo) from the controller, the tracker executes it and sends message result of the successful execution to the controller. Also the tracker sends coordinates of the location to ARTIK Cloud. When the coordinates of the location are inside of the area which is set by the user of the controller device, ARTIK Cloud sends a letter to an email of user's controller.
Illustration of system
ARTIK Cloud Configuration
The first step is to create Device Type and Manifest. How to create Device Type your can read here.
The second step is to create application. How to create Application your can read here.
The third step is to create a rule. ARTIK Cloud allows you to execute such two options: to send actions to yours devices and to send a letter to an email. I used the second option. My rule sends the letter to my email when tracker sends new coordinates. And they are inside the area which I have set.
Tracker
My application for controller uses Project Tyrus to create the WebSocket connection.
To configure an application you need to fill these fields with your data. This data you can find here in the menu device info.
public static final String DEVICE_ID = "<YOUR DEVICE ID>";
public static final String DEVICE_TOKEN = "<YOUR DEVICE TOKEN>";
To start working you need to press the button "Do It" and then to wait for the ARTIK Cloud response ("Connected" if everything is okay or "Error <code>" if not)
Controller
For the controller I used ARTIK API Java/Android. For my app I used the application from the example. For the configuration you need to config next fields:
// Copy from the corresponding application in the Developer Dashboard
public static final String CLIENT_ID = "<YOUR APPLICATION ID>";
// Copy from the Device Info screen in My ARTIK Cloud
private final static String DEVICE_ID = "<YOUR DEVICE ID>";
// Response of application when success authorized
public static final String REDIRECT_URL = "<REDIRECT URL OF APPLICATION>";
When app starts the first time you need to login in your Samsung account.
Also ARTIK Cloud has an interface which allows you to monitor messages and actions of your device.
Demonstration
The possible use of the system
Useful links:
Comments