ngardiner / TWCManager

Control power delivered by a Tesla Wall Charger using two wires screwed into its RS-485 terminals.
The Unlicense
130 stars 55 forks source link

External control / Start, Stop, Disable #552

Open ghost opened 8 months ago

ghost commented 8 months ago

Hello. First of all, I'm sorry if this not a kinf of an issue.

I'm new to the project and need some help. I managed to get it running on my Raspberry pi.

Is it possible to externally (by API, MQTT or something) enable or disable charging? For example, I want to ultilize a rfid card reader, that will enable charging at full current, using a simple python script to communicate with the TWCmanager.

Is this possible?

Thank you, very much.

MikeBishop commented 7 months ago

There is an HTTP-based API. If TWCManager is already controlling charging, you can override the offered charge rate with the chargeNow command, giving a current and duration. You can cancel it early with cancelChargeNow.

ghost commented 7 months ago

Hello @MikeBishop

Thank you for your reply. I did some testing with Nissan eLeaf today.

FIrst thing is that "Solar Surplus" is always active, which I do not want. I don't have a solar installation. I searched a bit and found this:

''' "restrictions":{ "Track Green Energy":{ "match":[""], "condition":["false"], "value":[""]

'''

Which was only way, hotwto get the "Do Not Charge" button lit.

Second thing. Even if setting the TWC to "Do not Charge", the car started charging after plugin it in.

I would like to block any kind of charging, unless I tell the charger to do so.

Here are my settings and config,

settings.json config.json

Thank you.

ghost commented 7 months ago

@MikeBishop Would you know, how to prevent the TWC from charging after connecting the the car? I mean to be able to charge car only by pressing charge now from the ui, or via api.

I thought about using the offset, but I'm not sure about that?