My design for the SMS control:
You have as first Android phone is needed for the car with a prepaid SIM card (so you can receive SMSs). Also, the wifi connection to work on the phone. Additionally, the phone in the car must be rooted. With rooting you get full access to the phone what you do not default. This is necessary to simulate the touching of the screen. It is also useful if your phone is as clean as possible and turn off what you do not use. This can reduce the battery consumption allowing him to stay longer standby. I also turned off mobile internet, wifi and bluetooth off to save power. Wifi off? Yes, I put on only when needed. Then install the following applications:
- Outlander PHEV remote control (https://play.google.com/store/apps/details?id=com.inventec.iMobile)
- Tasker (https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm)
- Secure settings (https://play.google.com/store/apps/details?id=com.intangibleobject.securesettings.plugin)
Next, you need to enable a number of things on the phone to the car via the developer mode. Please go to Settings and "About phone". Then tap a few times on "Build number" until you get the message that the developer mode. Now go back one menu and to "Developer options". Turn it option Cursor Location 'so we get coordinates of items on the screen. This gonna use later. then remove all the protections of the phone so you do not get another code or unlock screen, set the screen timeout to 2 minutes.
Connect to the car via the Outlander PHEV app and make sure it works as intended. The phone is now ready to be programmed via Tasker. Tasker will automate the use of the Outlander app. An automated action has roughly three steps:
- App startup and connect
- Perform action
- App close
Since the 1st and 3rd step for all actions is the same, we are going to build this first time in Tasker so we can use it more often. Within tasker have profiles and tasks. A profile is activated by an event such as receiving an SMS or connecting a USB cable and a task is a set of actions. Let's first create a job starting the PHEV app.
- Start tasker and go to the 'Tasks' tab.
- Click + to add a new task. Name it 'Start PHEV App.
- Click + to add a new action.
- Add -> Plugin -> Secure settings. Select at configuration for the pencil and then Actions -> Wake Device
- Add -> Mesh -> Wifi. set ON
- Add -> Devices -> Launch App. Choose the PHEV App
- Add -> Task -> Wait. Seconds = 30
The first task is now complete. This task sets the phone (is necessary because otherwise the PHEV app does not start well for me), turn WiFi on and start the PHEV app. He then wait 15 seconds so that the application can start before we go further. At the next task we will close the application. For this we must press the OK button on the application. We need to know where is the button on the screen. This is for any size screen otherwise. To find the right location, we have turned the 'Cursor Location option. Every touch on the screen shows the top coordinates. Start the PHEV app and closing it off afterwards. Press the OK button and remembers the x and y coordinates. These we need in the next step.
Go back to the 'Tasks' tab.
- Click + to add a new task. Name it 'Close PHEV App.
- Click + to add a new action.
- Add -> Input -> Button. Select Backup from the list
- Add -> Task -> Wait -> = 2 Seconds
- Add -> Task -> Script (or code) -> Run Shell. Command = "tap input xy" (without quotes!), Check root option. X and Y are the coordinates of the OK button on the screen.
- Add -> Task -> Wait -> Seconds = 5
- Add -> Mesh -> Wifi. set Off
- Add -> Devices -> Kill App. Choose the PHEV App
We now have a task that covers the PHEV app, turn off wifi and then cleans up the PHEV app if something gone wrong with the connection or close. As a result, we know that a command starts clean. The command input tap xy will tap that spot on the screen to choose the OK button with this. This is the basis for every action we make available via SMS.
The main reason that people are looking at this solution is turning on the AC. This option we try to build a profile. This profile is going to react to an incoming SMS with the text "AC". For this, we need to know the location where the AC button is. Start PHEV app and press the AC button and memorizes the coordinates. Now connect the PHEV app and start Tasker. Now go to the "PROFILES" tab.
- Click + to add a new profile. Choose Event -> Phone -> Received Text. Content = AC. Then click the back button to get to the next screen.
- Select 'New Task'. A name is not necessary.
- Click + to add a new action.
- Add -> Task -> Perform Task. Use the zoekglasje and choose 'Start PHEV App'
- Add -> Task -> Script (or code) -> Run Shell. Command = "tap input xy" (without quotes!), Check root option. X and Y are the coordinates of the AC button on the screen.
- Add -> Task -> Wait -> = 20 Seconds
- Add -> Task -> Perform Task. Use the zoekglasje and choose Close PHEV App '
When a task test (Play button) or run in Tasker will be asked to access Root. This should allow you permanently so that Tasker retain root access. You can now test the jobs using tasker (Play button in the tasks) or by sending an SMS. If your phone you will have to start seeing the PHEV app. Does not run anything all steps one by one along and check for each line.