Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Interest in a service or device that charges/preheats your car to a target end time?

There are three basic options for releasing this to the world. How should I proceed?

  • Release the script with directions for installing on a limited range of routers (DD-wrt/Tomato).

    Votes: 3 21.4%
  • Release as a hosted solution where you provide your login credentials to a 3rd-party server.

    Votes: 4 28.6%
  • Release as a small device (~$40) that works by simply plugging it into your existing router.

    Votes: 3 21.4%
  • I have no interest in this sort of functionality.

    Votes: 4 28.6%

  • Total voters
    14
  • Poll closed .
This site may earn commission on affiliate links.
Over the past few weeks I've built a script that runs on my wireless router (using Tomato firmware) that looks at my car's state of charge each night and intelligently determines when to start charging in order to hit charge targets I set for weekdays (right before my electrical rates go up) and weekends, all without requiring any manual intervention or a 24x7 running computer. In this way I can be sure my car is always charged when I need it, at the best electrical rates, all while minimizing the total time spent at higher rates of charge, which should extend the overall lifetime of the battery.

My next goal is to have the basic settings configurable via a webpage that can be accessed anywhere, anytime. Without a huge amount of effort, I could extend the script to cover pre-conditioning using similar logic and API calls.

My question to the forum is in the above poll...
 
Last edited:
Why not add - run locally on a PC. I have a couple of PCs that run 24X7 so that isn't an issue for me and I am guessing that many others are in the same position. Modern CPUs gear down and don't use a lot of power when not working hard. Who cares if you are wasting 1kWh per day?
 
Well, I figured you could always just leave VisibleTesla open and set a standard schedule from there if you're going to run a PC 24x7... My PC takes up ~100watts idling, so that's a kWh every 10 hours, which during the day costs me $0.44 in California.
 
Why not add - run locally on a PC. I have a couple of PCs that run 24X7 so that isn't an issue for me and I am guessing that many others are in the same position. Modern CPUs gear down and don't use a lot of power when not working hard. Who cares if you are wasting 1kWh per day?

The whole point of the script is to minimize kWh used... And I guess if you leave several PC's on 24x7 you are able to write the script yourself !

As for the poll, first option : those who can't write such a script don't run openWRT on their routers, and installing it (openWRT or Tomato) will be a huge deterrent for many.
Second option is probably the best. It is easy to use, and people are used to give their credentials around (sadly)...
Third option : no idea if some would be interested.

Just for curiosity's sake : how do you plan to run your third option ? A full-blown comptuer on a stick that gets it power from a router's usb port and connect via wifi (how does the setup, wifi password, myTesla credtentials etc. would work ?)
You can't run arbitrary code on any router via the usb stick plugged in right ?
 
Well, I figured you could always just leave VisibleTesla open and set a standard schedule from there if you're going to run a PC 24x7... My PC takes up ~100watts idling, so that's a kWh every 10 hours, which during the day costs me $0.44 in California.
what CPU do you have? Modern PCs throttle down a lot - my i7-4770k, which is a couple of years old, uses a bit over 20W when idle. That's a kWh every couple of days and your PC is likely going to be on for a few hours a day anyway.
 
i5-2600k, but also a hefty GPU. In any case, if you already have a PC that's on 24x7, I think expanding the scheduling functionality of VisibleTesla would be a better idea than me overlapping part of its functionality.
 
Personally I often have to manually set the charge limit different for each day. If I work from home, I need maybe 60%. If I work away, I need 80 to 90% for the day. To simplify it, I set the car to start charging at 3 am. Yes, often it finishes 1-3 hours earlier than I need it, but that's fine. I'm trying to keep it simple and fool proof. So I would probably not use your script at all just because it adds a variable and level of complexity into the charging process that doesn't give me much of an advantage but could fail.
 
I did this with a bash script on a Linux box over a year ago, posted the code in the REST API thread.

Found it. Very cool. Might have saved me some time in retrospect. Your script is quite a bit different from mine and I haven't had time to read it closely, but it looks like you're checking in with the car every couple minutes to view progress throughout the charge to determine when to stop? How do you decide when to start charging?

My script (perhaps less elegantly than yours) would be scheduled to run say at midnight each day, gathers info from the car, takes a user input target percent charge, target completion time, charge voltage and amperage and calculates the time necessary to charge. It then creates a cron schedule to start the charge at an appropriate time and sets the car's charge target, so the car stops itself at the target charge level around the target time.