Innovenergy_trunk/NodeRed/NodeRedFiles/dbus-fzsonick-48tl-Ivo/config.py

55 lines
1002 B
Python
Raw Normal View History

2024-05-28 09:20:02 +00:00
import serial
import logging
2024-06-05 10:33:44 +00:00
from data import read_file_one_line
2024-05-28 09:20:02 +00:00
# dbus configuration
CONNECTION = 'Modbus RTU'
2024-06-05 10:33:44 +00:00
PRODUCT_NAME = 'FIAMM 48TL Series Battery'
2024-05-28 09:20:02 +00:00
PRODUCT_ID = 0xB012 # assigned by victron
DEVICE_INSTANCE = 1
SERVICE_NAME_PREFIX = 'com.victronenergy.battery.'
# driver configuration
2024-06-05 10:33:44 +00:00
SOFTWARE_VERSION = '3.0.0'
2024-05-28 09:20:02 +00:00
UPDATE_INTERVAL = 2000 # milliseconds
2024-06-05 10:33:44 +00:00
LOG_LEVEL = logging.INFO
#LOG_LEVEL = logging.DEBUG
# battery config
V_MAX = 54.2
V_MIN = 42
R_STRING_MIN = 0.125
R_STRING_MAX = 0.250
I_MAX_PER_STRING = 15
AH_PER_STRING = 40
2024-05-28 09:20:02 +00:00
# modbus configuration
BASE_ADDRESS = 999
2024-06-05 10:33:44 +00:00
NO_OF_REGISTERS = 56
MAX_SLAVE_ADDRESS = 25
2024-05-28 09:20:02 +00:00
# RS 485 configuration
PARITY = serial.PARITY_ODD
TIMEOUT = 0.1 # seconds
BAUD_RATE = 115200
BYTE_SIZE = 8
STOP_BITS = 1
MODE = 'rtu'
2024-06-05 10:33:44 +00:00
# InnovEnergy IOT configuration
2024-05-28 09:20:02 +00:00
2024-06-05 10:33:44 +00:00
INSTALLATION_NAME = read_file_one_line('/data/innovenergy/openvpn/installation-name')
INNOVENERGY_SERVER_IP = '10.2.0.1'
INNOVENERGY_SERVER_PORT = 8134
INNOVENERGY_PROTOCOL_VERSION = '48TL200V3'
2024-05-28 09:20:02 +00:00