26
26
import datetime
27
27
import time
28
28
29
- __version__ = '1.4.0 '
29
+ __version__ = '1.4.1 '
30
30
listenaddress = b'127.0.0.1' # Default listenaddress
31
31
listenport = 10004 # Make sure your firewall enables you listening at this port
32
32
# There is no need to change this if this proxy must log your data directly to the Omnik/SolarmanPV servers
@@ -437,7 +437,7 @@ def get_yaml_setting(settings, section, key, default):
437
437
"CRITICAL" : logging .CRITICAL
438
438
}
439
439
440
- if os .path .isfile (args .config ):
440
+ if os .path .isfile (args .settings ):
441
441
settings = get_yaml_settings (args )
442
442
args .mqtt_host = get_yaml_setting (settings , 'output.mqtt' , 'host' , args .mqtt_host )
443
443
args .mqtt_port = get_yaml_setting (settings , 'output.mqtt' , 'port' , args .mqtt_port )
@@ -461,7 +461,7 @@ def get_yaml_setting(settings, section, key, default):
461
461
args .listenport = get_yaml_setting (settings , 'proxy' , 'listenport' , args .listenport )
462
462
args .omniklogger = get_yaml_setting (settings , 'proxy' , 'omniklogger' , args .omniklogger )
463
463
args .omnikloggerport = get_yaml_setting (settings , 'proxy' , 'omnikloggerport' , args .omnikloggerport )
464
- elif os .path .isfile (args .settings ):
464
+ elif os .path .isfile (args .config ):
465
465
c = configparser .ConfigParser (converters = {'list' : lambda x : [i .strip () for i in x .split (',' )]})
466
466
c .read ([args .config ], encoding = 'utf-8' )
467
467
args .mqtt_host = c .get ('output.mqtt' , 'host' , fallback = args .mqtt_host )
0 commit comments