GM Volt Forum banner
1 - 20 of 92 Posts

·
Registered
Joined
·
56 Posts
Discussion Starter · #1 · (Edited)
I've hacked together a small script to emulate the OnStar's remote start feature. The big advantage this has to what OnStar offers is that this can be configured (via Windows "Scheduled Tasks" feature) to run automatically at a set schedule. Because that was my intended purpose, it (intentionally) produces no visual output or feedback as it runs - though it does create a number of logs and debug files for troubleshooting in the future when OnStar changes things and/or it fails to run.

I am very hesitant to release this, as I have only used it myself a small handful of times. I'm only doing the same thing the web page currently does, but I'd imagine that should OnStar revise their website at some point in the near future, this will stop working, and who knows what sort of issues it would be creating on their end at that point... that being said, I'm very disappointed at the number of true "hacks" I've seen for the Volt so far. I used to have a Prius, and people were constantly taring it apart to find different ways to "enhance" functions. Perhaps this will be a ever-so-slight kickstart to some of those ideas for the Volt.

I don't claim this will work for you, and I certainly don't recommend using it. It just seems like a bad idea - starting your car on a set schedule potentially without you being aware, around, or even in the same state you were when you scheduled it to run. I provide no support for this, it's not official in any way, it's not pretty or well documented, and I don't even know what half of this data going back and forth is (though perhaps I could take a guess at some of it...)

This is provided as a learning aid only - not for use. I take no responsibility for what happens with it, to it, or to your car, health, or welfare. I only ask that should you improve upon this idea, you share your work as well (at least with me!)

The below file would be a VBScript file (with a .vbs extension) if it were a program. It would also require slight modification to personalize it to your account and environment.

Update: Version 3
Now supports Canadian owners and multiple Volt's on the same account!
Credit goes to Destinet for the Canadian weather additions and all the assistance in getting 2 Volts on the same account tested!

View attachment Start_the_Volt v3.txt

Version 2
Now supports preconditioning based on:
  • Current outdoor temp ranges
  • Charging on 120v, 240v, or not plugged in at all
  • Only when fully charged

Ohm
 

·
Registered
Joined
·
569 Posts
Can you change the script to add a hold option to the MM button......id like that!
 

·
Registered
Joined
·
273 Posts
I just tried this on my Windows 7 virtual machine. Worked like a champ!! Thanks for doing the work. I was just thinking about this today before I saw your message.
 

·
Registered
Joined
·
1,047 Posts
Thanks Ohm - I'm going to use the essence of this in an iPhone app to do all of the timing of the double-remote-start-while-plugged-in dance. (Oh, I sent you a PM).

When I start looking for beta testers, I'll post in this thread.
 

·
Registered
Joined
·
56 Posts
Discussion Starter · #6 ·
Update: Version 2
Now supports preconditioning based on:
  • Current outdoor temp ranges
  • Charging on 120v, 240v, or not plugged in at all
  • Only when fully charged
 

·
Registered
Joined
·
915 Posts
I just set up this script with the Windows Task Scheduler and tested a few times with different Variables. All works very well. Thanks for putting this together.. Now who is putting together the iPhone App? Id like to schedule auto charging etc too.
 

·
Registered
Joined
·
3,736 Posts
Just a quick note to say if there were any changes to the onstar site after their update : the script still works.
-------------
I have never used C_url and was not sure if I needed the SSL version but I did get and try it.

curl_724_0_ssl.zip

and

libssl.zip which has libeay32.dll and ssleay32.dll needed for the SSL version of C-url

all in the Curl folder.

I run Win-7 64 - not sure of any advantages to the 64 bit -Curl build.
-------------
Thanks for posting the script
 

·
Registered
Joined
·
273 Posts
I've hacked together a small script to emulate the OnStar's remote start feature.
any idea why the temp thing is not working??? Seems to have picked up the current temp and properly displays my preferred lower and upper limits

http://www.weather.gov/xml/current_obs/KMDW.xml -o "C:\curl\Current_Weather.xml"

Temp within range for preconditioning: current temp (65.0) lower than 60 or higher than 85
 

·
Registered
Joined
·
56 Posts
Discussion Starter · #12 ·
Indeed you're correct. It was a bug I missed due to the cold winter temps combined with VBScript's implicit conversion process. I've corrected the error and updated the attachment in the first post.

