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

HPWC & temperature-dependent peak electricity rates

This site may earn commission on affiliate links.
A similar question has probably been asked before but I was not able to find:

Do you know if there is any way to tell the HPWC to stop charging, based on an electric signal (e.g. 0-5V or 0-12V)?

Here is the long explanation of why I need that: Here in Quebec, we are in the special situation where: 1) 99% of the electricity is hydro power (i.e. easily interruptible, no need for the utility to encourage people using electricity during fixed hours at night, and 2) >70% of homes are heated by electricity, which means that Hydro-Quebec needs to import power when its very cold (typically below -25 C/-10 F).

For that reason, they offer a special rate that is half price when temperature is above -12 C/10 F (so most of the time), and is about 3 times more expensive when below that temperature. And obviously, the transition does not occur at fixed times. In Montreal, the high-rate period occurs about 300 h per winter (the equivalent of 14 days, 24 hours a day; each period can last anywhere between a few hours and a few days nonstop). To be able to apply, you need to have another source of heating installed in your home, that switches on automatically, based on a signal (probably 0-5V or 0-12 V, or something like that, I have to figure it out). It also cuts the water heater power, but you have a special button if you want to heat your water anyway.

I'm planning to apply for this rate (keep my old oil furnace for peak hours, and have a heat pump/AC for the rest of the year).

Now the car. Four solutions came to my mind so far:
1) Manually plan and charge only when the weather forecasts indicate that the temperature won't go down too much (or at least not before charging is finished). Not very practical: I would have to check each time if I need to limit the charge level in order to make sure it stops charging before the temperature is predicted to go below -12C. But that's what I plan to do right now.

2) Put the HPWC on a switch similar to the water heater, so I have a button to charge anyway if needed. Not sure however if the car would appreciate suffering power cuts on a regular basis. Probably not good. What do you think?

3) Similarly, if possible, send the signal directly to the HPWC so it gracefully stops charging. Hence my question at the beginning of the post. I'm not sure the car would appreciate that either, but maybe there are special communications between the car and the HPWC so the car doesn't interpret that as a power failure? Do you know if the HPWCs offer such possibility? A jumper or something? I can adapt the signal.

4) Have a computer that receives the peak-hour signal and sends a command to the car (via the API) to stop charging if it is charging, and start back charging when the signal goes away. This is somehow my preferred solution. (I already wrote some code in Python to communicate with the car. A RaspPi would probably do the job.) However, there is some security concerns about leaving a computer on with access to the car, and I would need to generate a new key every couple of weeks. But maybe I could turn on the computer only when needed.

Any other suggestions?
 
Last edited:
Find the lines that emulate pressing the button on the charge handle.

If these lines come into the HPWC box you can control it from there.

Have your Pi "press the button" when it wants to, this will cut charging. It can release the button and charging will resume.

If there are no lines coming back to the box, then the button is doing something locally in the handle that is fiddling with the resistor-based sensor that informs the charge port of what's plugged into it and state of readiness to charge. So put your Pi in the car trunk and find those lines on the chargeport connectors, and "place the appropriate resistive load" on the data lines.

Failing that, strap a device to the handle itself that physically presses the button with a "rubber finger". The benefit of this approach is 100% electrically isolated circuit from the car and HPWC. Plus you could make it look really creepy and maybe takes the form of a whole dismembered hand formed in latex... operating with divine knowledge of the grid.

juste vous donner un coup de main!

Halloween is coming!
 
Could you try a different route and have the car send the signal to stop charging? Check with TeslaFi and see if they have a temperature related setting. If they don't, they could probably easily add one if you submit a request. Then when the car is charging, they could have it check the temperature and stop charging if it gets too cold.
 
Thanks for the suggestions. They helped me find a lot of stuff people are doing, especially those with solar panels.

@Rockster, unfortunately I have a 2015 model, which didn't come with communications capability. Only HPWC after mid-2016 have it, apparently.

@MorrisonHiker, the problem with that solution is that it would stop charging whenever the temperature is below -12C, whether I'm plug at home or somewhere else, unless I can couple that with some geofencing function. Anyway I strongly prefer a solution coupled to my actual 12V high-rate signal.

@scottm, I tested a solution similar to what you suggest. Someone here found the RF signal the Tesla charger handles send when you press the button to open the port. I tested it using a Raspberry Pi, pin 12. (In North America, you have to change the frequency to 315000 kHz in the command.) It does open the port when noting is plugged (see this video from another user.) But unfortunately, when it's connected, it does not interrupt charging. No luck!

