Skip to content

Commit 174cf0b

Browse files
authored
add enable/disable specific inverter
add option to enable / disable a specific inverter
1 parent fba1775 commit 174cf0b

3 files changed

Lines changed: 38 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
* support Home Assistant over HTTPS (https://github.com/reserve85/HoymilesZeroExport/issues/178)
66
* Support login credentials for Tasmota (https://github.com/reserve85/HoymilesZeroExport/issues/159)
77
* update.sh supports custom branch, for example to update to dev path. usage: ./update.sh dev
8+
* option to disable a inverter
89
### config
910
* add `[HOMEASSISTANT]`: `HA_HTTPS`
1011
* add `[INTERMEDIATE_HOMEASSISTANT]`: `HA_HTTPS_INTERMEDIATE`
1112
* add `[TASMOTA]`: `USER` and `PASS`
12-
* add `[TASMOTA_INTERMEDIATE]`: `USER_INTERMEDIATE` and `PASS_INTERMEDIATE`
13+
* add `[TASMOTA_INTERMEDIATE]`: `USER_INTERMEDIATE` and `PASS_INTERMEDIATE`
14+
* add `[INVERTER_x]`: `ENABLED`
1315

1416
## V1.90
1517
### script

HoymilesZeroExport.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def GetHoymilesAvailable():
339339
for i in range(INVERTER_COUNT):
340340
try:
341341
WasAvail = AVAILABLE[i]
342-
AVAILABLE[i] = DTU.GetAvailable(i)
342+
AVAILABLE[i] = ENABLED[i] and DTU.GetAvailable(i)
343343
if AVAILABLE[i]:
344344
GetHoymilesAvailable = True
345345
if not WasAvail:
@@ -1321,6 +1321,7 @@ def CreateDTU() -> DTU:
13211321
SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR = config.getboolean('COMMON', 'SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR', fallback=False)
13221322
powermeter_target_point = config.getint('CONTROL', 'POWERMETER_TARGET_POINT')
13231323
SERIAL_NUMBER = []
1324+
ENABLED = []
13241325
NAME = []
13251326
TEMPERATURE = []
13261327
HOY_MAX_WATT = []
@@ -1341,6 +1342,7 @@ def CreateDTU() -> DTU:
13411342
HOY_BATTERY_AVERAGE_CNT = []
13421343
for i in range(INVERTER_COUNT):
13431344
SERIAL_NUMBER.append(config.get('INVERTER_' + str(i + 1), 'SERIAL_NUMBER', fallback=''))
1345+
ENABLED.append(config.getboolean('INVERTER_' + str(i + 1), 'ENABLED', fallback = True))
13441346
NAME.append(str('yet unknown'))
13451347
TEMPERATURE.append(str('--- degC'))
13461348
HOY_MAX_WATT.append(config.getint('INVERTER_' + str(i + 1), 'HOY_MAX_WATT'))

HoymilesZeroExport_Config.ini

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ POWERMETER_MAX_POINT = 0
280280
[INVERTER_1]
281281
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
282282
SERIAL_NUMBER =
283+
# enable (true) / disable (false) this inverter
284+
ENABLED = true
283285
# manufacturer power rating of your inverter.
284286
HOY_INVERTER_WATT =
285287
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -321,6 +323,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
321323
[INVERTER_2]
322324
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
323325
SERIAL_NUMBER =
326+
# enable (true) / disable (false) this inverter
327+
ENABLED = true
324328
# manufacturer power rating of your inverter.
325329
HOY_INVERTER_WATT =
326330
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -362,6 +366,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
362366
[INVERTER_3]
363367
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
364368
SERIAL_NUMBER =
369+
# enable (true) / disable (false) this inverter
370+
ENABLED = true
365371
# manufacturer power rating of your inverter.
366372
HOY_INVERTER_WATT =
367373
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -403,6 +409,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
403409
[INVERTER_4]
404410
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
405411
SERIAL_NUMBER =
412+
# enable (true) / disable (false) this inverter
413+
ENABLED = true
406414
# manufacturer power rating of your inverter.
407415
HOY_INVERTER_WATT =
408416
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -444,6 +452,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
444452
[INVERTER_5]
445453
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
446454
SERIAL_NUMBER =
455+
# enable (true) / disable (false) this inverter
456+
ENABLED = true
447457
# manufacturer power rating of your inverter.
448458
HOY_INVERTER_WATT =
449459
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -485,6 +495,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
485495
[INVERTER_6]
486496
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
487497
SERIAL_NUMBER =
498+
# enable (true) / disable (false) this inverter
499+
ENABLED = true
488500
# manufacturer power rating of your inverter.
489501
HOY_INVERTER_WATT =
490502
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -526,6 +538,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
526538
[INVERTER_7]
527539
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
528540
SERIAL_NUMBER =
541+
# enable (true) / disable (false) this inverter
542+
ENABLED = true
529543
# manufacturer power rating of your inverter.
530544
HOY_INVERTER_WATT =
531545
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -567,6 +581,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
567581
[INVERTER_8]
568582
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
569583
SERIAL_NUMBER =
584+
# enable (true) / disable (false) this inverter
585+
ENABLED = true
570586
# manufacturer power rating of your inverter.
571587
HOY_INVERTER_WATT =
572588
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -608,6 +624,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
608624
[INVERTER_9]
609625
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
610626
SERIAL_NUMBER =
627+
# enable (true) / disable (false) this inverter
628+
ENABLED = true
611629
# manufacturer power rating of your inverter.
612630
HOY_INVERTER_WATT =
613631
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -649,6 +667,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
649667
[INVERTER_10]
650668
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
651669
SERIAL_NUMBER =
670+
# enable (true) / disable (false) this inverter
671+
ENABLED = true
652672
# manufacturer power rating of your inverter.
653673
HOY_INVERTER_WATT =
654674
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -690,6 +710,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
690710
[INVERTER_11]
691711
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
692712
SERIAL_NUMBER =
713+
# enable (true) / disable (false) this inverter
714+
ENABLED = true
693715
# manufacturer power rating of your inverter.
694716
HOY_INVERTER_WATT =
695717
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -731,6 +753,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
731753
[INVERTER_12]
732754
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
733755
SERIAL_NUMBER =
756+
# enable (true) / disable (false) this inverter
757+
ENABLED = true
734758
# manufacturer power rating of your inverter.
735759
HOY_INVERTER_WATT =
736760
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -772,6 +796,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
772796
[INVERTER_13]
773797
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
774798
SERIAL_NUMBER =
799+
# enable (true) / disable (false) this inverter
800+
ENABLED = true
775801
# manufacturer power rating of your inverter.
776802
HOY_INVERTER_WATT =
777803
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -813,6 +839,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
813839
[INVERTER_14]
814840
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
815841
SERIAL_NUMBER =
842+
# enable (true) / disable (false) this inverter
843+
ENABLED = true
816844
# manufacturer power rating of your inverter.
817845
HOY_INVERTER_WATT =
818846
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -854,6 +882,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
854882
[INVERTER_15]
855883
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
856884
SERIAL_NUMBER =
885+
# enable (true) / disable (false) this inverter
886+
ENABLED = true
857887
# manufacturer power rating of your inverter.
858888
HOY_INVERTER_WATT =
859889
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)
@@ -895,6 +925,8 @@ HOY_BATTERY_AVERAGE_CNT = 1
895925
[INVERTER_16]
896926
# serial number of your inverter, if empty it is automatically read out of the API. If you have more than one inverter you should define the serial number here (prevents mix-up).
897927
SERIAL_NUMBER =
928+
# enable (true) / disable (false) this inverter
929+
ENABLED = true
898930
# manufacturer power rating of your inverter.
899931
HOY_INVERTER_WATT =
900932
# max. power output of your inverter (e.g. if you have a 1500W Inverter and you only want to output max. 1000W)

0 commit comments

Comments
 (0)