Thanks for the note!
 

·
Registered
Joined
·
273 Posts
can you take a look again at the temp script. still does not seem to be working.

"c:\curl\curl.exe" -s --insecure -b "C:\curl\Cookies.txt" -c "C:\curl\Cookies.txt" -q http://www.weather.gov/xml/current_obs/KORD.xml -o "C:\curl\Current_Weather.xml"
Temp within range for preconditioning: current temp (63.0) lower than 60 or higher than 85
 

·
Registered
Joined
·
915 Posts
James sent me an update on the original file modify the following:

A quick round statement before the "If temp >" seems to fix it.

Insert on a new line above the "If temp >":

temp = round(temp)
 

·
Registered
Joined
·
56 Posts
Discussion Starter · #16 ·
I'm pretty sure my logic in that area was just all around wrong. I've revised the overall logic, as well as incorporated the round function. Based on my (latest) tests, the round isn't needed - but I figure it can't hurt. I'm pretty sure it would do the same thing as the IsNumeric() change I put in yesterday to force it to compare as a numeric value.

Version 2.2 now updated in first post.
 

·
Registered
Joined
·
223 Posts
Script lessons learned - my system is Windows XP 32 bit

I needed the right curl version plus some libraries:
http://www.paehl.com/open_source/?download=curl_724_0_ssh2_ssl_sspi.zip
http://www.paehl.com/open_source/?download=libssl.zip

NOTE: All you need is the right "curl.exe" - YOU DO NOT NEED TO DO ANY COMPLEX INSTALLATION!!! JUST THE CURL.EXE in a folder!!!

I put the library and curl.exe in the same folder: C:\curl
NOTE: THIS IS ALL YOU NEED!!! (Plus the script of course)

Notes on ID and password and PIN: I had forgotten that the phone app uses that 4-digit PIN and was trying to use my password twice. The ID is your onstar ID, the password is the password for the Onstar website, and the PIN is the 4-digit number you use on the phone app. At least this is how I remember it.

Notes on using the script - I got confused on what "True" and "False" means for the various prompts. Here are some notes (I do better when I ignore the text in the script after the setting so I dont show it below):

Run_when_unplugged = False

>If this is set to True, it will start the car even if the car is unplugged. If it's set to False, it will only start if it's plugged in.

Run_on_120 = True

>If this is set to True, it will start the car if it's plugged in using the 120v charger. If it's set to False, it won't start if plugged into 120v

Run_on_240 = True

>If this is set to True, it will start the car if it's plugged in using the 240v charger. If it's set to False, it won't start if plugged into 240v

Run_only_when_fully_charged = True

>If this is set to True, it will only start the car IF it's at a 100% charged level. If it's only 99% charged, the car will not start. If you set it to False, it will start the car no matter how low the battery is.

I don't use the script to start my car on a schedule. I use it to start the car instead of the phone app. I get annoyed waiting on my phone to communicate with Onstar, connect to the car, waiting waiting waiting.... With this script you can just double-click it on the computer and your car starts! Awesome!
 

·
Registered
Joined
·
3,736 Posts
With some additional work and setting the onstar charging mode back and forth from Immediate-- do you think we could have computer control of the Volts charging times ?

There are times when designing a control system it seems the basic back yard water sprinkler controller has a lot to offer.
 

·
Registered
Joined
·
56 Posts
Discussion Starter · #19 ·
With some additional work and setting the onstar charging mode back and forth from Immediate-- do you think we could have computer control of the Volts charging times ?
All I can really do at this point is emulate existing website functionality. It looks like the functionality is there to modify the charging schedule on the fly... Perhaps we could set it to Immediate to initiate charging, then set it to a Delayed Start based on departure time, then give it a time far in the future when we want it to stop? Seems like that might work.

Unfortunately, I'm not living in an area where time-of-day rates are in effect, so I see no benefit from doing this myself. If you give me specific wants/needs around how you'd like it to work though, I could give it a shot.
 

·
Registered
Joined
·
273 Posts
It looks like the Weather Service has changed their website and the script is no longer picking up the current temp. When you have a chance, can you look at it and see if it can be fixed.

Thanks

Gene
 
1 - 20 of 92 Posts
Top