Skip to content

Commit

Permalink
Set default maxAmpsAllowedFromGrid to 16A
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieB2B committed May 21, 2023
1 parent 9844f53 commit 9fad98b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion etc/twcmanager/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# "charge_amps": "settings.scheduledAmpsMax",
# "charge_limit": "config.scheduledLimit"},

"maxAmpsAllowedFromGrid": 15,
"maxAmpsAllowedFromGrid": 16,


# https://teslamotorsclub.com/tmc/threads/model-s-gen2-charger-efficiency-testing.78740/#post-1844789
Expand Down
4 changes: 2 additions & 2 deletions lib/TWCManager/TWCMaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def getMaxAmpsToDivideFromGrid(self):
consumptionA = self.convertWattsToAmps(consumptionW - generationW)

# Calculate what we should max offer to align with max grid energy
maxAmpsAllowedFromGrid = self.config["config"]["maxAmpsAllowedFromGrid"]
maxAmpsAllowedFromGrid = self.config["config"].get("maxAmpsAllowedFromGrid", 16)
amps = maxAmpsAllowedFromGrid - consumptionA + currentOffer
if consumptionA > maxAmpsAllowedFromGrid:
logger.info(f"getMaxAmpsToDivideFromGrid limited power: consumption {consumptionA:.1f}A > {maxAmpsAllowedFromGrid}A")
Expand Down Expand Up @@ -1343,7 +1343,7 @@ def setMaxAmpsToDivideAmongSlaves(self, amps):
if amps > self.config["config"]["wiringMaxAmpsAllTWCs"]:
# Never tell the slaves to draw more amps than the physical charger
# wiring can handle.
logger.info(
logger.error(
"ERROR: specified maxAmpsToDivideAmongSlaves "
+ str(amps)
+ " > wiringMaxAmpsAllTWCs "
Expand Down

0 comments on commit 9fad98b

Please sign in to comment.