Hi all,
Wow, as soon as I stop paying attention, suddenly there's a ton of interest in this project!
I've gotten really busy lately and have been hired to code stuff for chargers professionally so my time has become really limited, but let me try to answer all the questions from the last couple months...
First, I'm still interested in knowing when/if Tesla releases new firmware versions, so if anyone has a newly purchased TWC, please continue to send me its firmware version and date of manufacture as follows:
- Visit this URL: http://<raspberry pi address>/index.php?sendTWCMsg=FB1B&submit=1
- If it returns 4.5.3 or later:
- Please get me the date of manufacture by visiting:
- http://<raspberry pi address>/index.php?sendTWCMsg=FB19&submit=1
- and the extended firmware version by visiting:
- http://<raspberry pi address>/index.php?sendTWCMsg=FBEC7777<TWCID of slave>&submit=1
- where <TWCID of slave> must be replaced by your TWC's 4-digit ID which is shown in the web UI.
- Send me results by clicking my name at the top of this post, then click 'Start a conversation', or post here if you prefer.
I've my EU wallconnector running in 16A master mode. Is there a way to get information out of it like firmware version or VIN of the connected car while running TWCManager in slave mode?
I think Master mode will respond to most messages like firmware version and VIN but I haven't tested.
Would be cool if the TWCManager could be purchased as a completed device
I considered offering this but there are too many legal issues of liability in the US for me to feel it's worth the risk. You could probably ask a local electronics repair place to put the parts together for you though.
I'm running Firmware version: 4.4.13
Should I upgrade it, or can I even upgrade it?
It would be great to upgrade the firmware, but unfortunately it requires a piece of hardware that costs about $30, plus a specialized cable that is a bit tricky to solder together. Or you can probably buy a specialized adapter but I didn't bother spending much time trying to source one. And then you need to install and figure out the software that reads/writes the firmware. Overall, it's not something an average home user would be able to do.
Hopefully someday Tesla will get their TWC firmware update through the car system working and then everyone will have the latest firmware.
@CDragon
1./
@sparkypete has made a great Tesla Powerwall integration, i wonder if this could be merged into main code branch.
Something like powerwall integration should be added using a "Branch" in the git repository. When I change anything in the main repository it's generally easy to merge in those changes to the branch. Putting support for every type of green energy system in the main repository would make it too complicated unless we come up with a system to have each type of system in its own file and users can pick which file gets loaded, but I don't feel I have time to try to orchestrate that.
If someone wants to start a branch, you will need to create an account at github.com. If you can't figure out how to branch the
TWCManager repository, click my name at the top of this post, then click 'Start a conversation' and ask me how.
Can we know what these magical new VIN commands are for the newest firmware?
Potentially useful commands in firmware 4.5.3 are:
- Remember, these commands won't work in TWCs containing firmware with a lower number than 4.5.3. 4.5.3 was included in TWCs manufactured around March 2018 and later.
- FC B1 SS SS RR RR
- Tell TWCID RR RR to start charging. SS SS is the fake master TWCID.
- FC B2 SS SS RR RR
- Tell TWCID RR RR to stop charging. SS SS is the fake master TWCID.
- Stop charge command is seriously bugged in that it will cause a plugged-in Tesla to show a red ring around its charge port as soon as you send the command. Car will refuse to charge again until you send start charge command and then physically re-plug the car.
- If you set DIP switch 2 in the TWC to the down position, it turns off CAN communication to the car and start/stop charge actually work correctly except if you stop and start charging more than once, the car will randomly decide the charger is bad and refuse to charge again until you re-plug the car. The car may also decide to limit itself to 30A charging and that change is permanent unless you raise amps using the car UI.
- Basically I'm saying stop/start charge commands are useless for most purposes as they are implemented in firmware 4.5.3.
- The reason cars respond badly seems to be that stop/start simply turn the relays in the TWC off or on but do not send any CAN message to the car telling it to stop or start (I reached those conclusions by looking at the firmware). My 2014 Model S responds to this by trying to use CAN to start the charger again (car ring flickers blue to show CAN communication) and after a bit it enters perma-error state unless DIP 2 is down which disables all CAN communication. Conceivably, Model 3 or X don't respond badly which is how this escaped quality control? If anyone has a 3 or X or a newer S, please test and let me know.
- FB B4
- Get plug state. All TWCs on network return FD B4 RR RR XX where RR RR is the TWCID reporting its plug state and XX is 00 when TWC is unplugged, 01 when charging, 03 when plugged in but not charging for any reason (including error). Rarely, 02 is returned but I've seen no pattern to why - I suspect it means the TWC is booting or currently updating the plug state.
- FB EE SS SS RR RR
- Tell TWCID RR RR to return first 7 characters of VIN of connected car. SS SS is the fake master TWCID. Response message is FD EE RR RR VV VV VV VV VV VV VV where VV is an ascii character code representing a letter or number. VV will be all zero when car CAN communication is disabled (DIP switch 2 down) or when a non-Tesla vehicle is plugged in using something like a JDapter.
- FB EF SS SS RR RR
- Tell TWCID RR RR to return the middle 7 characters of VIN of connected car.
- FB F1 SS SS RR RR
- Tell TWCID RR RR to return the last 7 characters of VIN of connected car. US cars only have 3 characters to return with this message but maybe some in other countries have more?
@CDragon
Not sure whether you saw this or not, but Tesla has released the HPWC control spec, at least to Maxem (according to
this article). Have you tried reaching out to Tesla to see if you can get a copy too?
People I know have reached out and they only share that info with large corporate users like Maxem. However, thanks to firmware decoding, I'm 99% sure I know all the commands in the latest TWC RS485 control set (1% unsureness comes from the extraordinarily unlikely possibility that they hid additional commands using some form of obfuscation).