First sort of working mqtt routines

This commit is contained in:
marcel
2025-08-11 21:31:31 +02:00
parent f722f8aec1
commit 8afdc890f1
15 changed files with 443 additions and 31 deletions

View File

@@ -38,6 +38,9 @@ class config_reader:
if self.test_modbus_servers_settings() == 0:
return 0
if self.aprs_settings() == 0:
return 0
return 1
def read_config_file (self):
@@ -50,7 +53,7 @@ class config_reader:
else:
return 1
# Test if all settings are pressebt
# Test if all settings are pressent
def test_global_settings(self):
# Test is all expected settings are present
try:
@@ -63,7 +66,7 @@ class config_reader:
else:
return 1
# Test if all settings are pressebt
# Test if all settings are pressent
def test_modbus_settings(self):
# Test is all expected settings are present
try:
@@ -84,3 +87,17 @@ class config_reader:
return 0
else:
return 1
def aprs_settings(self):
for entry in self.config_file_settings['aprs']:
try:
tmp = tmp = entry['port']
tmp = entry['call']
tmp = entry['destination']
tmp = entry['digi_path']
tmp = entry['interval']
except:
print ("Error in the aprs section of the configuration file.")
return 0
else:
return 1