diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e835cf..f072330 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## V1.93 +### script +* support script for intermediate meter (https://github.com/reserve85/HoymilesZeroExport/issues/197) +### config +* add `[SELECT_INTERMEDIATE_METER]`: `USE_SCRIPT_INTERMEDIATE` +* add section `[INTERMEDIATE_SCRIPT]` + ## V1.92 ### script * support "Mitterbaur AMIS Lesekopf" (https://github.com/reserve85/HoymilesZeroExport/issues/184) diff --git a/HoymilesZeroExport.py b/HoymilesZeroExport.py index 708e8c9..858f180 100644 --- a/HoymilesZeroExport.py +++ b/HoymilesZeroExport.py @@ -15,7 +15,7 @@ # along with this program. If not, see . __author__ = "Tobias Kraft" -__version__ = "1.92" +__version__ = "1.93" import requests import time @@ -1278,6 +1278,13 @@ def CreateIntermediatePowermeter(dtu: DTU) -> Powermeter: config.get('INTERMEDIATE_VZLOGGER', 'VZL_PORT_INTERMEDIATE'), config.get('INTERMEDIATE_VZLOGGER', 'VZL_UUID_INTERMEDIATE') ) + elif config.getboolean('SELECT_INTERMEDIATE_METER', 'USE_SCRIPT_INTERMEDIATE'): + return Script( + config.get('INTERMEDIATE_SCRIPT', 'SCRIPT_FILE_INTERMEDIATE'), + config.get('INTERMEDIATE_SCRIPT', 'SCRIPT_IP_INTERMEDIATE'), + config.get('INTERMEDIATE_SCRIPT', 'SCRIPT_USER_INTERMEDIATE'), + config.get('INTERMEDIATE_SCRIPT', 'SCRIPT_PASS_INTERMEDIATE') + ) elif config.getboolean('SELECT_INTERMEDIATE_METER', 'USE_AMIS_READER_INTERMEDIATE'): return AmisReader( config.get('INTERMEDIATE_AMIS_READER', 'AMIS_READER_IP_INTERMEDIATE') diff --git a/HoymilesZeroExport_Config.ini b/HoymilesZeroExport_Config.ini index 97228f8..21b27a2 100644 --- a/HoymilesZeroExport_Config.ini +++ b/HoymilesZeroExport_Config.ini @@ -19,7 +19,7 @@ # --------------------------------------------------------------------- [VERSION] -VERSION = 1.92 +VERSION = 1.93 [SELECT_DTU] # --- define your DTU (only one) --- @@ -156,6 +156,7 @@ USE_EMLOG_INTERMEDIATE = false USE_IOBROKER_INTERMEDIATE = false USE_HOMEASSISTANT_INTERMEDIATE = false USE_VZLOGGER_INTERMEDIATE = false +USE_SCRIPT_INTERMEDIATE = false USE_AMIS_READER_INTERMEDIATE = false [INTERMEDIATE_TASMOTA] @@ -220,6 +221,13 @@ VZL_PORT_INTERMEDIATE = 2081 # you need to specify the uuid of the vzlogger channel for the reading OBIS(16.7.0) (aktuelle Gesamtwirkleistung) VZL_UUID_INTERMEDIATE = 06ec9562-a490-49fe-92ea-ffe0758d181c +[INTERMEDIATE_SCRIPT] +# --- defines for Shell Script Smartmeter Modul --- +SCRIPT_IP_INTERMEDIATE = xxx.xxx.xxx.xx +SCRIPT_FILE_INTERMEDIATE = GetPowerFromVictronMultiplus.sh +SCRIPT_USER_INTERMEDIATE = +SCRIPT_PASS_INTERMEDIATE = + # --- defines for Mitterbaur AMIS Reader --- [INTERMEDIATE_AMIS_READER] AMIS_READER_IP_INTERMEDIATE = xxx.xxx.xxx.xxx