I'll try to hassle the guys on these other threads to see if they think about something else.
 
Last edited:
4) Have a computer that receives the peak-hour signal and sends a command to the car (via the API) to stop charging if it is charging, and start back charging when the signal goes away. This is somehow my preferred solution. (I already wrote some code in Python to communicate with the car. A RaspPi would probably do the job.) However, there is some security concerns about leaving a computer on with access to the car, and I would need to generate a new key every couple of weeks. But maybe I could turn on the computer only when needed.

Answering to myself in case it's useful to someone else. I thought about a solution to address my concern of leaving online all the time and unattended a Raspberry Pi or any other computer containing the info to communicate with the car : turn the Internet communications off all the time except a few seconds when the computer needs to tell the car to stop or restart charging, or to tell me that the token has to be renewed, or from time to time to check for updates. This way, unless the computer receives a corrupted update or something like that, there is a very small window of opportunity for an attack the computer, only a few seconds maybe 20-30 times during the winter.

On a RaspPy, this can be done via a simple ifdown/ifup commands. I'll post my code when I'm done.

P.S. Just writing the words bi-energy, DT rate, and Hydro-Quebec here so people in the same situation find this thread on Google.
 
Last edited:
Answering to myself in case it's useful to someone else. I thought about a solution to address my concern of leaving online all the time and unattended a Raspberry Pi or any other computer containing the info to communicate with the car : turn the Internet communications off all the time except a few seconds when the computer needs to tell the car to stop or restart charging, or to tell me that the token has to be renewed, or from time to time to check for updates. This way, unless the computer receives a corrupted update or something like that, there is a very small window of opportunity for an attack the computer, only a few seconds maybe 20-30 times during the winter.

On a RaspPy, this can be done via a simple ifdown/ifup commands. I'll post my code when I'm done.

P.S. Just writing the words bi-energy, DT rate, and Hydro-Quebec here so people in the same situation find this thread on Google.

I think you are way over-thinking this.

The water heater cutoff solution (load shedding) is the prefect solution. It is already engineered and supported by the power company and tied into the high rate of cost load shedding system.

Stopping charging a lithium ion battery without warning should be *totally* fine. The same thing happens when you unplug your cell phone... (I would presume the battery cooling system can continue running off the battery itself for however long it needed to after the charging stopped).

The reason you “tell the car” you are going to disconnect before disconnecting is so it can stop charging current so you don’t disconnect the power under load which can cause arcing.

Whatever type of system the power company can provide for your water heater would work for the HPWC (but you may need a higher amperage contactor depending on how much amperage your hpwc is wired for). It is in fact perfect as in case you get desperate after a few days without charge you can hit the magic button and pay the increased rate to charge. The system the power company provides has to be able to safely disconnect power without damage under load since if is intended for water heaters, they will often be under load when it needs to disconnect.

Now while that is the most complete and “dumb” solution, another option as discussed would be to use the API to send “stop charging” commands just like you can from the Tesla app. Bonus points if you send “start charging” commands after the curtailment ends. (Though you also would need to ensure if you plugged it in during a curtailment that it did not start charging itself since the stop charging command would have been sent before the car was plugged in)
 
I think you are way over-thinking this.

The water heater cutoff solution (load shedding) is the prefect solution. It is already engineered and supported by the power company and tied into the high rate of cost load shedding system.

Stopping charging a lithium ion battery without warning should be *totally* fine. The same thing happens when you unplug your cell phone... (I would presume the battery cooling system can continue running off the battery itself for however long it needed to after the charging stopped).

Indeed, I don't think the battery itself would suffer from power cuts. However, the car high-power electronics might (the 10-20 kW of a HPWC is quite much more than ~10W for a phone) and/or maybe the protection is also there in case the cable is failing. Anyway, when the car suffers a power cut (with a cable plugged, charging or not), you get a warning about the non-reliability of the power source and the car reduces future charging current to 75% of its nominal value. If the power cuts 4-5 times, the car then refuses to charge from that source. That's what I ment by "the car would [not] appreciate suffering power cuts on a regular basis."

Hence my preferred solution to use the API to tell the car to stop and start charging. With a strategy to avoid letting the computer unattended online all the time with all the info to control the car on it.