Remote App access via sms and Tasker (for pre-heating)

Mitsubishi Outlander PHEV Forum

Help Support Mitsubishi Outlander PHEV Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

nils944

Active member
Joined
Dec 30, 2018
Messages
38
Location
Sweden
Does anyone have a sample Tasker script for starting the pre-heating (or cooling) using Mitsubishi's remote control app?

What I'm trying to do is remotely turn on the car's pre-heater beyond the car's limited WiFi range. A suggestion in various forums is to leave an Android phone in the car which remotely starts Mitsubishi's app after receiving a text (SMS) message.

As an aside, I did purchased the "Outlander PHEV SMS Remote" App but later discovered that it only supports the original version of Mitsubishi's Remote Control Outlander PHEV app. Somewhat annoying that he is still charging a hefty price for the App and no longer supporting/updating it but I'll spare you further whining about that.

Here's my current set-up:

An old Samsung S5 is in the car with the Mitsubishi PHEV I app, Tasker, and AutoInput installed. For access to the mobile network I bought a cheap pay-per-use sim card/plan.

My initial Tasker set-up was as follows

- Upon receiving an SMS with the text "H" a Tasker "Profile" calls up a task I named "Heat"

- The "Heat" task does the following:
WiFi set on
Wait 10 seconds
Launch App Remote Ctrl 1
Wait 10 seconds
Launch the AutoInput plug-in and instruct it to click on the "Climate ON/OFF" button
Wait 10 seconds
WiFi set off

After the initial set-up I tested it and it worked. There was much rejoicing. Howevever subsequently it has only worked sporatically at best, generally not working. I tried extending the wait times to 15 or 20 seconds with no luck. I suspect one problem is an error message that pops up in the PHEV app when the pre-heating is stopped because a door was opened.

If anyone has a functioning script and is willing to share it then I would be very grateful.
 
Any success? :) I don't even have my Outlander yet (should arrive at Sunday), but I'm already thinking that this remote control is something I want.

I'm planning similar approach with Tasker, except that I planned to use unanswered call for trigger. It's always free, SMS might cost something if you don't have some bundle.

Can you kill the app when it's done? That should prevent the "door opened" warning.
 
I've had more success with the script below, although it still doesn't work every time.

One issue is that the in-car phone battery sometimes dies, not helped by below-freezing temperatures. I have it plugged in to a charger in the arm rest, but recently I have only been driving on short trips which doesn't give the phone enough of a recharge. I'll probably use a power bank when we head up north for our "sport holiday" in a few weeks as expected temperatures will be around -15 C.

A couple of modifications I made may be specific to my phone: I found I had to force the screen to come on and also to force it to go to the home page. I also extended the wait times between tasks because the PHEV app can be slow in getting started and communicating with the car. Also, I had to leave the phone "uncovered" in the car: I have a phone wallet that folds over the screen and when the cover is on it keeps the screen shut off.

It would be great if someone familiar with programming could come up with a script, but in the meantime the following hodge-podge is working for me more often than not. From my regular mobile phone I send an sms with the text "h" to the slave phone in the car. It should also work for turning off the heat since the button on the PHEV app is just a toggle (i.e. not separate buttons for on and off).

Tasker profile:
Received Text, Type: SMS, Sender: me (I added my phone number to the contact list), Content: h
calls up Task "Heat"

1. Turn On the screen
2. Go Home (page 0, which is the default)
3. WiFi set On
4. Wait 20 seconds
5. Launch App: Remote Ctrl 1 (i.e. the PHEV app, PHEV 1 in my case)
6. Wait 30 seconds
7. AutoInput Action - Type: Point, Value: 540,1570 (screen coordinates, specific to my phone of course), Action: Click
I also checked the "Continue Task After Error" button for good measure.
This 7th step is to deal with the inevitable error message that I almost always get saying that the heating has been interrupted due to a door opening etc etc. The coordinates are the location of the "OK" button to acknowledge and get rid of the error message screen. I had previously tried with using the text value "OK" but if the error screen didn't pop up then the script wouldn't continue.
8. Wait 30 seconds
9. AutoInput Action - Type: Text, Value: Climate ON/OFF, Action: Click. Check "Continue Task After Error".
10. Wait 20 seconds
11. Go Home (Page 0)
12. Wait 10 seconds
13. WiFi set Off

I have the phone set to turn the screen off after 2 minutes, so I didn't bother adding a line to turn the screen off.

Hope this helps.
 
Zuikkis said:
Can you kill the app when it's done? That should prevent the "door opened" warning.

At one point I did have a line to kill the PHEV app when it was done but it didn't seem to help avoid the "door opened" warning. My guess is that the warning message is sent from the car.

