Mitsubishi Outlander PHEV Forum

It is currently Tue Oct 22, 2019 6:19 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Remote App access via sms and Tasker (for pre-heating)
PostPosted: Sun Dec 30, 2018 10:02 am 
Offline

Joined: Sun Dec 30, 2018 5:56 am
Posts: 26
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.

_________________
____________________________________________
2014 Outlander PHEV, "Business" package


Top
 Profile  
 
 Post subject: Re: Remote App access via sms and Tasker (for pre-heating)
PostPosted: Fri Jan 18, 2019 3:57 am 
Offline

Joined: Sun Oct 29, 2017 8:19 am
Posts: 39
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.


Top
 Profile  
 
 Post subject: Re: Remote App access via sms and Tasker (for pre-heating)
PostPosted: Sun Jan 20, 2019 2:15 am 
Offline

Joined: Sun Dec 30, 2018 5:56 am
Posts: 26
Location: Sweden
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.

_________________
____________________________________________
2014 Outlander PHEV, "Business" package


Top
 Profile  
 
 Post subject: Re: Remote App access via sms and Tasker (for pre-heating)
PostPosted: Sun Jan 20, 2019 2:20 am 
Offline

Joined: Sun Dec 30, 2018 5:56 am
Posts: 26
Location: Sweden
Zuikkis wrote:
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.

_________________
____________________________________________
2014 Outlander PHEV, "Business" package


Top
 Profile  
 
 Post subject: Re: Remote App access via sms and Tasker (for pre-heating)
PostPosted: Sun Jan 20, 2019 3:00 am 
Offline

Joined: Sun Dec 30, 2018 5:56 am
Posts: 26
Location: Sweden
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.

_________________
____________________________________________
2014 Outlander PHEV, "Business" package


Top
 Profile  
 
 Post subject: Re: Remote App access via sms and Tasker (for pre-heating)
PostPosted: Tue Jan 22, 2019 10:23 am 
Offline

Joined: Sun Oct 29, 2017 8:19 am
Posts: 39
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.


Top
 Profile  
 
 Post subject: Re: Remote App access via sms and Tasker (for pre-heating)
PostPosted: Wed Jan 23, 2019 12:50 pm 
Offline

Joined: Sun Oct 29, 2017 8:19 am
Posts: 39
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!


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Remote App access via sms and Tasker (for pre-heating)
PostPosted: Sat Jan 26, 2019 10:17 am 
Offline

Joined: Sun Oct 29, 2017 8:19 am
Posts: 39
Zuikkis wrote:
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..

Attachment:
20190126_190829.jpg


Perhaps it's now fine.. :)


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Remote App access via sms and Tasker (for pre-heating)
PostPosted: Sun Jan 27, 2019 11:05 am 
Offline

Joined: Sun Oct 29, 2017 8:19 am
Posts: 39
Zuikkis wrote:
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.


Top
 Profile  
 
 Post subject: Re: Remote App access via sms and Tasker (for pre-heating)
PostPosted: Thu Feb 28, 2019 6:33 am 
Offline

Joined: Wed Oct 31, 2018 2:23 am
Posts: 136
Location: Munich, Germany
can someone share the tasker script please?

_________________
Greetings
Markus :)

2019 Top


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
© Mitsubishi Outlander PHEV Forum - part of the MyElectricCarForums.com Group