Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates of the PI18 Protocol for the Mppsolar LV5048 Hyprid V2 inverter. #128

Open
wants to merge 1 commit into
base: pi18
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/pipsolar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

DEPENDENCIES = ["uart"]
CODEOWNERS = ["@andreashergert1984"]
AUTO_LOAD = ["binary_sensor", "text_sensor", "sensor", "switch", "output"]
AUTO_LOAD = ["binary_sensor", "text_sensor", "sensor", "switch", "output", "select"]
MULTI_CONF = True

CONF_PIPSOLAR_ID = "pipsolar_id"
Expand Down
4 changes: 0 additions & 4 deletions components/pipsolar/binary_sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
DEPENDENCIES = ["uart"]

CONF_SETTING_VALUE_CONFIGURATION_STATE = "setting_value_configuration_state"
CONF_LOAD_CONNECTION = "load_connection"

CONF_ADD_SBU_PRIORITY_VERSION = "add_sbu_priority_version"
CONF_CONFIGURATION_STATUS = "configuration_status"
Expand All @@ -31,7 +30,6 @@
CONF_BACKLIGHT_ON = "backlight_on"
CONF_ALARM_ON_WHEN_PRIMARY_SOURCE_INTERRUPT = "alarm_on_when_primary_source_interrupt"
CONF_FAULT_CODE_RECORD = "fault_code_record"
CONF_POWER_SAVING = "power_saving"

CONF_WARNING_LINE_FAIL = "warning_line_fail"
CONF_WARNING_OUTPUT_CIRCUIT_SHORT = "warning_output_circuit_short"
Expand Down Expand Up @@ -88,7 +86,6 @@

