54 lines
1.1 KiB
Python
54 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
import serial # for parity constants
|
|
|
|
SERIAL = '/dev/ttyUSB0'
|
|
BAUD_RATE = 4800
|
|
STOP_BITS = 1
|
|
PARITY = None
|
|
|
|
DATA_INTERVAL = 60
|
|
ARCHIVE_INTERVAL = 60 * 60 # 1h
|
|
KEEP_INTERVAL = 365 * 24 * 60 * 60 # 1 year
|
|
|
|
# Manual claims poly should be 0x8404, internet says xmodem
|
|
CRC_TYPE = 'xmodem'
|
|
|
|
STORED_VALUES = [
|
|
'U_bat',
|
|
'U_mod1',
|
|
'U_mod2',
|
|
'I_pv_in',
|
|
'I_load_total',
|
|
'load_switch',
|
|
'max_charge_bat_day',
|
|
'max_charge_load_day'
|
|
]
|
|
|
|
|
|
FORMAT = ['Version',
|
|
'Date',
|
|
'Time',
|
|
'U_bat',
|
|
'U_mod1',
|
|
'U_mod2',
|
|
'SOC',
|
|
'SOH',
|
|
'I_bat_total',
|
|
'I_pv_max1',
|
|
'I_pv_max2',
|
|
'I_pv_in',
|
|
'I_charge_total',
|
|
'I_load_device',
|
|
'I_load_total',
|
|
'T_bat',
|
|
'error',
|
|
'charge_mode',
|
|
'load_switch',
|
|
'relais_aux1',
|
|
'relais_aux2',
|
|
'max_charge_bat_day',
|
|
'max_charge_bat_ever',
|
|
'max_charge_load_day',
|
|
'max_charge_load_ever',
|
|
'derating']
|