That said it probably wouldn't hurt to include a "kill app" line near the end.
 
Since my above-noted Tasker script doesn's always work I decided to spend a few minutes setting up a new Tasker profile to send me a screen print of the PHEV app home page to see if the heat did actually get turned on. (I started this in the late morning and before I knew it the clock showed 11pm......)

In case anyone is interested here is the script I came up with. It usually works but I think that there is an issue with my file name variable: if the time between the screen print and composing the MMS goes over to the next minute the script stalls and fails.

One "bug" with Tasker seems to be that it doesn't actually turn the mobile data on (or off). So for the script to work I had to turn on mobile data. I have included lines for turning the mobile data on and off but they don't seem to do anything. (Mobile data has to be on in order to send an MMS, at least with my phone.)

People familiar with programming will no doubt cringe, but here goes.....

Tasker script to receive an MMS showing the PHEV app's home page (i.e. status of charging, remote heating, air con, etc):

Tasker profile:
Received Text, Type: SMS, Sender: me, Content: S
calls up Task "Status"

1. Turn On the screen
2. Go Home (Page 0)
3. Wait 1 second
4. WiFi set On
5. Wait 15 seconds
6. Launch App: Remote Ctrl 1 (i.e. the PHEV app, PHEV 1 in my case)
7. Wait 20 seconds
8. AutoInput Action - Type: Point, Value: 540,1570 (screen coordinates, specific to my phone), Action: Click
(This is to click where the "OK" button is located if an error message pops up.)
9. Wait 20 seconds
10. AutoInput Action - Type: Point, Value: 970,159 (screen coordinates, specific to my phone), Action: Click.
(This is to click the refresh at the top right of the PHEV home screen.)
11. Wait 20 seconds
12. Take Screenshot - File: Pictures/Screenshots/Screenshot_%DATE%TIME.png, Insert in Gallery
(The file location may be different on your phone, and you can name it whatever you want I guess.)
13. Wait 2 seconds
14. Go Home (Page 0)
15. Mobile Data set On
16. Wait 2 seconds
17. Set Clipboard: Text: (my mobile phone number that I'm sending the MMS to)
18. Compose MMS: Attachment: Pictures/Screenshots/Screenshot_%DATE%TIME.png
(Composes the MMS and attaches the screenprint of the PHEV home page.)
19. AutoInput Action - Type: Text, Value: Enter recipients, Action: Paste
(This pastes my phone number as recipient of the MMS.)
20. AutoInput Action - Type: Text, Value: Send, Action: Click
(Clicks the send button for the MMS message.)
21. Wait 15 seconds
22. Go Home (Page 0)
23. Mobile Data set Off
24. WiFI set Off

There are probably many superfluous "wait" commands, and as I noted above I don't think the Mobile Data commands actually do anything, at least not on my phone.
 
Thanks for your hints!

I used much simpler approach, which seems to work now. I only have owned a PHEV for two days though, so can't say I have yet very big experience with this. :) But it has worked several times already. :)

Phone is old MotoG which I downgraded from Android 8.0 to Kitkat 4.4.4 to make the old "10 digit" mitsubishi app work. Then I removed lockscreen from settings, so phone always goes directly to Mitsu app when screen is enabled. Screen sleep timeout set to 1 minute so it stays lit through the operation, it doesn't seem to work if it goes blank.

Then, Tasker setup so that "Phone ringing from favorite contacts" triggers my task. So I can choose which numbers are allowed to start heating.

The task is like this:

1) End call (will signal "busy" to the caller, who then knows that at least Tasker was awake :) )

2) Launch Mitsu app

3) AutoInput Action , Click OK on the " door open" error. "Continue task after error" checked so it continues to 4) if there was no error!

4) AutoInput Action, Click heater button


That's it.. :) Worked nicely so far.

Note also that I don't have any waits and it still works nicely. Autoinput Actions have timeouts builtin, I used the default 20 second. The task waits 20 seconds at 3) if there is no error, and then proceeds to 4..

2) is not even really needed because app is already visible, but "just in case"..

I didn't bother turning Wifi on and off, I don't know if it makes big difference to battery life.. Also no need to turn on the display, it will stay up for 1min after the call. :)

I used the AutoInput's "Easy Setup" -function to get actual id's of the buttons, and then click those instead of coordinates or text labels.
 
