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

[growatt] Binding for Growatt solar inverters #15120

Merged
merged 153 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
93d17d1
[growatt] initial contribution
andrewfg Jun 14, 2023
f0eceed
[growatt] beta
andrewfg Jun 16, 2023
9a5688d
[growatt] fix doc typos
andrewfg Jun 16, 2023
4d472b5
[growatt] fix logger prefixes
andrewfg Jun 16, 2023
aa49c9d
[growatt] normalise channels
andrewfg Jun 19, 2023
f9440e4
[growatt] typo
andrewfg Jun 19, 2023
ce5b1e8
[growatt] fix channel names
andrewfg Jun 19, 2023
8f6e8eb
[growatt] xml and properties
andrewfg Jun 19, 2023
8780b0e
[growatt] initialization and discovery
andrewfg Jun 20, 2023
9b0203d
[growatt] fix translation issue
andrewfg Jun 20, 2023
f9e6871
[growatt] tweaks to thing xml
andrewfg Jun 20, 2023
fa41634
[growatt] improve documentation for grott
andrewfg Jun 20, 2023
345d8bc
[growatt] make some channels advanced
andrewfg Jun 21, 2023
aaddb72
[growatt] cleanup discovery & factory; edit .xml .properties files
andrewfg Jun 21, 2023
cda56c4
[growatt] state of charge
andrewfg Jun 21, 2023
f57a671
[growatt] improve readme
andrewfg Jun 22, 2023
a7ad73b
[growatt] tweaks
andrewfg Jun 22, 2023
f8bfa84
[growatt] pom
andrewfg Jun 23, 2023
f88ec53
[growatt] spotless warnings, oh 3.4.x compatibility, grott double esc…
andrewfg Jun 23, 2023
c6d9908
[growatt] adopt core #3707
andrewfg Jul 22, 2023
ffbf26b
[growatt] update pom
andrewfg Aug 16, 2023
04b1f7a
[growatt] improve channel names and DTO mappings
andrewfg Sep 9, 2023
a35cda2
[growatt] fixes after live testing
andrewfg Sep 10, 2023
cf061ec
growatt] fix typos
andrewfg Sep 10, 2023
e80a2b2
[growatt] refactoring; fix channel ids, descriptions
andrewfg Sep 11, 2023
ed13fc0
[growatt] fix read me
andrewfg Sep 11, 2023
0a8f53d
[growatt] improve docu
andrewfg Sep 12, 2023
f34209a
[growatt] tweak channel labels, descriptions
andrewfg Sep 13, 2023
cddeeed
[miio] readme hyperlink fix (#15814)
marcelrv Oct 29, 2023
0b5e395
Register connection in Kaleidescape System log (#15820)
mlobstein Oct 29, 2023
a7ea27f
[sonyaudio] small cleanup (#15823)
lsiepel Oct 29, 2023
91392c0
[GPIO] Update GPIO binding to fix issues and provide new functionalit…
jeremyrumpf Oct 30, 2023
ba53ced
Fix typo in README.md (#15826)
mueller-ma Oct 31, 2023
eb1f162
[tesla] Add channels for software update (#15816)
hakan42 Nov 1, 2023
f3ded85
[sonos] Add TrueHD5.1 and normalize Atmos (#15831)
morph166955 Nov 3, 2023
7fbb63c
Reduce log level for logging of unknown resource types (#15815)
jlaur Nov 3, 2023
a569d3c
Avoids NPE if no station provided by API (#15832)
clinique Nov 3, 2023
6201b17
[networkupstools] Add battery.temperature channel (#15812)
lsiepel Nov 3, 2023
46f7838
[pilight] Fix background discovery in case of multiple network interf…
stefanroellin Nov 3, 2023
821d2fd
Process operations asynchronously (#15801)
jlaur Nov 3, 2023
76e64bb
Adjust handling empty values (#15760)
EvilPingu Nov 3, 2023
020de9f
[androiddebugbridge] Reconnect on max timeouts and improve volume cha…
GiviMAD Nov 3, 2023
b4c1dbf
[keba] Split channel ENABLED to USER and SYSTEM channels (#15531)
maihacke Nov 3, 2023
3f98979
[astro] Update README.md (#15648)
uqs Nov 3, 2023
2d5ce5a
[sonnen] Fix channel types, Energy should be Power (#15384)
lochmueller Nov 3, 2023
19cfbcf
gson fields alias (#15829)
lsiepel Nov 3, 2023
d92d97c
Warning and codeanalysis (#15828)
lsiepel Nov 3, 2023
15b1dec
[knx] Fix typos in code comments (#15839)
holgerfriedrich Nov 3, 2023
b0b3cd2
[Freeboxos] npe when updating inactive Player (#15813)
clinique Nov 4, 2023
c1029f4
null check (#15841)
lsiepel Nov 4, 2023
8ac6d37
[doorbird] Warning and SAT cleanup (#15824)
lsiepel Nov 4, 2023
57c6016
[plugwise] Prevent possible chomp bug (#15339)
lsiepel Nov 4, 2023
70b6d35
Update README.md (#15843)
chmaurer Nov 5, 2023
6cab4f5
[sensorcommunity] State pattern for dB, Percent and Microgram/m3 adde…
weymann Nov 5, 2023
669b7b0
New Crowdin updates (#15842)
openhab-bot Nov 5, 2023
cd2ee57
Remove maintainers (#15849)
jlaur Nov 5, 2023
d882a49
[knx] Fix all compiler warnings (#15840)
holgerfriedrich Nov 6, 2023
01987c3
[irtrans] Remove org.apache.common (#14408)
lsiepel Nov 6, 2023
dd6f43b
[deconz] Support window covering controller (#15856)
J-N-K Nov 6, 2023
3f9b91c
[jrubyscripting] Update to jruby 9.4.5.0 (#15852)
jimtng Nov 6, 2023
10e782f
[solax] Support for three phase inverter X3 Hybrid G4 (#15710)
theater Nov 7, 2023
cfa5e27
Fix build after core changes (#15869)
J-N-K Nov 8, 2023
cd8caeb
[miio] Add a few new vacuum robots and station channels (#15704)
truidix Nov 8, 2023
1707e11
[hue] Support new home security products (#15601)
andrewfg Nov 9, 2023
b12963a
New translations hue.properties (Italian) (#15874)
openhab-bot Nov 9, 2023
f01d24e
Fix control signal circulating pump
jamietownsend Nov 9, 2023
fbc412c
[fineoffsetweatherstation] Fix wrong handling temperature reading for…
Andy2003 Nov 10, 2023
321a3f4
[tasmotaplug] Initial contribution (#15857)
mlobstein Nov 10, 2023
bb60b26
[jdbc] Fix addon id for SQLite (#15877)
jlaur Nov 11, 2023
4193a49
Update README.md (#15019)
hutcheonk Nov 11, 2023
7f14a0a
Implement TimeSeriesProfile (#15873)
jlaur Nov 11, 2023
1a5e456
Persist future prices (#15864)
jlaur Nov 11, 2023
901cf5f
[mqtt] Add Topic Name for Incoming Payload Not Supported (#15872)
billfor Nov 11, 2023
51a7118
Adding unknown event type + bootstrap handling of topology changes (#…
clinique Nov 11, 2023
4560ec9
[Senec] Fix for Senec firmware update (#15535)
querdenker2k Nov 11, 2023
c5945f0
[boschshc] Add scenario channel (#15752)
pat-git023 Nov 11, 2023
6a19cc7
[influxdb] Improve connection handling (#15879)
J-N-K Nov 11, 2023
30004d8
New Crowdin updates (#15881)
openhab-bot Nov 11, 2023
c93a894
Remove Bountysource badge (#15884)
mueller-ma Nov 12, 2023
a29fe5c
New Crowdin updates (#15886)
openhab-bot Nov 12, 2023
c0cc76f
[shelly] Fix resource leak, BLU script installation, TRV init, NPE on…
markus7017 Nov 13, 2023
a3bf1a5
[Bluetooth] re-fix ArrayStoreException (#15891)
lsiepel Nov 13, 2023
7aeb25f
Suppress warning messages (#15129)
mlobstein Nov 14, 2023
45b751a
[twitter] rename binding to X (#15809)
lsiepel Nov 15, 2023
a09a8a1
[netatmo] Enhance errored modules handling (#15866)
clinique Nov 17, 2023
77adc4c
New translations x.properties (Italian) (#15901)
openhab-bot Nov 17, 2023
1c01400
Ignore invalid elapsed/total time values (#15900)
mlobstein Nov 17, 2023
adc171a
[tesla] extend docu on 'softwareupdateversion', this can hold map upd…
hakan42 Nov 17, 2023
90d2d83
[hdpowerview] Improve color channel for Repeater and remove redundant…
jlaur Nov 18, 2023
5dff9d2
Fix color state update (#15908)
jlaur Nov 18, 2023
5e1eec3
[shelly] Fix Gen2 auth, improved security for Gen1 auth, improved dis…
markus7017 Nov 18, 2023
10094fd
[myq] Remove MyQ Binding (#15911)
digitaldan Nov 18, 2023
9fc2938
[homematic] Fix duplication of LONG_REPEATED events for HM devices (#…
maniac103 Nov 18, 2023
822181d
[mqtt.homeassistant] Support color temp on JSON schema lights (#14839)
ccutrer Nov 18, 2023
8f83521
[shelly] BLU Motion, optimize ShellyManager for BLU devices (#15401)
markus7017 Nov 18, 2023
ffa7dc6
[mqtt.homeassistant] handle null component name (#15427)
ccutrer Nov 18, 2023
ec961c5
Fix openhab unit name (#15913)
jlaur Nov 18, 2023
601c06f
[mqtt.homeassistant] fix compilation problems (#15915)
ccutrer Nov 18, 2023
7e7cb4c
[mqtt.homeassistant] Handle empty device name (#15918)
ccutrer Nov 18, 2023
c585de1
[velbus] Review/rewrite documentation (#15537)
nagisa Nov 19, 2023
340fd3c
[openwebnet] Energy: add totalizers channels for energy kWh consumed …
fabgio Nov 19, 2023
f25b0d0
[mqtt.homeassistant] Add support for Button component (#15892)
ccutrer Nov 19, 2023
238a38c
[openwebnet] fix CEN/CEN+ scenario control buttons param descriptions…
mvalla Nov 19, 2023
be994de
[mqtt.homeassistant] implement effect channel for light (#15914)
ccutrer Nov 19, 2023
9f44bfb
[mqtt.homeassistant] Add support for Scene component (#15916)
ccutrer Nov 19, 2023
1e2e1d8
New Crowdin updates (#15931)
openhab-bot Nov 20, 2023
5c8285c
[boschshc] Update active profile of intrusion detection system (#15899)
david-pace Nov 20, 2023
10907e9
Rename price element to price component (#15935)
jlaur Nov 20, 2023
dd8ee21
New Crowdin updates (#15939)
openhab-bot Nov 22, 2023
374a2b1
New translations energidataservice.properties (Italian) (#15947)
openhab-bot Nov 22, 2023
aae908a
Fix Reloink alarms not working after reconnect. (#15943)
Skinah Nov 23, 2023
5665e21
Rename channels net-tariff and transmission-net-tariff (#15938)
jlaur Nov 23, 2023
9f8af20
New translations energidataservice.properties (Danish) (#15948)
openhab-bot Nov 23, 2023
0b86647
[shelly] Misc changes (small fixes, log improvements, hardened leak p…
markus7017 Nov 25, 2023
b983767
[mqtt.homeassistant] VETO updates to read only channels (#15937)
ccutrer Nov 25, 2023
a02f048
Reorganize API classes (#15934)
jlaur Nov 25, 2023
ad0f44c
[mqtt.homeassistant] interpret a dimmable light as OFF properly from …
ccutrer Nov 25, 2023
a511142
[nanoleaf] Fix typos (#15956)
mueller-ma Nov 25, 2023
846ab71
Add SAT warning when jSerialComm, PureJavaComm imports are used (#15952)
wborn Nov 25, 2023
83e1dec
[lifx] Add support for new LIFX products (#15957)
wborn Nov 25, 2023
aea6f2c
[shelly] Support for Plus Dimmer 10v (#15950)
markus7017 Nov 25, 2023
c710780
[growatt] rule actions to setup (dis-) charging programs
andrewfg Nov 26, 2023
8fe2fd6
Merge branch 'openhab:main' into growatt
andrewfg Nov 26, 2023
6e03c55
[growatt] register rule actions
andrewfg Nov 26, 2023
c3cb3b9
Merge branch 'growatt' of https://github.com/andrewfg/openhab-addons …
andrewfg Nov 26, 2023
03cd19b
[growatt] auto login depending on cookies
andrewfg Nov 27, 2023
6d683df
[growatt] refactoring
andrewfg Nov 27, 2023
cdae2c4
[growatt] improve example
andrewfg Nov 28, 2023
88cad3f
[growatt] spotless
andrewfg Nov 28, 2023
8dad796
[growatt] actions allow Number arguments
andrewfg Nov 29, 2023
186e135
Merge branch 'openhab:main' into growatt
andrewfg Nov 29, 2023
2c40075
[growatt] adopt reviewer suggestions
andrewfg Dec 2, 2023
c292c2b
Merge branch 'openhab:main' into growatt
andrewfg Dec 5, 2023
676a7e5
Update version
andrewfg Dec 23, 2023
502bf5e
Merge branch 'openhab:main' into growatt
andrewfg Dec 23, 2023
955dc24
Add device synonyms; handle integer overflows
andrewfg Dec 27, 2023
b835bf5
Fix integer overflow; Tweak synonyms; Add tests
andrewfg Dec 28, 2023
13880be
Adopt user feedback on meter synonyms and tests
andrewfg Dec 29, 2023
e5b7b40
Improve logging; Tweak synonyms
andrewfg Dec 30, 2023
3b58ba1
[growatt] implement tlx inverter (wip)
andrewfg Jan 5, 2024
c1792fb
[growatt] fix build
andrewfg Jan 5, 2024
0132ecc
Implement tlx settings
andrewfg Jan 6, 2024
a15173e
Accept null arguments
andrewfg Jan 6, 2024
e9c2a01
[growatt] fix rule example
andrewfg Jan 7, 2024
9ade0be
[growatt] update copyright header
andrewfg Jan 7, 2024
9a8638c
[growatt] fix channel uom errors
andrewfg Jan 7, 2024
ac313ae
[growatt] corrections to readme
andrewfg Jan 8, 2024
265282f
[growatt] validate domain, trust certificates
andrewfg Jan 9, 2024
7a654fc
Merge branch 'openhab:main' into growatt
andrewfg Jan 9, 2024
04b7866
[growatt] revert prior; use OH stock createHttpClient()
andrewfg Jan 9, 2024
0070b7f
[growatt] adopt reviewer suggestions
andrewfg Jan 17, 2024
e2263d3
Delete manufacturer logo
andrewfg Jan 17, 2024
a9912f4
[growatt] adopt reviewer suggestions for shorter labels
andrewfg Jan 20, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ private Map<String, JsonElement> doHttpRequestInner(HttpMethod method, String en
request.content(new FormContentProvider(fields), FORM_CONTENT);
}

if (logger.isTraceEnabled()) {
andrewfg marked this conversation as resolved.
Show resolved Hide resolved
logger.trace("{} {} {} params={} fields={}", method, endPoint, request.getVersion(), params, fields);
}

ContentResponse response;
try {
response = request.send();
Expand All @@ -197,16 +201,20 @@ private Map<String, JsonElement> doHttpRequestInner(HttpMethod method, String en
}

int status = response.getStatus();
String content = response.getContentAsString();

if (logger.isTraceEnabled()) {
logger.trace("HTTP {} {} content:{}", status, HttpStatus.getMessage(status), content);
}

if (status != HttpStatus.OK_200) {
throw new GrowattApiException(String.format("HTTP %d %s", status, HttpStatus.getMessage(status)));
}

String content = response.getContentAsString();
if (content == null || content.isBlank()) {
throw new GrowattApiException("HTTP response content is " + (content == null ? "null" : "blank"));
}

logger.trace("doHttpRequestInner() response:{}", content);
try {
JsonElement jsonObject = JsonParser.parseString(content).getAsJsonObject();
if (jsonObject instanceof JsonObject jsonElement) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public static String getFieldName(String channelId) {
public @Nullable @SerializedName(value = "op_va", alternate = { "AC_InVA" }) Integer inverter_va;

// battery discharge / charge power
public @Nullable @SerializedName(value = "p1charge1", alternate = { "acchr_watt", "BatWatt" }) Integer charge_power;
public @Nullable @SerializedName(value = "pdischarge1", alternate = { "ACDischarWatt", "BatDischarWatt" }) Integer discharge_power;
public @Nullable @SerializedName(value = "p1charge1", alternate = { "acchr_watt", "BatWatt", "bdc1_pchr" }) Integer charge_power;
public @Nullable @SerializedName(value = "pdischarge1", alternate = { "ACDischarWatt", "BatDischarWatt", "bdc1_pdischr" }) Integer discharge_power;

// miscellaneous battery
public @Nullable @SerializedName(value = "ACCharCurr") Integer charge_current;
Expand All @@ -109,7 +109,7 @@ public static String getFieldName(String channelId) {
public @Nullable @SerializedName(value = "plocaloads") Integer load_power_s;
public @Nullable @SerializedName(value = "plocaloadt") Integer load_power_t;

// solar AC grid energy
// inverter AC energy
public @Nullable @SerializedName(value = "eactoday", alternate = { "pvenergytoday" }) Integer inverter_energy_today;
public @Nullable @SerializedName(value = "eactotal", alternate = { "pvenergytotal" }) Integer inverter_energy_total;

Expand Down Expand Up @@ -163,9 +163,9 @@ public static String getFieldName(String channelId) {

// battery data
public @Nullable @SerializedName(value = "batterytype") Integer battery_type;
public @Nullable @SerializedName(value = "batttemp", alternate = { "bms_batterytemp" }) Integer battery_temperature;
public @Nullable @SerializedName(value = "batttemp", alternate = { "bdc1_tempa" }) Integer battery_temperature;
public @Nullable @SerializedName(value = "vbat", alternate = { "uwBatVolt_DSP", "bat_Volt", "bms_batteryvolt" }) Integer battery_voltage;
public @Nullable @SerializedName(value = "bat_dsp", alternate = { "bms_status" }) Integer battery_display;
public @Nullable @SerializedName(value = "bat_dsp") Integer battery_display;
public @Nullable @SerializedName(value = "SOC", alternate = { "batterySOC", "bms_soc" }) Integer battery_soc;

// fault codes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ void testThreePhaseGrottValuesContents() throws FileNotFoundException, IOExcepti

Map<String, QuantityType<?>> channelStates = grottValues.getChannelStates();
assertNotNull(channelStates);
assertEquals(63, channelStates.size());
assertEquals(64, channelStates.size());

assertEquals(QuantityType.valueOf(-36.5, Units.WATT), channelStates.get("inverter-power"));
assertEquals(QuantityType.valueOf(11, Units.PERCENT), channelStates.get("battery-soc"));
Expand Down