
Summary: Tesla Model 3 2019 (EU) as "solar string" on Kostal Plenticore Plus (together with the amazon precharge converter) happily delivered 5kW for ~15 minutes.
Yeah, I will conduct some tests in that area since I can finally control the (dis)charge rate. If that shouldn't work, another attempt would be to disconnect the CP line via a relay to simulate a unplug/plug and thus restart the charging session. But even those 5kWh are "workable"... that would get us through a summer night
No no no... please don't get a Kostal. Basically every other inverter has a ModBus or CAN interface, except for the Kostal, they implement a custom (undocumented) protocol over RS485, which isn't fully understood yet. There are some timing related things in the protocol, and thus I cannot reliably start a session with it. Also the battery input only supports a voltage up to 650V.
Ouch, glad to hear you are fine!
This happens when charging station reports that it is transmitting power and car doesn't see it. In this case tesla vehicle thinks that something is wrong and there is a huge problem and blows fuse in this case.lewurm wrote: ↑Tue Dec 17, 2024 10:46 pm Some setback on my side. For context, my current setup looks like this: (1) RaspberryPi with pyPLC running (hooked up via WiFi to the local network), (2) an ESP32 running the battery emulator code for communication with the inverter via RS485 and also controls some additional contactors (also hooked up via WiFi) and then (3) the inverter itself hooked up via Ethernet to the local network.
There must be some care taken when it comes to stopping the charge session: No power should go over the wire. The base case is when the car user presses "stop charging" on the car UI, the car first will send a PowerDeliveryReq with ReadyToChargeState set to false, and then a SessionStopReq. For both messages it is fine to wait around for one second with an actual reply; In the meanwhile there is enough time to send modbus commands to the inverter to reduce the power to 0, and as a failsafe, on the SessionStopReq I'll also open the contactors attached to the battery emulator, the idea being I'd rather have those welded than the contactors in the car.
That works reasonably well... except for two issues:So if those two occur at the same time you get this apparently (the inverter was drawing with around 4000W at this point):
- For some reason the PLC connection starts getting hung up somehow a couple times already; the symptom being that the raspberry starts sending TCP retransmissions, which take too long and therefore the car will abort the session (reported on github), but on the pyPLC side no SessionStopReq is received.
- If you read my description of my setup carefully, you will notice that I’m kind of insane and do safety critical communication over a wireless network. Well, that can be congested sometimes and requests can take a while.
Screenshot 2024-12-17 at 23.22.27.png
That is the HV system wouldn’t come up anymore. Shout out to my wife for being super chill about me bricking our daily driver.
The behaviour at least is good news, I think: Before opening the contactors it will rather blow up the fuse (much cheaper to replace). At least that's my understanding, I don't have hard proof for it. I didn't capture all the messages in the service menu, and most of them were gone after a reboot, but I guess somewhere in there it would give a reason.
That happened last Thursday, and on Monday I had new pyrofuses in my hands. Initially I ordered two to have one as a backup, but since those weren’t OEM fuses and I read some scary stories about replicates in the meanwhile, I decided to blow one up before putting it into the carLuckily it did its job. Replacing the pyrofuse in the car is like a 2h job. I guess it could be done in about an hour if you are more experienced (let’s hope I cannot confirm this soon-ish
). HV system comes up again, everything seems fine
![]()
Anyway, further experiments are on hold on my side until I’ve a backup pyrofuse (hopefully before Christmas, actually picking up one from the local Tesla service center on the 23rd if everything goes as planned). In the meanwhile I’ll squash the battery emulator logic for talking to the inverter somehow onto the Raspberry Pi (probably within pyPLC, it’s really just a serial protocol over RS485 and controlling a few GPIOs for the contactors) to get rid of the wireless communication. Initially I wanted to stick with the battery emulator in the picture, because it supports a couple of inverters already, but oh well. Maybe I'll also run another cable to the inverter to not use ModBus over TCP but rather over RS485.
Additionally I want to be able to detect those TCP reconnections reliably. Not quite sure yet how to do that, but since the sniffer messages are popping up multiple times in the syslog there should be some way to detect it. And then I'd like to improve the situation to not even have those TCP reconnections anymore, but not really sure what I can improve on that front.
Let's hope blowing up a pyrofuse is the worst that can happen to the car with those kind of experiments![]()
Hi, thank you for your sharing!lewurm wrote: ↑Tue Dec 17, 2024 10:46 pm Some setback on my side. For context, my current setup looks like this: (1) RaspberryPi with pyPLC running (hooked up via WiFi to the local network), (2) an ESP32 running the battery emulator code for communication with the inverter via RS485 and also controls some additional contactors (also hooked up via WiFi) and then (3) the inverter itself hooked up via Ethernet to the local network.
There must be some care taken when it comes to stopping the charge session: No power should go over the wire. The base case is when the car user presses "stop charging" on the car UI, the car first will send a PowerDeliveryReq with ReadyToChargeState set to false, and then a SessionStopReq. For both messages it is fine to wait around for one second with an actual reply; In the meanwhile there is enough time to send modbus commands to the inverter to reduce the power to 0, and as a failsafe, on the SessionStopReq I'll also open the contactors attached to the battery emulator, the idea being I'd rather have those welded than the contactors in the car.
That works reasonably well... except for two issues:So if those two occur at the same time you get this apparently (the inverter was drawing with around 4000W at this point):
- For some reason the PLC connection starts getting hung up somehow a couple times already; the symptom being that the raspberry starts sending TCP retransmissions, which take too long and therefore the car will abort the session (reported on github), but on the pyPLC side no SessionStopReq is received.
- If you read my description of my setup carefully, you will notice that I’m kind of insane and do safety critical communication over a wireless network. Well, that can be congested sometimes and requests can take a while.
Screenshot 2024-12-17 at 23.22.27.png
That is the HV system wouldn’t come up anymore. Shout out to my wife for being super chill about me bricking our daily driver.
The behaviour at least is good news, I think: Before opening the contactors and risk welding, it will rather blow up the fuse (much cheaper to replace). At least that's my understanding, I don't have hard proof for it. I didn't capture all the messages in the service menu, and most of them were gone after a reboot, but I guess somewhere in there it would give a reason.
That happened last Thursday, and on Monday I had new pyrofuses in my hands. Initially I ordered two to have one as a backup, but since those weren’t OEM fuses and I read some scary stories about replicates in the meanwhile, I decided to blow one up before putting it into the carLuckily it did its job. Replacing the pyrofuse in the car is like a 2h job. I guess it could be done in about an hour if you are more experienced (let’s hope I cannot confirm this soon-ish
). HV system comes up again, everything seems fine
![]()
Anyway, further experiments are on hold on my side until I’ve a backup pyrofuse (hopefully before Christmas, actually picking up one from the local Tesla service center on the 23rd if everything goes as planned). In the meanwhile I’ll squash the battery emulator logic for talking to the inverter somehow onto the Raspberry Pi (probably within pyPLC, it’s really just a serial protocol over RS485 and controlling a few GPIOs for the contactors) to get rid of the wireless communication. Initially I wanted to stick with the battery emulator in the picture, because it supports a couple of inverters already, but oh well. Maybe I'll also run another cable to the inverter to not use ModBus over TCP but rather over RS485.
Additionally I want to be able to detect those TCP reconnections reliably. Not quite sure yet how to do that, but since the sniffer messages are popping up multiple times in the syslog there should be some way to detect it. And then I'd like to improve the situation to not even have those TCP reconnections anymore, but not really sure what I can improve on that front.
Let's hope blowing up a pyrofuse is the worst that can happen to the car with those kind of experiments![]()
Alas nope, there was a follow-up: https://teslamotorsclub.com/tmc/threads ... st-8579714uhi22 wrote: ↑Mon Jan 20, 2025 7:11 am Looks like the Teslas 15Ah limit can be worked-around by pretending a charge current while actually discharging: viewtopic.php?p=78883#p78883
Yes! I'm planning to do a more structured write-up somewhen next month, but for now a braindump for curious folks must do it; basically all the information is out there, I just built something on top of giants (pyPLC and battery emulator) and put them together
This is definitely a possible way. However, it requires to implement the evse state machine on stm32. I think somebody did this but I cannot find it. An other way is using a raspberry running pyPLC instead of Focccis stm32, and connect the Raspberrys SPI to Focccis SPI.dimonlipko wrote: ↑Wed Jan 22, 2025 8:55 pm I have Foccci and think about modify it, add PWM for EVSE and add external module voltage supply for emulate precharge.
Who has any thoughts on this?)
So from the logs of this V2L device that was discussed, it appears that it sends EVSEMaximumPowerLimit with 480kW. In the OpenV2G fork that is used for pyPLC, this value is hard coded to 10kW. For testing, I bumped it up to 250kW (that's the maximum power I have witnessed at a fast charger) and then indeed the car will start heating the battery pack.
Code: Select all
$ /home/lewurm/private/open-plc-utils/plc/plcstat -t -i eth0 -d 2 -m -e
P/L NET TEI ------ MAC ------ ------ BDA ------ TX RX CHIPSET FIRMWARE
LOC CCO 001 EC:08:6B:8B:DC:D6 DC:A6:32:21:1A:7E n/a n/a QCA7420 MAC-QCA7420-1.1.0.844-01-20120919-FINAL
REM STA 002 DC:44:27:10:16:16 DC:44:27:10:16:15 009 009 QCA7005 MAC-QCA7005-1.2.5.3207-00-20180927-CS
NID 01:02:0D:1E:56:64:07 SNID 001
CCO TEI 001 MAC EC:08:6B:8B:DC:D6 BDA DC:A6:32:21:1A:7E
STA TEI 002 MAC DC:44:27:10:16:16 BDA DC:44:27:10:16:15 TX 009 RX 009
DIR ----------- PBs PASS ----------- PBs FAIL PBs ERR ---------- MPDU ACKD ---------- MPDU FAIL
TX 6 0 0.00% 6 0 0 0.00%
RX 0 0 0.00% 0 0 0.00%
PHY ----------- PBs PASS ----------- PBs FAIL PBs ERR ----------- BER PASS ----------- BER FAIL BER ERR
0 0 0 0 0.00% 0 0 0.00%
1 0 0 0 0.00% 0 0 0.00%
2 0 0 0 0.00% 0 0 0.00%
3 0 0 0 0.00% 0 0 0.00%
4 0 0 0 0.00% 0 0 0.00%
5 0 0 0 0.00% 0 0 0.00%
ALL 0 0 0.00% 0 0 0.00% 0.00%
that would be interesting
Sorry for the confusion: The CP cable from the CCS2 port to the box is indeed not shielded, but for "routing" CP inside the box I'm using a shielded cable (just a 4 wire telecommunication cable that I had around). This is me just being desparate; the way I understand PLC is that it's exactly built for noisy scenarios, so this shouldn't be needed.
I did that a few days after I've posted that and with v5.0 I did not get a single timeout since. I'm also using the DC Wallbox exclusively since then.