56 lines
1.1 KiB
Python
56 lines
1.1 KiB
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.'
|
|
|
|
#s3 configuration
|
|
S3BUCKET = "17-c0436b6a-d276-4cd8-9c44-1eae86cf5d0e"
|
|
S3KEY = "EXO067a6ceb91816b42312226a9"
|
|
S3SECRET = "79tQlqQuS6yhexP0IT-6-bIdIP2FGGTQLn2e2oE4FC8"
|
|
|
|
# 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
|
|
|
|
|