Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Enphase Local Green Data #25

Open
wants to merge 889 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
889 commits
Select commit Hold shift + click to select a range
2836242
Merge branch 'v1.2.0-addingSupportForSolarLogEMS' into v1.2.0pmdev
dschuesae Aug 11, 2020
c01f1c8
Using array instead of splitting string :-o
dschuesae Aug 11, 2020
9e09666
Adding some comments of 0 consumption
dschuesae Aug 11, 2020
dd1f89c
Merge branch 'v1.2.0-addingSupportForSolarLogEMS' into v1.2.0pm
dschuesae Aug 11, 2020
f019d37
Merge branch 'v1.2.0-fixingBugInSolarEdgeEMSReturningAlwaysSameValues…
dschuesae Aug 11, 2020
3a53399
Merge branch 'v1.2.0pm' into v1.2.0pmdev
dschuesae Aug 11, 2020
8d643b7
Merge pull request #145 from dschuesae/v1.2.0-fixingBugInSolarEdgeEMS…
MikeBishop Aug 11, 2020
e49fc29
Merge pull request #146 from dschuesae/v1.2.0-addingSupportForSolarLo…
MikeBishop Aug 11, 2020
b320808
adding 'yesterday' definition to TWCMaster.py
JinbaIttai Aug 14, 2020
7d700bb
Always Honour minAmpsPerTWC
JinbaIttai Aug 14, 2020
f8559f8
Merge pull request #148 from JinbaIttai/honour_minAmpsPerTWC_always
MikeBishop Aug 14, 2020
ce8d56a
Adjust log level
MikeBishop Aug 14, 2020
de3258b
Merge pull request #147 from JinbaIttai/yesterday_not_defined
MikeBishop Aug 14, 2020
b95d99a
Fixed comma-mistake which prevented MQTTStatus.py from working.
Frajul Aug 17, 2020
4819fae
Added OpenHab EMS Module
Frajul Aug 17, 2020
c54b25f
Merge pull request #149 from Frajul/v1.2.0
MikeBishop Aug 17, 2020
7053115
Merge remote-tracking branch 'remotes/ngardiner/v1.2.0' into v1.2.0pmdev
dschuesae Aug 18, 2020
6bc3402
Merge remote-tracking branch 'remotes/ngardiner/v1.2.0' into v1.2.0pm
dschuesae Aug 18, 2020
65c3497
Returning realPowerFactorMaxAmps
dschuesae Aug 19, 2020
1ac5a1d
Merge branch 'v1.2.0-betterCalculationOfChargeLoadAndTrackGreenEnergy…
dschuesae Aug 19, 2020
3ebb4c3
Use FlexAmps to start charge
dschuesae Aug 21, 2020
54a3c37
Use FlexAmps to start charge
dschuesae Aug 21, 2020
8ed0ef0
Update lib/TWCManager/TWCSlave.py
dschuesae Aug 25, 2020
bdcc9bd
Better readability of logging
dschuesae Aug 25, 2020
de2dd47
Removed a line
dschuesae Aug 25, 2020
ffd6001
Merge pull request #150 from dschuesae/v1.2.0-useFlexAmpsToStartCharg…
MikeBishop Aug 25, 2020
c795816
Added comment.
Frajul Aug 26, 2020
0f1281c
Fix configConfig
MikeBishop Aug 27, 2020
917fae3
Merge branch 'v1.2.0' into v1.2.0pm
dschuesae Aug 28, 2020
68e48ac
Merge branch 'v1.2.0pm' into v1.2.0pmdev
dschuesae Aug 28, 2020
0ee035c
Don't stop quickly means exactly that
MikeBishop Aug 27, 2020
e7eb3ca
Don't spike when increasing from zero to the value already offered
MikeBishop Sep 4, 2020
44fd3cb
Merge pull request #152 from ngardiner/no_spike_from_zero
MikeBishop Sep 9, 2020
d8b2606
Merge pull request #151 from ngardiner/dont_stop_quickly
MikeBishop Sep 9, 2020
914ce85
Added EMS_OpenHab to documentation.
Frajul Sep 10, 2020
fade924
Added example to config file.
Frajul Sep 10, 2020
72feb2b
Now using TWCMaster.debugLog.
Frajul Sep 11, 2020
6c9f93c
Catching invalid item values.
Frajul Sep 11, 2020
60327c2
Small changes in documentation.
Frajul Sep 11, 2020
9bc7d9f
Update docs/modules/EMS_OpenHab.md
Frajul Sep 13, 2020
0f0f914
Update README.md
Frajul Sep 13, 2020
a34fb1e
Merge pull request #153 from Frajul/openHabIntegration
MikeBishop Sep 14, 2020
07824e5
Add consumption to SolarEdge EMS module
ngardiner Sep 25, 2020
e690167
Added detection of SolarEdge consumption unit
ngardiner Sep 26, 2020
d80ed33
Move HASS EMS module to new debugLog function
ngardiner Sep 26, 2020
d53ec3d
Add debugMode engine for SolarEdge, so we can gather greater visibili…
ngardiner Sep 27, 2020
ea4fbc3
Merge remote-tracking branch 'remotes/ngardiner/v1.2.0' into v1.2.0pm
dschuesae Oct 4, 2020
0d82d46
Merge branch 'v1.2.0pm' into v1.2.0pmdev
dschuesae Oct 4, 2020
0abe49c
Adding some vehicle data to HTTPControl output
dschuesae Oct 4, 2020
38400de
Adding some vehicle data to HTTPControl output
dschuesae Oct 4, 2020
78a5b34
Adding some vehicle data to HTTPControl output
dschuesae Oct 4, 2020
2e4e657
Merge remote-tracking branch 'remotes/origin/v1.2.0pmdev' into v1.2.0pm
dschuesae Oct 4, 2020
d27eb39
Adding Flex Charging Start to let your car start at the end of the sc…
dschuesae Oct 5, 2020
7efa32c
Blacked it
dschuesae Oct 8, 2020
4904c5b
Merge branch 'v1.2.0-addingVehicleDataToHttpcontrol' into v1.2.0pm
dschuesae Oct 8, 2020
ff443e2
Black again
dschuesae Oct 8, 2020
299fdb7
Blacked
dschuesae Oct 8, 2020
4c9b8d4
Merge branch 'v1.2.0pm' into v1.2.0pmdev
dschuesae Oct 8, 2020
c69732b
Taking battery size from option codes
dschuesae Oct 8, 2020
dd41987
Removing data and other json formatting
dschuesae Oct 8, 2020
cfcf92e
Adding option codes
dschuesae Oct 8, 2020
7e81763
Some strange things with option codes
dschuesae Oct 8, 2020
4782626
Remove calculation with time returned
dschuesae Oct 8, 2020
95deb60
Merge pull request #155 from dschuesae/v1.2.0-addingVehicleDataToHttp…
MikeBishop Oct 8, 2020
9dacbb5
Improved SolarEdge handling (auto-poll mode detection)
ngardiner Oct 9, 2020
10f8f0e
Merge branch 'v1.2.0' of https://github.com/ngardiner/TWCManager into…
ngardiner Oct 9, 2020
72abae0
Fix log message
ngardiner Oct 9, 2020
69b7aaa
Merge pull request #154 from ngardiner/hassems_debuglog_cleanup
ngardiner Oct 9, 2020
ec526f7
Bump version number
ngardiner Oct 9, 2020
2582860
Add Enphase EMS module
ngardiner Oct 9, 2020
dcc7ca9
Bump changelog for v1.2.0
ngardiner Oct 9, 2020
373c408
Updated v1.2.0 changelog
ngardiner Oct 9, 2020
080abe3
Changing api data
dschuesae Oct 10, 2020
a196f7b
Another change to add battery flex size
dschuesae Oct 10, 2020
6ee3579
Merge remote-tracking branch 'remotes/ngardiner/v1.2.0' into v1.2.0pmdev
dschuesae Oct 10, 2020
f64c8bc
Merge remote-tracking branch 'remotes/ngardiner/v1.2.1' into v1.2.1pmdev
dschuesae Oct 10, 2020
011da74
Adding some documentation
dschuesae Oct 10, 2020
4ab5145
Merge branch 'v1.2.0pmdev' into v1.2.1pmdev
dschuesae Oct 10, 2020
4569e02
Removing option codes again
dschuesae Oct 10, 2020
d0a8f1d
Adding all amps from 6A to 32A for europe
dschuesae Oct 10, 2020
b7a9b4d
Better amps for 3 phases
dschuesae Jun 30, 2020
1a7831a
Adding all amps from 6A to 32A for europe
dschuesae Oct 10, 2020
59484a3
Merge pull request #158 from dschuesae/v1.2.1-addingFlexAmpsAtLeastFo…
ngardiner Oct 11, 2020
0315545
Adding SolarLog improvements for inverters - if it's not active somet…
dschuesae Oct 11, 2020
7be10bc
Added some documentation
dschuesae Oct 11, 2020
476a83a
Commenting out realPower Factors
dschuesae Oct 11, 2020
7a11309
Removing real battery size factor - try to load full size
dschuesae Oct 12, 2020
3e143e6
Who put the finger on the keyboard...
dschuesae Oct 12, 2020
f80b485
Fix issue with Track Green Energy start time setting in legacy web UI…
ngardiner Oct 13, 2020
81533f8
Always starting a quarter of a hour earlier
dschuesae Oct 14, 2020
203140a
Merge remote-tracking branch 'remotes/ngardiner/v1.2.1' into v1.2.1pmdev
dschuesae Oct 14, 2020
b2830d0
Adding some logging
dschuesae Oct 18, 2020
1cc85ce
Adding addtional loggin and switch to new logging
dschuesae Oct 18, 2020
04d1739
Spelling error in comment
dschuesae Oct 18, 2020
8377d63
Supporting https for HASS
dschuesae Oct 27, 2020
b5304bb
Some small white space
dschuesae Oct 27, 2020
c6b4d35
Merge pull request #160 from dschuesae/v1.2.1-updateSolarLogByOnlySub…
MikeBishop Oct 27, 2020
42d489e
Merge pull request #164 from dschuesae/v1.2.1-useHttps_for_HASS
MikeBishop Oct 27, 2020
8e7c395
Adding some comments to the description
dschuesae Oct 28, 2020
35c7a3f
Another comment for clarification
dschuesae Oct 28, 2020
89794db
Conditionally display Flex Starting Time
dschuesae Oct 28, 2020
4bf1265
Improved documentation for flex start
dschuesae Oct 28, 2020
0bafef8
Select webhook method
MikeBishop Oct 28, 2020
a5b56c6
Merge pull request #159 from dschuesae/v1.2.1pmdev
MikeBishop Oct 29, 2020
225ba02
move favicon to <head> and adjust link, making it working again
Nov 1, 2020
3429e76
*corrected* move favicon to <head> and adjust link, making it working…
Nov 2, 2020
a9308a6
Merge pull request #167 from hopfi2k/v1.2.1
ngardiner Nov 2, 2020
eed14e9
Bump changelog
ngardiner Nov 2, 2020
9698086
include TWCManager version to use most up to date move favicon
Nov 2, 2020
0b78804
EMS module for Kostal Inverters (Pico and Plenticore), including doc …
Nov 2, 2020
e28e006
After start waking up car add a sleep of 10 seconds
dschuesae Nov 2, 2020
ce879d9
Improved formatting of level
dschuesae Oct 30, 2020
79b0f9c
Adding configuration for file logging
dschuesae Nov 2, 2020
ca45d8c
Improve logging of doesConditionMatch
dschuesae Nov 2, 2020
7c7a6ec
update necessary for EMS Kostal to be working
Nov 2, 2020
0053c73
Moves debugLog to be processed by individual Logging modules
ngardiner Nov 3, 2020
714f49f
Merge pull request #168 from hopfi2k/v1.2.1
ngardiner Nov 3, 2020
04bf952
Bump Changelog
ngardiner Nov 3, 2020
0278763
Replace formatted strings with helper function for backward compatibi…
ngardiner Nov 3, 2020
8d71ec1
enable serving static files from ./lib/TWCManager/Control/static/ dir…
Nov 3, 2020
98b2a0c
Changed sleep to 5 seconds
dschuesae Nov 3, 2020
20f00c5
Merge remote-tracking branch 'remotes/ngardiner/v1.2.1' into v1.2.1-A…
dschuesae Nov 3, 2020
576d22d
Move file logging to a module
dschuesae Nov 3, 2020
40498c3
additional checking for serving static content
Nov 3, 2020
4215d6c
dummy stylesheet file for future use
Nov 3, 2020
5b9b728
Merge pull request #170 from ngardiner/webhook_get
MikeBishop Nov 4, 2020
3217015
Adding some documentation for file logging
dschuesae Nov 5, 2020
fce49be
Some small changes (undos, spelling)
dschuesae Nov 5, 2020
56df5e3
Merge pull request #173 from hopfi2k/v1.2.1
ngardiner Nov 8, 2020
bb16df2
Merge branch 'v1.2.1' into v1.2.1-AddLoggingToFile
ngardiner Nov 8, 2020
c3b10d4
Merge pull request #172 from dschuesae/v1.2.1-AddLoggingToFile
ngardiner Nov 8, 2020
abc521a
Bump changelog
ngardiner Nov 8, 2020
f9cfa91
Merge pull request #171 from dschuesae/v1.2.1-ShortSleepAfterStartWak…
ngardiner Nov 8, 2020
cbba5b4
Bump changelog
ngardiner Nov 8, 2020
a23a230
removed unecessary function do_css() since we are supporting the incl…
Nov 8, 2020
77c44f6
remove do_css() function, as we can include static files now
Nov 8, 2020
fc62aea
WIP html page generation and layout
Nov 8, 2020
e46648d
Implement delayed background tasks
MikeBishop Nov 14, 2020
8e4d6e9
Use delayed tasks for checkDeparture
MikeBishop Nov 14, 2020
549b70c
Move saveSettings to a background task
MikeBishop Nov 14, 2020
1853845
Decompose tuple
MikeBishop Nov 14, 2020
d4911b1
Merge pull request #176 from ngardiner/save_in_background
ngardiner Nov 15, 2020
ba13a6c
Charge updates always belong on the background thread
MikeBishop Nov 16, 2020
f1dd1de
Adjust raw values for Powerwall SoC
MikeBishop Nov 20, 2020
fcec14b
Merge pull request #177 from ngardiner/checkCharge_to_background
MikeBishop Nov 20, 2020
2150074
Lean on background queue
MikeBishop Nov 20, 2020
e006151
Abort on old Python versions
MikeBishop Nov 20, 2020
571b4c3
Merge pull request #179 from ngardiner/snap_with_queue
MikeBishop Nov 25, 2020
3694d77
Merge pull request #178 from ngardiner/pw_adjust_percentage
MikeBishop Nov 25, 2020
98fd6f2
Merge pull request #175 from ngardiner/task_delay
MikeBishop Nov 25, 2020
73eab72
Missed a power factor conversion
MikeBishop Nov 25, 2020
8b987b9
Update enphase module for Local API access
ngardiner Dec 3, 2020
5e874f8
Bugfix: Fix call to debugLog after moving from TWCSlave to TWCMaster
ngardiner Dec 3, 2020
f79b78d
Merge pull request #174 from hopfi2k/v1.2.1
ngardiner Dec 3, 2020
15519e1
Fix references to URL path
ngardiner Dec 3, 2020
ce957a6
Bugfix for Enphase EMS module - int to string for port
ngardiner Dec 3, 2020
9ec33c6
Merge pull request #180 from ngardiner/pf_in_history
MikeBishop Dec 7, 2020
f370083
Move grace period
MikeBishop Dec 7, 2020
16e204e
Fix Enphase EMS module which reported generation value as consumption
ngardiner Dec 8, 2020
d8ec69f
Adds jinja2 templating of presentation for HTTP Control module which …
ngardiner Dec 13, 2020
a89f896
Move more of the main page presentation out to theme templates, and i…
ngardiner Dec 13, 2020
f8ba9a0
Backward-compatible charge scheduling interface
ngardiner Dec 13, 2020
441a9a9
Fix for Charge Scheduling checkboxes not deselecting
ngardiner Dec 13, 2020
751ce27
Fix for exception if bytes object is passed to unescape_msg
ngardiner Dec 21, 2020
d4f5fff
Updated Fronius EMS module to use System context API endpoint rather …
ngardiner Jan 7, 2021
2d11155
Disable Web IPC control module by default
ngardiner Jan 7, 2021
d602e81
Addition of new SmartMe EMS module, Enphase documentation and stabili…
ngardiner Jan 7, 2021
0842395
Updated the sample documentation to show an example of the module bei…
ngardiner Jan 7, 2021
47d9d3d
Bump changelog
ngardiner Jan 7, 2021
54ca417
Update version in doc
mattiasclaesson Jan 7, 2021
9929ece
Merge pull request #183 from ngardiner/expanded_grace
MikeBishop Jan 8, 2021
52872dc
Rework policy table
MikeBishop Jan 8, 2021
dadb99c
Collapse to map
MikeBishop Jan 8, 2021
e86cb3a
Handle fully-custom policies, too
MikeBishop Jan 8, 2021
525dad7
Merge pull request #196 from ngardiner/policy_table
ngardiner Jan 9, 2021
56ab3a7
Remove main page javascript reference from other templates
ngardiner Jan 9, 2021
64d0b68
Merge pull request #193 from mattiasclaesson/patch-1
ngardiner Jan 10, 2021
ca4bccd
Code refactoring, removal of f-Formatter to reestablish compatibility…
Jan 11, 2021
59a7597
Powerwall reserve vs. Backup
MikeBishop Jan 11, 2021
4ba7160
Tweak downward
MikeBishop Jan 14, 2021
c1a4ae4
Update ConsoleLogging.py
mikey4321 Jan 16, 2021
7f75a64
Support all time properties
MikeBishop Jan 16, 2021
80791e9
Merge pull request #202 from ngardiner/tm_star
MikeBishop Jan 17, 2021
d9e0968
Fix bug with empty settings
tjikkun Jan 19, 2021
adf0cb1
Merge pull request #204 from tjikkun/empty_settings
ngardiner Jan 19, 2021
045c152
Fix saving settings when no settings are present
tjikkun Jan 21, 2021
a2c94aa
Fix dummy module
tjikkun Jan 18, 2021
071d56c
Merge pull request #208 from tjikkun/dummy
ngardiner Jan 21, 2021
686b8a0
Merge pull request #207 from tjikkun/empty_settings
ngardiner Jan 21, 2021
ad73a6a
Bump changelog
ngardiner Jan 21, 2021
2ade57a
Merge pull request #200 from mikey4321/mikey4321-patch-logging-for-su…
ngardiner Jan 21, 2021
107d5d2
Merge pull request #197 from hopfi2k/v1.2.1
ngardiner Jan 21, 2021
3c5d24c
Update to SmartMe EMS module
ngardiner Jan 21, 2021
dfa6109
Add files via upload
ngardiner Jan 21, 2021
7ac3cc2
Bump changelog and screenshot
ngardiner Jan 21, 2021
69903d5
Removed confusing statement from WebUI
ngardiner Jan 24, 2021
216754f
Merge branch 'v1.2.1' of https://github.com/ngardiner/TWCManager into…
ngardiner Jan 24, 2021
8aa6f4b
Limit applications of Max Amps during check_green_energy
MikeBishop Jan 28, 2021
5c62f6b
Make sure 0 doesn't count
MikeBishop Jan 28, 2021
5a7c7f2
Provide the ability to override the stored API bearer/refresh tokens …
ngardiner Jan 30, 2021
93f17cd
Use serial_for_url for opening serial port
tjikkun Jan 30, 2021
d9170a3
Update Tesla API authentication to work with oAuth2 flow (no MFA supp…
ngardiner Feb 2, 2021
3ee4dfb
Remove spoofed UA headers from requests (not needed), standardise var…
ngardiner Feb 3, 2021
872cf7e
Black on TeslaAPI.py
MikeBishop Feb 3, 2021
c26fe15
Added auto detection of byte order (Little-/Big Endian), code refacto…
Feb 4, 2021
1cecea8
Merge pull request #221 from hopfi2k/v1.2.1
ngardiner Feb 4, 2021
b02db21
Merge pull request #214 from tjikkun/serial_for_url
ngardiner Feb 4, 2021
d8a98f8
Minor bugfix
ngardiner Feb 4, 2021
2f5c80b
WIP - modern UI for TWCManager
Feb 4, 2021
0b7b709
Merge pull request #198 from ngardiner/backup_reserve
MikeBishop Feb 4, 2021
82bf54b
Merge pull request #223 from hopfi2k/v1.2.1
ngardiner Feb 4, 2021
547b81a
Bug fix, 'now' wasn't declared in line 243, small code tweaking, PEP8…
Feb 7, 2021
36cc27b
Update README.md
mikey4321 Feb 9, 2021
01bf040
Update README.md
mikey4321 Feb 10, 2021
cd2a87d
New EMS module Efergy, it allows to take the consumption
juanjoqg Feb 12, 2021
953fac1
Merge pull request #230 from juanjoqg/new_efergy_ems
ngardiner Feb 12, 2021
decc4fc
Merge pull request #227 from mikey4321/patch-1
ngardiner Feb 12, 2021
878544a
Removed path dependent detail in README.md, and bump CHANGELOG
ngardiner Feb 12, 2021
3514c10
New menu Graphs, it allows to represent energy graphs base on the SQL…
juanjoqg Feb 17, 2021
32f6d41
Change step on the graphs from seconds to minutes
juanjoqg Feb 18, 2021
56a0f63
Merge pull request #226 from hopfi2k/v1.2.1
ngardiner Feb 18, 2021
a9ffd49
High-pri log if Powerwall auth needed
MikeBishop Feb 20, 2021
bea8c9f
Config update, too
MikeBishop Feb 20, 2021
2cfc520
Kostal: Unload if not enabled
MikeBishop Feb 20, 2021
52b7cdb
Run black
MikeBishop Feb 20, 2021
24ad281
Merge pull request #239 from ngardiner/kostal_quietblack
ngardiner Feb 20, 2021
f5ac21a
Merge pull request #238 from ngardiner/powerwall_auth
MikeBishop Feb 22, 2021
2bd3870
Update reinserted tasks
MikeBishop Feb 24, 2021
d970001
Merge pull request #233 from juanjoqg/energy_graphs
ngardiner Feb 27, 2021
dd6ed7c
Changed javascript refs to https to avoid mixed content errors for ht…
ngardiner Feb 27, 2021
5812e93
Bugfixes: Convert datetime to str for JSON serialization, added handl…
ngardiner Feb 27, 2021
3487e36
Merge pull request #212 from ngardiner/cge_limit_sma
ngardiner Feb 27, 2021
b6095eb
Bump changelog
ngardiner Feb 27, 2021
292228e
Blacken everything
tjikkun Feb 8, 2021
216a71a
[WIP] Use Python logging module for logging
tjikkun Jan 30, 2021
c903b46
[WIP] Use Python logging module for logging (CSV module should be wor…
tjikkun Feb 13, 2021
34870c7
fixes
tjikkun Feb 16, 2021
e6c9a11
Add Sentry logging module
tjikkun Feb 16, 2021
b80854c
Fixes
tjikkun Mar 3, 2021
218154e
Fixes
tjikkun Mar 5, 2021
5640671
Fix SQLite logging
tjikkun Mar 6, 2021
ff4793e
Mysql support for python logging
tjikkun Mar 7, 2021
34479a0
Update README.md
jherby2k Mar 12, 2021
b35b343
Fix for newer pymysql
tjikkun Mar 22, 2021
14e8037
Merge pull request #252 from tjikkun/mysql_new
ngardiner Apr 4, 2021
8538ef6
Merge pull request #242 from ngardiner/bg_task_update
ngardiner Apr 4, 2021
bd7ca48
Merge pull request #224 from tjikkun/logging
ngardiner Apr 4, 2021
e4bd555
Merge pull request #248 from jherby2k/v1.2.1
ngardiner Apr 4, 2021
f34c6b9
Bump changelog
ngardiner Apr 4, 2021
180fc99
Fix for logging migration
ngardiner Apr 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__pycache__
build/
config.json
.vscode/
dist/
TWCManager.egg-info/
200 changes: 200 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
DEPS := lighttpd screen git
SUDO := sudo
VER := $(shell lsb_release -sr)

install:

$(SUDO) apt-get update

ifeq ($(VER), 9.11)
$(SUDO) apt-get install -y $(DEPS) php7.0-cgi
else ifeq ($(VER), stretch)
$(SUDO) apt-get install -y $(DEPS) php7.0-cgi
else ifeq ($(VER), 16.04)
$(SUDO) apt-get install -y $(DEPS) php7.0-cgi
else ifeq ($(VER), 16.10)
$(SUDO) apt-get install -y $(DEPS) php7.0-cgi
else
$(SUDO) apt-get install -y $(DEPS) php7.3-cgi
endif
$(SUDO) lighty-enable-mod fastcgi-php ; exit 0
$(SUDO) service lighttpd force-reload

$(SUDO) cp html/* /var/www/html/
$(SUDO) chown -R www-data:www-data /var/www/html
$(SUDO) chmod -R 755 /var/www/html
$(SUDO) usermod -a -G www-data pi

# Install TWCManager packages
$(SUDO) ./setup.py install

# Create configuration directory
$(SUDO) mkdir -p /etc/twcmanager
ifeq (,$(wildcard /etc/twcmanager/config.json))
$(SUDO) cp etc/twcmanager/config.json /etc/twcmanager/
endif
$(SUDO) chown root:pi /etc/twcmanager -R
$(SUDO) chmod 775 /etc/twcmanager
110 changes: 107 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,110 @@
# TWCManager
TWCManager lets you control the amount of power delivered by a Tesla Wall Connector (TWC) to the car it's charging. This can save around 6kWh per month when used to track a local green energy source like solar panels on your roof. It can also avoid drawing grid energy for those without net metering or limit charging to times of day when prices are cheapest.

Due to hardware limitations, TWCManager will not work with Tesla's older High Power Wall Connectors (HPWCs) that were discontinued around April 2016.
[![Stable Release](https://img.shields.io/badge/Stable_Release-1.2.0-blue)](https://github.com/ngardiner/TWCManager/releases/tag/1.2.0)
[![Development Release](https://img.shields.io/badge/Devel_Release-1.2.1-green.svg)](https://github.com/ngardiner/TWCManager/tree/v1.2.1)
![GitHub commits](https://img.shields.io/github/commit-activity/m/ngardiner/TWCManager)
![Contributors](https://img.shields.io/github/contributors/ngardiner/TWCManager)

See **TWCManager Installation.pdf** for how to install and use.
## Screenshots
![Screenshot](docs/screenshot.png)
![Screenshot](docs/screenshot3.png)

## How it works

* In order to allow multiple Tesla Wall Connector (TWC) units to operate on a single power circuit, Tesla provides a Load-Sharing protocol to interconnect the Tesla Wall Connector units together, and to direct those units to charge at a specific rate based on the number of cars charging simtultaneously.
* This script (TWCManager) pretends to be a Tesla Wall Charger (TWC) set to master mode.
* When wired to the IN or OUT pins of real TWC units set to slave mode (rotary switch position F), TWCManager can tell them to limit car charging to any whole amp value between 5A and the max rating of the charger. Charging can also be stopped so the car goes to sleep.
* This level of control is useful for having TWCManager track the real-time availability of green energy sources and direct the slave TWCs to use near the exact amount of energy available. This saves energy compared to sending the green energy off to a battery for later car charging or off to the grid where some of it is lost in transmission (and costs are greater than charging off generated solar).
* TWCManager provides built-in interfaces to several different Green Energy interfaces, to allow this tracking. Please see the table below.

## Interfaces

To enable TWCManager to gather the solar generation information that it requires to adjust the charging rate, we provide Interfaces to allow information to be retrieved (EMS Interfaces) and Interfaces to allow us to provide information to external systems to inform them of current charging output and number of cars currently charging.

### Control Interfaces

| Platform | Status | Details |
| ---------------- | ---------------- | ----------------------- |
| [HTTPControl](docs/modules/Control_HTTP.md) | Available v1.1.3 | Allows control via embedded HTTP server (with RESTful API interface) |
| [MQTTControl](docs/modules/Control_MQTT.md) | Available v1.1.2 | Allows control via MQTT |
| [WebIPCControl](docs/modules/Control_WebIPC.md) | Available v1.1.4 | Allows control via PHP scripts (sysv IPC) |

### EMS Interfaces

EMS Interfaces read solar generation and/or consumption values from an external system. Current EMS interfaces are:

| Platform | Status | Details |
| ---------------- | ------------- | ----------------------- |
| Dutch SmartMeter | In Development | Supports DSMR Serial Protocol |
| [Enphase](docs/modules/EMS_Enphase.md) | Available v1.2.1 | Supports Enphase Enlighten API |
| [Fronius Inverter](docs/modules/EMS_Fronius.md) | Available v1.1.0 | Supports Fronius Inverter API |
| [HomeAssistant](docs/modules/EMS_HASS.md) | Available v1.0.1 | Supports HomeAssistant sensors |
| [Kostal (Pico/Plenticore)](docs/modules/EMS_Kostal.md) | Available v1.2.1 | Support for Kostal Inverters via ModBus |
| [SmartMe](docs/modules/EMS_SmartMe.md) | Available v1.2.1 | Support for smart-me.com API |
| [SolarEdge](docs/modules/EMS_SolarEdge.md) | Available v1.2.0 | Support for SolarEdge API |
| [SolarLog](docs/modules/EMS_SolarLog.md) | Available v1.2.0 | Supports SolarLog Base API |
| [Tesla Powerwall2](docs/modules/EMS_Powerwall2.md) | Available v1.1.3 | Support for Tesla Powerwall 2 |
| [The Energy Detective](docs/modules/EMS_TED.md) | Available v1.1.2 | Support for TED (The Energy Detective) |
| [openHAB](docs/modules/EMS_OpenHab.md) | Available v1.2.0 | Supports openHAB items |

### Logging Interfaces

Logging interfaces allow recording of statistics and values such as Green Energy data, Slave TWC status and Voltage and Amperage data to various interfaces.

This can be useful if you would like to track charger activity and use it for graphing or statistics purposes.

| Module | Details |
| ----------- | -------- |
| [Console](docs/modules/Logging_Console.md) | Print output to console |
| [CSV](docs/modules/Logging_CSV.md) | Log data to CSV files |
| [Files](docs/modules/Logging_Files.md) | Log data to a log files |
| [MySQL](docs/modules/Logging_MySQL.md) | Log data to a MySQL Database |
| [SQLite](docs/modules/Logging_SQLite.md) | Log data to a SQLite Database |

### Status Interfaces

Status interfaces publish TWCManager status information to external systems. Current Status interfaces are:

| Platform | Status | Details |
| ---------------- | ---------------- | ----------------------- |
| [HomeAssistant](docs/modules/Status_HASS.md) | Available v1.0.1 | Provides HASS sensors to monitor TWCManager State |
| [MQTT](docs/modules/Status_MQTT.md) | Available v1.0.1 | Publishes MQTT topics to monitor TWCManager State |

### Vehicle Interfaces

| Platform | Status | Details |
| ----------- | ---------------- | ----------------------- |
| TeslaAPI | Available v1.0.0 | Allows start/stop charging via Tesla API |

## Warnings

It is important to read and understand the following warnings before using this tool:

* Misuse of the protocol described in this software can direct a Tesla Wall Charger to supply more current to a car than the charger wiring was designed for.
* This will trip a circuit breaker or may start a fire in the unlikely event that the circuit breaker fails.
* This software was not written or designed with the benefit of information from Tesla and there is always a small possibility that some unforeseen aspect of its operation could damage a Tesla vehicle or a Tesla Wall Charger.
* All efforts have been made to avoid such damage and this software is in active use on the author's own vehicle and TWC.
* In short, USE THIS SOFTWARE AT YOUR OWN RISK.

## Features
* Can be set up to only allow charging during certain hours.
* Lets you control the amount of power delivered by a Tesla Wall Connector (TWC) to the car it is charging.
This can save around 6kWh per month when used to track a local green energy source like solar panels on your roof. It can also avoid drawing grid energy for those without net metering or limit charging to times of day when prices are cheapest.
* Whilst the TWCManager application cannot read the charge state of connected vehicles, using the Tesla API we can pull the charge status of a vehicle.
* Integrates with Status modules to report TWC sensor data to external syustems for display or use in automations.

## Limitations
* Due to hardware limitations, TWCManager will not work with Tesla's older High Power Wall Connectors (HPWCs) that were discontinued around April 2016.
* We do not currently have enough information about the new 2020 Tesla Wall Connector devices with WiFi to understand if they will be compatible in any way (wired or wireless) with TWCManager.
* There is currently no way to configure how TWCManager deals with more than one interface platform. Currently, TWCManager will add together the values (generation and consumption) for all configured integrations.

## Installation

All installation documentation (Physical and Software) is contained in the documentation repository [here](docs/README.md)

# Attribution
* Original TWCManager distribution by [cdragon](https://github.com/cdragon/TWCManager)
* The effort by @cdragon cannot be understated, if you would like to read more about the intense hardware hacking that was done to make this project a reality, read this [thread](https://teslamotorsclub.com/tmc/threads/new-wall-connector-load-sharing-protocol.72830).
* Integrated improvements from [flodom's](https://github.com/flodorn/TWCManager) TWCManager fork.
* Support for multiple vehicles on multiple chargers
* Support for publishing status to MQTT topics
Loading