MotoG does not survive very long in cold.. It was -30C yesterday, the battery drained in 24h. :(

Now I installed it to the trunk, directly to auxiliary battery. So it will be 100% charged all the time. Pretty straight forward install, bought a simple cigarette lighter with clips. I also added a 3A fuse to the plus wire, this is pretty important! Fuse as close as possible to the battery + terminal, so if the wire is damaged before the fuse it can't reach any metal.

First I thought I make a hole to the plastic compartment below the trunk floor. (And actually drilled the hole, you can see it in the picture :) ) But then I realized that the phone fits nicely to the hole that is near aux battery minus terminal.. There is an removable cover on the plastic. I made a foam case for the phone, so it fits snuggly near the battery. The phone can be lifted through the hole and inserted back, very simple!
 

Attachments

  • 61uvxNyBWwL._SX425_.jpg
    19.8 KB · Views: 261
  • 20190123_190321.jpg
    39.7 KB · Views: 261
  • 20190123_190739.jpg
    53.5 KB · Views: 261
Zuikkis said:
Thanks for your hints!

I used much simpler approach, which seems to work now. I only have owned a PHEV for two days though, so can't say I have yet very big experience with this. :) But it has worked several times already. :)

Update, it didn't work reliably. :D There are some issues which I have found out one by one:

1) Refresh button must be clicked first so "Heater on/off"-button shows correct state. Otherwise the "Heater on/off" might show the on-state of the previous heating cycle (several hours ago!) and app will send "Heater OFF" if clicking the button. :)

2) Error message can pop up at any stage: right at startup, after refresh, or after sending the heater command. OK must be clicked before continuing. The last error does not really matter as this is then clicked on the next run.

3) A few seconds wait seems to make it more reliable.

I attached a screenshot of the Tasker program..

View attachment 20190126_190829.jpg

Perhaps it's now fine.. :)
 
Zuikkis said:
Perhaps it's now fine.. :)

Narrator: Turns out, it was not fine.

Sometimes the app reports really mysterious error message, something like "A/C function not available right now, check that power switch is not ON".. However, when clicking OK and pushing the silly button again it works then. Really annoying.

So now I have a yet different approach! :) I noticed that AutoInput plugin has a cool feature that it can take a screenshot, crop it to given area, and then COMPARE that to an earlier screenshot. It then sets a variable in Tasker which can be checked. So, it's possible to really see if the A/C button is blue or gray, and loop until it actually is correct color! In the loop it simply clicks "ok" and "AC" buttons alternatively. Quite a long Wait is needed after "AC" before taking the screenshot, so the display is sure to be updated.

Screen capture is only available on Android 5.0 and above, which ment that I needed to upgrade my MotoG from 4.4.4, and install all programs from scratch. pairing again to the car etc. Argh.
 
Mitch said:
can someone share the tasker script please?

Due to the nature of Tasker and AutoInput plugin, it's not very easy to share.. :( Even when I upgraded my phone from Android 4.4 to 7.0 I had to do it pretty much from scratch again. I'm sure it would be even more difficult to export to completely different brand phone.

But the method I described above works very well. It has now been in use for over a month and I use it maybe twice a day, and it hasn't failed even once.

Here's some pseudocode.. The phone is in the car so I'm doing this from memory, but it should be close. I have set this to trigger from "incoming call from favorite number", that's why it starts with hangup.

1) Hangup call
2) Launch Remote control program
3) set loop counter variable to 3

Loop:

4) Decrement loop counter
5) wait 2 seconds
6) Press "refresh" button on top right corner. Set timeout to 5 secs.
7) Wait 10 seconds
8) Try pressing "OK" button with AutoInput, in case there is some requester. Set timeout to 5 secs
9) wait 2 seconds
10) Press "heater" button. Longer timeout needed, like 15 secs
11) Wait 15 seconds (or maybe a bit less)
12) Using AutoInput's screen capture, Take a screenshot from heater button area, compare with earlier screenshot with heater "on"
13) If loop counter >0 and screenshots did not match, go back to 4 (loop)

14) If loop counter =0, call back to number %CNUM (which Tasker sets in step 1)
15) blank screen


So, when I call the car number, it immediately hangs up so I know Tasker script has started. Then it tries to activate the heater. If after three tries the heater still is not active, it calls me back. But this has never happened so far, so it's perhaps a bit unnecessary feature.

I have phone display timeout set to three minutes, so display stays on during the operation. Also disable all lock screens, so that remote app is right at top immediately when screen goes on.

You need some slightly modified version to get the initial screenshot with heater "on", then rename that to something else and use that filename in step 12 as compare file..
 
FWIW, attached is my backup that seems to work fine on my Moto E in the car.

Tonight I added a step that clicked away the OK screen if the door was opened.

If you use it you need to put your name in your contacts and the message to send, both are right near the top of the text.
 

Attachments

  • backupphev.xml.zip
    6.6 KB · Views: 32
Back
Top