Newer
Older
Olivier Kaufmann
committed
# OhmPi configuration
OHMPI_CONFIG = {
'id': '0001', # Unique identifier of the OhmPi board (string)
'R_shunt': 2, # Shunt resistance in Ohms
'Imax': 4800/50/2, # Maximum current
'coef_p2': 2.50, # slope for current conversion for ADS.P2, measurement in V/V
'coef_p3': 2.50, # slope for current conversion for ADS.P3, measurement in V/V
'offset_p2': 0,
'offset_p3': 0,
Olivier Kaufmann
committed
'integer': 2, # Max value 10 # TODO: Explain what this is...
'board_address': {'A': 0x76, 'B': 0x71, 'M': 0x74, 'N': 0x70} # def. {'A': 0x76, 'B': 0x71, 'M': 0x74, 'N': 0x70}
Olivier Kaufmann
committed
# Execution logging configuration
EXEC_LOGGING_CONFIG = {
Olivier Kaufmann
committed
'debug_mode': True,
'logging_to_console': False,
'file_name': 'ohmpi_log',
'max_bytes': 262144,
'backup_count': 30,
'when': 'd',
'interval': 1
}
Olivier Kaufmann
committed
# Data logging configuration
DATA_LOGGING_CONFIG = {
'file_name': 'data_log',
Olivier Kaufmann
committed
'logging_to_console': False,
'max_bytes': 16777216,
'backup_count': 1024,
'when': 'd',
'interval': 1
}
Olivier Kaufmann
committed
# State of Health logging configuration
SOH_LOGGING_CONFIG = {
'file_name': 'soh_log',
Olivier Kaufmann
committed
'logging_to_console': True,
Olivier Kaufmann
committed
'max_bytes': 16777216,
'backup_count': 1024,
'when': 'd',
'interval': 1
}
# MQTT logging configuration parameters
Olivier Kaufmann
committed
MQTT_LOGGING_CONFIG = {
Olivier Kaufmann
committed
'port': 1883,
'qos': 0,
'retain': False,
'keepalive': 60,
'will': None,
'auth': None,
Olivier Kaufmann
committed
'tls': None,
Olivier Kaufmann
committed
'transport': 'tcp',
'client_id': f'ohmpi_sn_{OHMPI_CONFIG["id"]}',
Olivier Kaufmann
committed
'control_topic': f'ctrl_ohmpi_sn_{OHMPI_CONFIG["id"]}',
'exec_topic': f'exec_ohmpi_sn_{OHMPI_CONFIG["id"]}',
Olivier Kaufmann
committed
'data_topic': f'data_ohmpi_sn_{OHMPI_CONFIG["id"]}',
'soh_topic': f'soh_ohmpi_sn_{OHMPI_CONFIG["id"]}'