52 lines
999 B
Python
52 lines
999 B
Python
|
import serial
|
||
|
import logging
|
||
|
|
||
|
# dbus configuration
|
||
|
|
||
|
FIRMWARE_VERSION = 1 # value returned by getValue (getText returns string value reported by battery)
|
||
|
HARDWARE_VERSION = 1 # value returned by getValue (getText returns string value reported by battery)
|
||
|
|
||
|
CONNECTION = 'Modbus RTU'
|
||
|
PRODUCT_NAME = 'FZS 48TL200'
|
||
|
PRODUCT_ID = 0xB012 # assigned by victron
|
||
|
DEVICE_INSTANCE = 1
|
||
|
SERVICE_NAME_PREFIX = 'com.victronenergy.battery.'
|
||
|
|
||
|
|
||
|
# driver configuration
|
||
|
|
||
|
SOFTWARE_VERSION = '3.0.3'
|
||
|
UPDATE_INTERVAL = 2000 # milliseconds
|
||
|
#LOG_LEVEL = logging.INFO
|
||
|
LOG_LEVEL = logging.DEBUG
|
||
|
|
||
|
# modbus configuration
|
||
|
|
||
|
BASE_ADDRESS = 999
|
||
|
#NO_OF_REGISTERS = 63
|
||
|
NO_OF_REGISTERS = 64
|
||
|
MAX_SLAVE_ADDRESS = 10
|
||
|
|
||
|
|
||
|
# RS 485 configuration
|
||
|
|
||
|
PARITY = serial.PARITY_ODD
|
||
|
TIMEOUT = 0.1 # seconds
|
||
|
BAUD_RATE = 115200
|
||
|
BYTE_SIZE = 8
|
||
|
STOP_BITS = 1
|
||
|
MODE = 'rtu'
|
||
|
|
||
|
|
||
|
# battery configuration
|
||
|
|
||
|
MAX_CHARGE_VOLTAGE = 58
|
||
|
I_MAX_PER_STRING = 15
|
||
|
NUM_OF_STRING_PER_BATTERY = 5
|
||
|
AH_PER_STRING = 40
|
||
|
V_MAX = 54.2
|
||
|
R_STRING_MIN = 0.125
|
||
|
R_STRING_MAX = 0.250
|
||
|
|
||
|
|