Commit ccc300f485bae427241c4510e1a44439e60b30d4
1 parent
03584bf5
Exists in
dev
Add monitoring_names dictionary (mandatory monitoring_names TODO)in obsconfig
Showing
1 changed file
with
16 additions
and
4 deletions
Show diff stats
src/core/pyros_django/obsconfig/obsconfig_class.py
... | ... | @@ -33,8 +33,20 @@ class OBSConfig: |
33 | 33 | "AgentM":None |
34 | 34 | |
35 | 35 | } |
36 | - | |
37 | - | |
36 | + # monitoring names useful for obs security | |
37 | + MONITORING_NAMES = { | |
38 | + "secu" : { | |
39 | + "Temp_ext" : {"label" : "Temperature outside"}, | |
40 | + "Wind_dir" : {"label" : "Wind direction"}, | |
41 | + "Rain" : {"label" : "Rain"}, | |
42 | + "Wind_speed" : {"label" : "Wind speed"} | |
43 | + }, | |
44 | + "info" : { | |
45 | + "Humidity_ext": {"label" : "Humidity outside"}, | |
46 | + "Error_code": {"label" : "Error code"} | |
47 | + } | |
48 | + } | |
49 | + | |
38 | 50 | def verify_if_pickle_needs_to_be_updated(self, observatory_config_file) -> bool: |
39 | 51 | """ |
40 | 52 | |
... | ... | @@ -166,7 +178,7 @@ class OBSConfig: |
166 | 178 | dict: dictionary of the config file (with values) |
167 | 179 | """ |
168 | 180 | # disable pykwalify error to clean the output |
169 | - logging.disable(logging.ERROR) | |
181 | + #logging.disable(logging.ERROR) | |
170 | 182 | try: |
171 | 183 | can_yaml_file_be_read = False |
172 | 184 | while can_yaml_file_be_read != True: |
... | ... | @@ -1349,7 +1361,7 @@ def main(): |
1349 | 1361 | config.get_devices() |
1350 | 1362 | |
1351 | 1363 | #print(config.get_output_data_device("TAROT_meteo").get("CV7")) |
1352 | - print(config.get_device_for_agent(config.unit_name, "AgentDevicePLC_ako").get("device_config").get("CAPABILITIES")[0].get("output_data")) | |
1364 | + print(config.get_device_for_agent(config.unit_name, "AgentDevicePLC_ako").get("device_config").F[0].get("output_data").get("Raspberry").keys()) | |
1353 | 1365 | print(config.get_monitoring_devices()) |
1354 | 1366 | #.get("/entities/devices/CV7/Error_code").keys()) |
1355 | 1367 | #print(config.get_device_capabilities("TAROT_meteo")) | ... | ... |