TYPES = [
CONF_SETTING_VALUE_CONFIGURATION_STATE,
CONF_LOAD_CONNECTION,
CONF_ADD_SBU_PRIORITY_VERSION,
CONF_CONFIGURATION_STATUS,
CONF_SCC_FIRMWARE_VERSION,
Expand All @@ -108,7 +105,6 @@
CONF_BACKLIGHT_ON,
CONF_ALARM_ON_WHEN_PRIMARY_SOURCE_INTERRUPT,
CONF_FAULT_CODE_RECORD,
CONF_POWER_SAVING,
CONF_WARNINGS_PRESENT,
CONF_FAULTS_PRESENT,
CONF_WARNING_POWER_LOSS,
Expand Down
37 changes: 29 additions & 8 deletions components/pipsolar/output/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from esphome import automation
from esphome.components import output
from esphome.const import CONF_ID, CONF_VALUE
from .. import PIPSOLAR_COMPONENT_SCHEMA, CONF_PIPSOLAR_ID, pipsolar_ns
from .. import CONF_PIPSOLAR_ID, PIPSOLAR_COMPONENT_SCHEMA, pipsolar_ns

DEPENDENCIES = ["pipsolar"]

Expand All @@ -13,7 +13,7 @@
CONF_POSSIBLE_VALUES = "possible_values"

# 3.11 PCVV<nn.n><cr>: Setting battery C.V. (constant voltage) charging voltage 48.0V ~ 58.4V for 48V unit
# battery_bulk_voltage;
# battery_bulk_voltage;
# battery_recharge_voltage; 12V unit: 11V/11.3V/11.5V/11.8V/12V/12.3V/12.5V/12.8V
# 24V unit: 22V/22.5V/23V/23.5V/24V/24.5V/25V/25.5V
# 48V unit: 44V/45V/46V/47V/48V/49V/50V/51V
Expand All @@ -28,16 +28,24 @@
# 24V unit: 00.0V/24V/24.5V/25V/25.5V/26V/26.5V/27V/27.5V/28V/28.5V/29V
# 48V unit: 00.0V48V/49V/50V/51V/52V/53V/54V/55V/56V/57V/58V

# solar_power_priority; 0 Battery-Load-Utiliy, 1 Load-Battery-Utiliy
# machine_type; 0 Off-Grid, 1 Grid-Tie
# battery_power_direction; 0 donothing, 1 charge, 2 discharge

CONF_CURRENT_MAX_AC_CHARGING_CURRENT = "current_max_ac_charging_current"
CONF_CURRENT_MAX_CHARGING_CURRENT = "current_max_charging_current"
CONF_BATTERY_BULK_VOLTAGE = "battery_bulk_voltage"
CONF_BATTERY_FLOAT_VOLTAGE = "battery_float_voltage"

# CONF_BATTERY_RECHARGE_VOLTAGE = "battery_recharge_voltage"
# CONF_BATTERY_UNDER_VOLTAGE = "battery_under_voltage"
# CONF_BATTERY_FLOAT_VOLTAGE = "battery_float_voltage"
# CONF_BATTERY_TYPE = "battery_type"
#
# CONF_OUTPUT_SOURCE_PRIORITY = "output_source_priority"
# CONF_CHARGER_SOURCE_PRIORITY = "charger_source_priority"
# CONF_SOLAR_POWER_PRIORITY = "solar_power_priority"
# CONF_MACHINE_TYPE = "machine_type"
# CONF_BATTERY_POWER_DIRECTION = "battery_power_direction"
# CONF_BATTERY_REDISCHARGE_VOLTAGE = "battery_redischarge_voltage"

TYPES = {
Expand All @@ -49,6 +57,17 @@
[10, 20, 30, 40, 50, 60, 70, 80, 90],
"^S013MCHGC0,%02d",
),
# ^S015MCHGVmmm,nnn: mmmm = BULK, nnn=FLOAT
CONF_BATTERY_BULK_VOLTAGE: (
[48.0, 48.1, 48.2, 48.3, 48.4, 48.5, 48.6, 48.7, 48.8, 48.9, 49.0, 49.1, 49.2, 49.3, 49.4, 49.5, 49.6, 49.7, 49.8, 49.9, 50.0, 50.1, 50.2, 50.3, 50.4, 50.5, 50.6, 50.7, 50.8, 50.9, 51.0, 51.1, 51.2, 51.3, 51.4, 51.5, 51.6, 51.7, 51.8, 51.9, 52.0, 52.1, 52.2, 52.3, 52.4, 52.5, 52.6, 52.7, 52.8, 52.9, 53.0, 53.1, 53.2, 53.3, 53.4, 53.5, 53.6, 53.7, 53.8, 53.9, 54.0, 54.1, 54.2, 54.3, 54.4, 54.5, 54.6, 54.7, 54.8, 54.9, 55.0, 55.1, 55.2, 55.3, 55.4, 55.5, 55.6, 55.7, 55.8, 55.9, 56.0, 56.1, 56.2, 56.3, 56.4, 56.5, 56.6, 56.7, 56.8, 56.9, 57.0, 57.1, 57.2, 57.3, 57.4, 57.5, 57.6, 57.7, 57.8, 57.9, 58.0, 58.1, 58.2, 58.3, 58.4],
"^S015MCHGV%02.1f,%02.1f",
),
# ^S015MCHGVmmm,nnn: mmmm = BULK, nnn=FLOAT
CONF_BATTERY_FLOAT_VOLTAGE: (
[48.0, 48.1, 48.2, 48.3, 48.4, 48.5, 48.6, 48.7, 48.8, 48.9, 49.0, 49.1, 49.2, 49.3, 49.4, 49.5, 49.6, 49.7, 49.8, 49.9, 50.0, 50.1, 50.2, 50.3, 50.4, 50.5, 50.6, 50.7, 50.8, 50.9, 51.0, 51.1, 51.2, 51.3, 51.4, 51.5, 51.6, 51.7, 51.8, 51.9, 52.0, 52.1, 52.2, 52.3, 52.4, 52.5, 52.6, 52.7, 52.8, 52.9, 53.0, 53.1, 53.2, 53.3, 53.4, 53.5, 53.6, 53.7, 53.8, 53.9, 54.0, 54.1, 54.2, 54.3, 54.4, 54.5, 54.6, 54.7, 54.8, 54.9, 55.0, 55.1, 55.2, 55.3, 55.4, 55.5, 55.6, 55.7, 55.8, 55.9, 56.0, 56.1, 56.2, 56.3, 56.4, 56.5, 56.6, 56.7, 56.8, 56.9, 57.0, 57.1, 57.2, 57.3, 57.4, 57.5, 57.6, 57.7, 57.8, 57.9, 58.0, 58.1, 58.2, 58.3, 58.4],
"^S015MCHGV%02.1f,%02.1f",
),

# CONF_BATTERY_RECHARGE_VOLTAGE: (
# [440, 450, 460, 470, 480, 490, 500, 510],
# "PBCV%02.1f",
Expand All @@ -57,13 +76,15 @@
# [0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58],
# "PBDV%02.1f",
# ),
# CONF_BATTERY_UNDER_VOLTAGE: (
# [40.0, 40.1, 42, 43, 44, 45, 46, 47, 48.0],
# "PSDV%02.1f",
# ),
# CONF_BATTERY_FLOAT_VOLTAGE: ([48.0, 49.0, 50.0, 51.0], "PBFT%02.1f"),
#CONF_BATTERY_UNDER_VOLTAGE: (
# [40.0, 40.1, 42, 43, 44, 45, 46, 47, 48.0],
# "PSDV%02.1f",
#),
# CONF_BATTERY_TYPE: ([0, 1, 2], "PBT%02.0f"),
# CONF_OUTPUT_SOURCE_PRIORITY: ([0, 1, 2], "POP%02.0f"),
# CONF_SOLAR_POWER_PRIORITY: ([0, 1], "PSP%02.0f"),
# CONF_MACHINE_TYPE: ([0, 1], "PDI%02.0f| PEI%02.0f|"),
# CONF_BATTERY_POWER_DIRECTION: ([0, 1, 2], "GS.....")
# CONF_CHARGER_SOURCE_PRIORITY: ([0, 1, 2, 3], "PCP%02.0f"),
}

Expand Down
Loading