Closed ced2git closed 10 months ago
Ok, i've looked into the code and removed the "pvfusionminutecron" from the docker-compose file to get the default value. (0 and 30)
But why setting an int in the line below under pvcnf.py
if os.getenv("pvfusionminutecron") != None: self.fusionminutecron = int(self.getenv("pvfusionminutecron"))
The same for pvfusionhourcron
if os.getenv("pvfusionhourcron") != None: self.fusionhourcron = int(self.getenv("pvfusionhourcron"))
Fixed in 55c9770062ea05b67fd78009ea6f739b3421093c and release https://github.com/JasperE84/PyFusionSolarDataRelay/releases/tag/1.0.6
Hello,
I've got an issue with the variable pvfusionminutecron. If i set 0,30 in my docker-compose.yml, i get this traceback
2023-07-19 10:54:37,839 - root - INFO - PyFusionSolarDataRelay 1.0.5 started pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Conf class instantiated pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Setting default conf values pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - INFO - Processing environment variables to running config pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvdebug=True' from the environment pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvfusionsolar=True' from the environment pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvfusionsolarurl=https://region03eu5.fusionsolar.huawei.com:443/rest/pvms/web/kiosk/v1/station-kiosk-file?kk=' from the environment pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvfusionsolarkkid=1O0eLg93hkB8qp2rL5MQPqJc25jPljtK' from the environment pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvsysname=inverter01' from the environment pyfusionsolardatarelay | 2023-07-19 10:54:37,840 - root - DEBUG - Pulled 'pvfusionminutecron=0, 30' from the environment pyfusionsolardatarelay | Traceback (most recent call last): pyfusionsolardatarelay | File "/code/pv.py", line 19, in <module> pyfusionsolardatarelay | conf = PvConf(logger) pyfusionsolardatarelay | File "/code/pvconf.py", line 8, in __init__ pyfusionsolardatarelay | self.apply_environment_settings() pyfusionsolardatarelay | File "/code/pvconf.py", line 159, in apply_environment_settings pyfusionsolardatarelay | self.fusionminutecron = int(self.getenv("pvfusionminutecron")) pyfusionsolardatarelay | ValueError: invalid literal for int() with base 10: '0, 30'
My docker-compose has the following parameter set: