TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker or making a Paypal contribution here: paypal.me/SupportTMC

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

Discussion in 'Model S: User Interface' started by gordo, May 15, 2015.

?

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

Poll closed Jun 14, 2015.
  1. Release the script with directions for installing on a limited range of routers (DD-wrt/Tomato).

    3 vote(s)
    21.4%
  2. Release as a hosted solution where you provide your login credentials to a 3rd-party server.

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

    3 vote(s)
    21.4%
  4. I have no interest in this sort of functionality.

    4 vote(s)
    28.6%
  1. gordo

    gordo Member

    Joined:
    Jan 16, 2015
    Messages:
    213
    Location:
    CA
    #1 gordo, May 15, 2015
    Last edited: May 15, 2015
    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...
     
  2. wayner

    wayner Active Member

    Joined:
    Oct 29, 2014
    Messages:
    1,583
    Location:
    Toronto
    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?
     
  3. gordo

    gordo Member

    Joined:
    Jan 16, 2015
    Messages:
    213
    Location:
    CA
    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.
     
  4. spottyq

    spottyq Member

    Joined:
    May 7, 2015
    Messages:
    227
    Location:
    Belgium
    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 ?
     
  5. wayner

    wayner Active Member

    Joined:
    Oct 29, 2014
    Messages:
    1,583
    Location:
    Toronto
    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.
     
  6. gordo

    gordo Member

    Joined:
    Jan 16, 2015
    Messages:
    213
    Location:
    CA
    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.
     
  7. David99

    David99 Active Member

    Joined:
    Jan 31, 2014
    Messages:
    2,048
    Location:
    Brea, Orange County
    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.
     
  8. rdrcrmatt

    rdrcrmatt Member

    Joined:
    Jun 27, 2013
    Messages:
    551
    Location:
    Milwaukee
    I did this with a bash script on a Linux box over a year ago, posted the code in the REST API thread.
     
  9. gordo

    gordo Member

    Joined:
    Jan 16, 2015
    Messages:
    213
    Location:
    CA
    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.
     

Share This Page